Class DocumentTypeHome
- java.lang.Object
-
- fr.paris.lutece.plugins.document.business.DocumentTypeHome
-
public final class DocumentTypeHome extends Object
This class provides instances management methods (create, find, ...) for DocumentType objects
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleancheckDocuments(String strCode)Checks if type has documentsstatic DocumentTypecreate(DocumentType documentType)Creation of an instance of documentTypestatic Collection<DocumentType>findAll()Returns a collection of documentTypes objectsstatic DocumentTypefindByPrimaryKey(String strCode)Returns an instance of a documentType whose identifier is specified in parameterstatic fr.paris.lutece.util.ReferenceListgetDocumentTypesList()Get document types liststatic voidremove(String strCode)Remove the DocumentType whose identifier is specified in parameterstatic voidreorderAttributes(int nIdAttribute1, int nOrderAttribute1, int nIdAttribute2, int nOrderAttribute2)Reorder Attributesstatic voidsetAdminStyleSheet(byte[] baXslAdmin, String strCodeType)Sets the admin stylesheetstatic voidsetContentStyleSheet(byte[] baXslContent, String strCodeType)Sets the content service stylesheetstatic DocumentTypeupdate(DocumentType documentType)Update of the documentType which is specified in parameter
-
-
-
Method Detail
-
create
public static DocumentType create(DocumentType documentType)
Creation of an instance of documentType- Parameters:
documentType- The instance of the documentType which contains the informations to store- Returns:
- The instance of documentType which has been created with its primary key.
-
update
public static DocumentType update(DocumentType documentType)
Update of the documentType which is specified in parameter- Parameters:
documentType- The instance of the documentType which contains the data to store- Returns:
- The instance of the documentType which has been updated
-
remove
public static void remove(String strCode)
Remove the DocumentType whose identifier is specified in parameter- Parameters:
strCode- The document type code
-
findByPrimaryKey
public static DocumentType findByPrimaryKey(String strCode)
Returns an instance of a documentType whose identifier is specified in parameter- Parameters:
strCode- The document type code- Returns:
- An instance of documentType
-
findAll
public static Collection<DocumentType> findAll()
Returns a collection of documentTypes objects- Returns:
- A collection of documentTypes
-
checkDocuments
public static boolean checkDocuments(String strCode)
Checks if type has documents- Parameters:
strCode- The document type code- Returns:
- True if the given type has documents
-
reorderAttributes
public static void reorderAttributes(int nIdAttribute1, int nOrderAttribute1, int nIdAttribute2, int nOrderAttribute2)Reorder Attributes- Parameters:
nIdAttribute1- The id of the first attributenOrderAttribute1- The order of the first attributenIdAttribute2- The id of the second attributenOrderAttribute2- The order of the second attribute
-
getDocumentTypesList
public static fr.paris.lutece.util.ReferenceList getDocumentTypesList()
Get document types list- Returns:
- document types list
-
setAdminStyleSheet
public static void setAdminStyleSheet(byte[] baXslAdmin, String strCodeType)Sets the admin stylesheet- Parameters:
baXslAdmin- The stylesheetstrCodeType- The code type
-
setContentStyleSheet
public static void setContentStyleSheet(byte[] baXslContent, String strCodeType)Sets the content service stylesheet- Parameters:
baXslContent- The stylesheetstrCodeType- The code type
-
-