Class AttributeDAO
java.lang.Object
fr.paris.lutece.plugins.mylutece.business.attribute.AttributeDAO
- All Implemented Interfaces:
IAttributeDAO
AttributeDAO
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAnonymizationStatusUserField(String strFieldName, boolean bAnonymizeFiled, fr.paris.lutece.portal.service.plugin.Plugin plugin) Add an anonymization status to a user field.voiddelete(int nIdAttribute, fr.paris.lutece.portal.service.plugin.Plugin plugin) Delete an attributeintinsert(IAttribute attribute, fr.paris.lutece.portal.service.plugin.Plugin plugin) Insert a new attributeLoad attributevoidremoveAnonymizationStatusUserField(String strFieldName, fr.paris.lutece.portal.service.plugin.Plugin plugin) Remove an anonymization status to a user field.Load every attributesselectAnonymizationStatusUserStaticField(fr.paris.lutece.portal.service.plugin.Plugin plugin) Get the anonymization status of a user field.selectMyLuteceAttributes(Locale locale, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load every attributes that do not come from a pluginselectPluginAttributes(String strPluginName, Locale locale, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load every attributes from plugin namevoidstore(IAttribute attribute, fr.paris.lutece.portal.service.plugin.Plugin plugin) Update an attributevoidupdateAnonymizationStatusUserStaticField(String strFieldName, boolean bAnonymizeFiled, fr.paris.lutece.portal.service.plugin.Plugin plugin) Update the anonymization status of a user field.voidupdateAttributeAnonymization(int nIdAttribute, boolean bAnonymize, fr.paris.lutece.portal.service.plugin.Plugin plugin) Update the anonymization status of the attribute.
-
Constructor Details
-
AttributeDAO
public AttributeDAO()
-
-
Method Details
-
load
public IAttribute load(int nIdAttribute, Locale locale, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load attribute- Specified by:
loadin interfaceIAttributeDAO- Parameters:
nIdAttribute- IDlocale- Localeplugin- The plugin- Returns:
- Attribute
-
insert
Insert a new attribute- Specified by:
insertin interfaceIAttributeDAO- Parameters:
attribute- the attributeplugin- The plugin- Returns:
- new PK
-
store
Update an attribute- Specified by:
storein interfaceIAttributeDAO- Parameters:
attribute- the attributeplugin- The plugin
-
delete
public void delete(int nIdAttribute, fr.paris.lutece.portal.service.plugin.Plugin plugin) Delete an attribute- Specified by:
deletein interfaceIAttributeDAO- Parameters:
nIdAttribute- the ID of the attributeplugin- The plugin
-
selectAll
public List<IAttribute> selectAll(Locale locale, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load every attributes- Specified by:
selectAllin interfaceIAttributeDAO- Parameters:
locale- localeplugin- The plugin- Returns:
- list of attributes
-
selectPluginAttributes
public List<IAttribute> selectPluginAttributes(String strPluginName, Locale locale, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load every attributes from plugin name- Specified by:
selectPluginAttributesin interfaceIAttributeDAO- Parameters:
strPluginName- plugin namelocale- localeplugin- The plugin- Returns:
- list of attributes
-
selectMyLuteceAttributes
public List<IAttribute> selectMyLuteceAttributes(Locale locale, fr.paris.lutece.portal.service.plugin.Plugin plugin) Load every attributes that do not come from a plugin- Specified by:
selectMyLuteceAttributesin interfaceIAttributeDAO- Parameters:
locale- localeplugin- The plugin- Returns:
- list of attributes
-
updateAttributeAnonymization
public void updateAttributeAnonymization(int nIdAttribute, boolean bAnonymize, fr.paris.lutece.portal.service.plugin.Plugin plugin) Update the anonymization status of the attribute.- Specified by:
updateAttributeAnonymizationin interfaceIAttributeDAO- 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
-
selectAnonymizationStatusUserStaticField
public Map<String,Boolean> selectAnonymizationStatusUserStaticField(fr.paris.lutece.portal.service.plugin.Plugin plugin) Get the anonymization status of a user field.- Specified by:
selectAnonymizationStatusUserStaticFieldin interfaceIAttributeDAO- 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 void addAnonymizationStatusUserField(String strFieldName, boolean bAnonymizeFiled, fr.paris.lutece.portal.service.plugin.Plugin plugin) Add an anonymization status to a user field.- Specified by:
addAnonymizationStatusUserFieldin interfaceIAttributeDAO- Parameters:
strFieldName- Name of the fieldbAnonymizeFiled- True if the field should be anonymize, false otherwiseplugin- The plugin
-
removeAnonymizationStatusUserField
public void removeAnonymizationStatusUserField(String strFieldName, fr.paris.lutece.portal.service.plugin.Plugin plugin) Remove an anonymization status to a user field.- Specified by:
removeAnonymizationStatusUserFieldin interfaceIAttributeDAO- Parameters:
strFieldName- Name of the fieldplugin- The plugin
-
updateAnonymizationStatusUserStaticField
public void updateAnonymizationStatusUserStaticField(String strFieldName, boolean bAnonymizeFiled, fr.paris.lutece.portal.service.plugin.Plugin plugin) Update the anonymization status of a user field.- Specified by:
updateAnonymizationStatusUserStaticFieldin interfaceIAttributeDAO- Parameters:
strFieldName- Name of the field to updatebAnonymizeFiled- True if the field should be anonymize, false otherwiseplugin- The plugin
-