Class AttributeService
- java.lang.Object
-
- fr.paris.lutece.portal.service.user.attribute.AttributeService
-
public final class AttributeService extends Object
AttributeService
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreateAttribute(IAttribute attribute)Create a new attribute and its attribute field.List<IAttribute>getAllAttributesWithFields(Locale locale)Get all user attributes with its attribute fieldsList<IAttribute>getAllAttributesWithoutFields(Locale locale)Get all user attribute without its attribute fields.IAttributegetAttributeWithFields(int nIdAttribute, Locale locale)Get the attribute with its attribute fieldsIAttributegetAttributeWithoutFields(int nIdAttribute, Locale locale)Get an attribute without its attribute fieldsList<IAttribute>getCoreAttributesWithFields(Locale locale)Get core user attributes with its attribute fieldsList<IAttribute>getCoreAttributesWithoutFields(Locale locale)Get core user attribute without its attribute fieldsstatic AttributeServicegetInstance()Get the instance ofAttributeServiceList<IAttribute>getPluginAttributesWithFields(String strPluginName, Locale locale)Get plugin user attributes with its attribute fieldsList<IAttribute>getPluginAttributesWithoutFields(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 Detail
-
getInstance
public static AttributeService getInstance()
Get the instance ofAttributeService- Returns:
- an instance of
AttributeService
-
getAttributeWithoutFields
public IAttribute getAttributeWithoutFields(int nIdAttribute, Locale locale)
Get an attribute without its attribute fields- Parameters:
nIdAttribute- the id attributelocale-Locale- Returns:
- a
IAttribute
-
getAttributeWithFields
public IAttribute getAttributeWithFields(int nIdAttribute, Locale locale)
Get the attribute with its attribute fields- Parameters:
nIdAttribute- the id attributelocale- theLocale- Returns:
- a
IAttribute
-
getAllAttributesWithoutFields
public List<IAttribute> getAllAttributesWithoutFields(Locale locale)
Get all user attribute without its attribute fields.- Parameters:
locale- theLocale- Returns:
- a list of
IAttribute
-
getCoreAttributesWithoutFields
public List<IAttribute> getCoreAttributesWithoutFields(Locale locale)
Get core user attribute without its attribute fields- Parameters:
locale- theLocale- Returns:
- a list of
IAttribute
-
getPluginAttributesWithoutFields
public List<IAttribute> getPluginAttributesWithoutFields(String strPluginName, Locale locale)
Get plugin user attribute without its attribute fields- Parameters:
strPluginName- the plugin namelocale- theLocale- Returns:
- a list of
IAttribute
-
getAllAttributesWithFields
public List<IAttribute> getAllAttributesWithFields(Locale locale)
Get all user attributes with its attribute fields- Parameters:
locale- theLocale- Returns:
- a list of
IAttribute
-
getCoreAttributesWithFields
public List<IAttribute> getCoreAttributesWithFields(Locale locale)
Get core user attributes with its attribute fields- Parameters:
locale- theLocale- Returns:
- a list of
IAttribute
-
getPluginAttributesWithFields
public List<IAttribute> getPluginAttributesWithFields(String strPluginName, Locale locale)
Get plugin user attributes with its attribute fields- Parameters:
strPluginName- the plugin namelocale- theLocale- Returns:
- a list of
IAttribute
-
setAttributeFields
public void setAttributeFields(List<IAttribute> listAttributes)
Set the attribute fields from a given list ofIAttribute- Parameters:
listAttributes- the list ofIAttribute
-
setAttributeField
public void setAttributeField(IAttribute attribute)
Set the attribute field from a givenIAttribute- Parameters:
attribute- theIAttribute
-
createAttribute
public void createAttribute(IAttribute attribute)
Create a new attribute and its attribute field.- Parameters:
attribute- theIAttributeto create
-
updateAttribute
public void updateAttribute(IAttribute attribute)
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.
-
-