public final class AttributeService extends Object
Modifier and Type | Method and Description |
---|---|
void |
createAttribute(IAttribute attribute)
Create a new attribute and its attribute field.
|
List<IAttribute> |
getAllAttributesWithFields(Locale locale)
Get all user attributes with its attribute fields
|
List<IAttribute> |
getAllAttributesWithoutFields(Locale locale)
Get all user attribute without its attribute fields.
|
IAttribute |
getAttributeWithFields(int nIdAttribute,
Locale locale)
Get the attribute with its attribute fields
|
IAttribute |
getAttributeWithoutFields(int nIdAttribute,
Locale locale)
Get an attribute without its attribute fields
|
List<IAttribute> |
getCoreAttributesWithFields(Locale locale)
Get core user attributes with its attribute fields
|
List<IAttribute> |
getCoreAttributesWithoutFields(Locale locale)
Get core user attribute without its attribute fields
|
static AttributeService |
getInstance()
Get the instance of
AttributeService |
List<IAttribute> |
getPluginAttributesWithFields(String strPluginName,
Locale locale)
Get plugin user attributes with its attribute fields
|
List<IAttribute> |
getPluginAttributesWithoutFields(String strPluginName,
Locale locale)
Get plugin user attribute without its attribute fields
|
void |
removeAttribute(int nIdAttribute)
Remove the attribute from a given attribute ID
|
void |
setAttributeField(IAttribute attribute)
Set the attribute field from a given
IAttribute |
void |
setAttributeFields(List<IAttribute> listAttributes)
Set the attribute fields from a given list of
IAttribute |
void |
updateAnonymizationStatusUserField(int nIdAttribute,
boolean bAnonymize)
Update the anonymization status of the attribute.
|
void |
updateAttribute(IAttribute attribute)
Update the attribute
|
public static AttributeService getInstance()
AttributeService
AttributeService
public IAttribute getAttributeWithoutFields(int nIdAttribute, Locale locale)
nIdAttribute
- the id attributelocale
- Locale
IAttribute
public IAttribute getAttributeWithFields(int nIdAttribute, Locale locale)
nIdAttribute
- the id attributelocale
- the Locale
IAttribute
public List<IAttribute> getAllAttributesWithoutFields(Locale locale)
locale
- the Locale
IAttribute
public List<IAttribute> getCoreAttributesWithoutFields(Locale locale)
locale
- the Locale
IAttribute
public List<IAttribute> getPluginAttributesWithoutFields(String strPluginName, Locale locale)
strPluginName
- the plugin namelocale
- the Locale
IAttribute
public List<IAttribute> getAllAttributesWithFields(Locale locale)
locale
- the Locale
IAttribute
public List<IAttribute> getCoreAttributesWithFields(Locale locale)
locale
- the Locale
IAttribute
public List<IAttribute> getPluginAttributesWithFields(String strPluginName, Locale locale)
strPluginName
- the plugin namelocale
- the Locale
IAttribute
public void setAttributeFields(List<IAttribute> listAttributes)
IAttribute
listAttributes
- the list of IAttribute
public void setAttributeField(IAttribute attribute)
IAttribute
attribute
- the IAttribute
public void createAttribute(IAttribute attribute)
attribute
- the IAttribute
to createpublic void updateAttribute(IAttribute attribute)
attribute
- the IAttribute
to updatepublic void removeAttribute(int nIdAttribute)
nIdAttribute
- the ID attributepublic void updateAnonymizationStatusUserField(int nIdAttribute, boolean bAnonymize)
nIdAttribute
- Id of the attributebAnonymize
- New value of the anonymization status. True means the attribute should be anonymize, false means it doesn't.Copyright © 2020 City of Paris. All rights reserved.