Class AttributeHome
java.lang.Object
fr.paris.lutece.plugins.mylutece.business.attribute.AttributeHome
AttributeHome
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddAnonymizationStatusUserField(String strFieldName, boolean bAnonymizeFiled, fr.paris.lutece.portal.service.plugin.Plugin plugin) Add an anonymization status to a user field.static intcreate(IAttribute attribute, fr.paris.lutece.portal.service.plugin.Plugin plugin) Insert an new attributestatic List<IAttribute>Load every attributesstatic IAttributefindByPrimaryKey(int nIdAttribute, Locale locale, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load attributestatic List<IAttribute>findMyLuteceAttributes(Locale locale, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load every attributes that do not come from a pluginstatic List<IAttribute>findPluginAttributes(String strPluginName, Locale locale, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load every attributes associated to a plugingetAnonymizationStatusUserStaticField(fr.paris.lutece.portal.service.plugin.Plugin plugin) Get a map of anonymization status of a user field.static voidremove(int nIdAttribute, fr.paris.lutece.portal.service.plugin.Plugin plugin) Delete an attributestatic voidremoveAnonymizationStatusUserField(String strFieldName, fr.paris.lutece.portal.service.plugin.Plugin plugin) Remove an anonymization status of a user field.static voidupdate(IAttribute attribute, fr.paris.lutece.portal.service.plugin.Plugin plugin) Update an attributestatic voidupdateAnonymizationStatusUserStaticField(String strFieldName, boolean bAnonymizeFiled, fr.paris.lutece.portal.service.plugin.Plugin plugin) Update the anonymization status of a user field.static voidupdateAttributeAnonymization(int nIdAttribute, boolean bAnonymize, fr.paris.lutece.portal.service.plugin.Plugin plugin) Update the anonymization status of the attribute.
-
Constructor Details
-
AttributeHome
public AttributeHome()
-
-
Method Details
-
findByPrimaryKey
public static IAttribute findByPrimaryKey(int nIdAttribute, Locale locale, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load attribute- Parameters:
nIdAttribute- ID Attributelocale- Localeplugin- The plugin- Returns:
- Attribute
-
create
Insert an new attribute- Parameters:
attribute- attributeplugin- The plugin- Returns:
- new PK
-
update
public static void update(IAttribute attribute, fr.paris.lutece.portal.service.plugin.Plugin plugin) Update an attribute- Parameters:
attribute- the attributeplugin- The plugin
-
remove
public static void remove(int nIdAttribute, fr.paris.lutece.portal.service.plugin.Plugin plugin) Delete an attribute- Parameters:
nIdAttribute- The id of the attributeplugin- The plugin
-
findAll
public static List<IAttribute> findAll(Locale locale, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load every attributes- Parameters:
locale- localeplugin- The plugin- Returns:
- list of attributes
-
findPluginAttributes
public static List<IAttribute> findPluginAttributes(String strPluginName, Locale locale, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load every attributes associated to a plugin- Parameters:
strPluginName- plugin namelocale- localeplugin- The plugin- Returns:
- list of attributes
-
findMyLuteceAttributes
public static List<IAttribute> findMyLuteceAttributes(Locale locale, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load every attributes that do not come from a plugin- Parameters:
locale- localeplugin- The plugin- Returns:
- list of attributes
-
updateAttributeAnonymization
public static void updateAttributeAnonymization(int nIdAttribute, boolean bAnonymize, fr.paris.lutece.portal.service.plugin.Plugin plugin) 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.plugin- The plugin
-
getAnonymizationStatusUserStaticField
public static Map<String,Boolean> getAnonymizationStatusUserStaticField(fr.paris.lutece.portal.service.plugin.Plugin plugin) Get a map of anonymization status of a user field.- Parameters:
plugin- The plugin- Returns:
- A map containing the associations of user field name and a boolean describing whether the field should be anonymized.
-
addAnonymizationStatusUserField
public static void addAnonymizationStatusUserField(String strFieldName, boolean bAnonymizeFiled, fr.paris.lutece.portal.service.plugin.Plugin plugin) Add an anonymization status to a user field.- Parameters:
strFieldName- Name of the fieldbAnonymizeFiled- True if the field should be anonymize, false otherwiseplugin- The plugin
-
removeAnonymizationStatusUserField
public static void removeAnonymizationStatusUserField(String strFieldName, fr.paris.lutece.portal.service.plugin.Plugin plugin) Remove an anonymization status of a user field.- Parameters:
strFieldName- Name of the fieldplugin- The plugin
-
updateAnonymizationStatusUserStaticField
public static void updateAnonymizationStatusUserStaticField(String strFieldName, boolean bAnonymizeFiled, fr.paris.lutece.portal.service.plugin.Plugin plugin) Update the anonymization status of a user field.- Parameters:
strFieldName- Name of the field to updatebAnonymizeFiled- True if the field should be anonymize, false otherwiseplugin- The plugin
-