Class DocumentAttributeHome
java.lang.Object
fr.paris.lutece.plugins.document.business.attributes.DocumentAttributeHome
This class provides instances management methods (create, find, ...) for DocumentAttribute objects
-
Method Summary
Modifier and TypeMethodDescriptionstatic DocumentAttributecreate(DocumentAttribute documentAttribute) Creation of an instance of documentAttributestatic voiddeleteRegularExpression(int nIdAttribute, int nIdExpression) Deletes a regular expression in the attributestatic DocumentAttributefindByPrimaryKey(int nKey) Returns an instance of a documentAttribute whose identifier is specified in parameterstatic Collection<AttributeTypeParameter>getAttributeParametersValues(int nAttributeId, Locale locale) Get the attribute type parameters of an attributegetAttributeParameterValues(int nAttributeId, String strParameterName) Get the list of values of a parameters of an attributestatic Collection<Integer>getListRegularExpressionKeyByIdAttribute(int nIdAttribute) Loads all regular expression key associated to the attribute and returns them into a collectionstatic voidinsertRegularExpression(int nIdAttribute, int nIdExpression) Inserts a regular expression in the attributestatic voidremove(int nAttributeId) Remove the DocumentAttribute whose identifier is specified in parameterstatic List<DocumentAttribute>selectAllAttributesOfDocumentType(String codeDocumentType) Get all attributes of document typestatic voidsetDocumentTypeAttributes(DocumentType documentType) Returns a collection of documentAttributes objectsstatic DocumentAttributeupdate(DocumentAttribute documentAttribute) Update of the documentAttribute which is specified in parameter
-
Method Details
-
create
Creation of an instance of documentAttribute- Parameters:
documentAttribute- The instance of the documentAttribute which contains the informations to store- Returns:
- The instance of documentAttribute which has been created with its primary key.
-
update
Update of the documentAttribute which is specified in parameter- Parameters:
documentAttribute- The instance of the documentAttribute which contains the data to store- Returns:
- The instance of the documentAttribute which has been updated
-
remove
public static void remove(int nAttributeId) Remove the DocumentAttribute whose identifier is specified in parameter- Parameters:
nAttributeId- The id of the attribute
-
findByPrimaryKey
Returns an instance of a documentAttribute whose identifier is specified in parameter- Parameters:
nKey- The Primary key of the documentAttribute- Returns:
- An instance of documentAttribute
-
setDocumentTypeAttributes
Returns a collection of documentAttributes objects- Parameters:
documentType- The document type
-
selectAllAttributesOfDocumentType
Get all attributes of document type- Parameters:
codeDocumentType- The code document Type- Returns:
- listDocumentAttributes The list of all attributes of selected code document type
-
getAttributeParametersValues
public static Collection<AttributeTypeParameter> getAttributeParametersValues(int nAttributeId, Locale locale) Get the attribute type parameters of an attribute- Parameters:
nAttributeId- The id of the attribute to get the parameter oflocale- The locale- Returns:
- The list of parameters
-
getAttributeParameterValues
Get the list of values of a parameters of an attribute- Parameters:
nAttributeId- The id of the attributestrParameterName- The name of the parameter- Returns:
- The list of values of the parameter of the attribute
-
insertRegularExpression
public static void insertRegularExpression(int nIdAttribute, int nIdExpression) Inserts a regular expression in the attribute- Parameters:
nIdAttribute- The identifier of the document attributenIdExpression- The identifier of the regular expression
-
deleteRegularExpression
public static void deleteRegularExpression(int nIdAttribute, int nIdExpression) Deletes a regular expression in the attribute- Parameters:
nIdAttribute- The identifier of the document attributenIdExpression- The identifier of the regular expression
-
getListRegularExpressionKeyByIdAttribute
Loads all regular expression key associated to the attribute and returns them into a collection- Parameters:
nIdAttribute- The identifier of the document attribute- Returns:
- A collection of regular expression key
-