Class AttributeService
java.lang.Object
fr.paris.lutece.portal.service.user.attribute.AttributeService
AttributeService
-
Method Summary
Modifier and TypeMethodDescriptionvoidcreateAttribute(IAttribute attribute) Create a new attribute and its attribute field.getAllAttributesWithFields(Locale locale) Get all user attributes with its attribute fieldsgetAllAttributesWithoutFields(Locale locale) Get all user attribute without its attribute fields.getAttributeWithFields(int nIdAttribute, Locale locale) Get the attribute with its attribute fieldsgetAttributeWithoutFields(int nIdAttribute, Locale locale) Get an attribute without its attribute fieldsgetCoreAttributesWithFields(Locale locale) Get core user attributes with its attribute fieldsgetCoreAttributesWithoutFields(Locale locale) Get core user attribute without its attribute fieldsstatic AttributeServiceDeprecated, for removal: This API element is subject to removal in a future version.getPluginAttributesWithFields(String strPluginName, Locale locale) Get plugin user attributes with its attribute fieldsgetPluginAttributesWithoutFields(String strPluginName, Locale locale) Get plugin user attribute without its attribute fieldsvoidremoveAttribute(int nIdAttribute) Remove the attribute from a given attribute IDvoidsetAttributeField(IAttribute attribute) Set the attribute field from a givenIAttributevoidsetAttributeFields(List<IAttribute> listAttributes) Set the attribute fields from a given list ofIAttributevoidupdateAnonymizationStatusUserField(int nIdAttribute, boolean bAnonymize) Update the anonymization status of the attribute.voidupdateAttribute(IAttribute attribute) Update the attribute
-
Method Details
-
getInstance
Deprecated, for removal: This API element is subject to removal in a future version.Use@Injectto obtain theAttributeServiceinstance. This method will be removed in future versions.Returns the unique instance of theAttributeServiceservice.This method is deprecated and is provided for backward compatibility only. For new code, use dependency injection with
@Injectto obtain theAttributeServiceinstance instead.- Returns:
- The unique instance of
AttributeService.
-
getAttributeWithoutFields
Get an attribute without its attribute fields- Parameters:
nIdAttribute- the id attributelocale-Locale- Returns:
- a
IAttribute
-
getAttributeWithFields
Get the attribute with its attribute fields- Parameters:
nIdAttribute- the id attributelocale- theLocale- Returns:
- a
IAttribute
-
getAllAttributesWithoutFields
Get all user attribute without its attribute fields.- Parameters:
locale- theLocale- Returns:
- a list of
IAttribute
-
getCoreAttributesWithoutFields
Get core user attribute without its attribute fields- Parameters:
locale- theLocale- Returns:
- a list of
IAttribute
-
getPluginAttributesWithoutFields
Get plugin user attribute without its attribute fields- Parameters:
strPluginName- the plugin namelocale- theLocale- Returns:
- a list of
IAttribute
-
getAllAttributesWithFields
Get all user attributes with its attribute fields- Parameters:
locale- theLocale- Returns:
- a list of
IAttribute
-
getCoreAttributesWithFields
Get core user attributes with its attribute fields- Parameters:
locale- theLocale- Returns:
- a list of
IAttribute
-
getPluginAttributesWithFields
Get plugin user attributes with its attribute fields- Parameters:
strPluginName- the plugin namelocale- theLocale- Returns:
- a list of
IAttribute
-
setAttributeFields
Set the attribute fields from a given list ofIAttribute- Parameters:
listAttributes- the list ofIAttribute
-
setAttributeField
Set the attribute field from a givenIAttribute- Parameters:
attribute- theIAttribute
-
createAttribute
Create a new attribute and its attribute field.- Parameters:
attribute- theIAttributeto create
-
updateAttribute
Update the attribute- Parameters:
attribute- theIAttributeto update
-
removeAttribute
public void removeAttribute(int nIdAttribute) Remove the attribute from a given attribute ID- Parameters:
nIdAttribute- the ID attribute
-
updateAnonymizationStatusUserField
public void updateAnonymizationStatusUserField(int nIdAttribute, boolean bAnonymize) Update the anonymization status of the attribute.- Parameters:
nIdAttribute- Id of the attributebAnonymize- New value of the anonymization status. True means the attribute should be anonymize, false means it doesn't.
-
@Injectto obtain theAttributeServiceinstance.