Class AttributeHome
- java.lang.Object
-
- fr.paris.lutece.plugins.mylutece.business.attribute.AttributeHome
-
public class AttributeHome extends java.lang.ObjectAttributeHome
-
-
Constructor Summary
Constructors Constructor Description AttributeHome()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddAnonymizationStatusUserField(java.lang.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 java.util.List<IAttribute>findAll(java.util.Locale locale, fr.paris.lutece.portal.service.plugin.Plugin plugin)Load every attributesstatic IAttributefindByPrimaryKey(int nIdAttribute, java.util.Locale locale, fr.paris.lutece.portal.service.plugin.Plugin plugin)Load attributestatic java.util.List<IAttribute>findMyLuteceAttributes(java.util.Locale locale, fr.paris.lutece.portal.service.plugin.Plugin plugin)Load every attributes that do not come from a pluginstatic java.util.List<IAttribute>findPluginAttributes(java.lang.String strPluginName, java.util.Locale locale, fr.paris.lutece.portal.service.plugin.Plugin plugin)Load every attributes associated to a pluginstatic java.util.Map<java.lang.String,java.lang.Boolean>getAnonymizationStatusUserStaticField(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(java.lang.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(java.lang.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.
-
-
-
Method Detail
-
findByPrimaryKey
public static IAttribute findByPrimaryKey(int nIdAttribute, java.util.Locale locale, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load attribute- Parameters:
nIdAttribute- ID Attributelocale- Localeplugin- The plugin- Returns:
- Attribute
-
create
public static int create(IAttribute attribute, fr.paris.lutece.portal.service.plugin.Plugin plugin)
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 java.util.List<IAttribute> findAll(java.util.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 java.util.List<IAttribute> findPluginAttributes(java.lang.String strPluginName, java.util.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 java.util.List<IAttribute> findMyLuteceAttributes(java.util.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 java.util.Map<java.lang.String,java.lang.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(java.lang.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(java.lang.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(java.lang.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
-
-