fr.paris.lutece.plugins.mylutece.business.attribute
Class AttributeHome

java.lang.Object
  extended by fr.paris.lutece.plugins.mylutece.business.attribute.AttributeHome

public class AttributeHome
extends Object

AttributeHome


Constructor Summary
AttributeHome()
           
 
Method Summary
static void addAnonymizationStatusUserField(String strFieldName, boolean bAnonymizeFiled, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Add an anonymization status to a user field.
static int create(IAttribute attribute, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert an new attribute
static List<IAttribute> findAll(Locale locale, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load every attributes
static IAttribute findByPrimaryKey(int nIdAttribute, Locale locale, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load attribute
static List<IAttribute> findMyLuteceAttributes(Locale locale, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load every attributes that do not come from a plugin
static List<IAttribute> findPluginAttributes(String strPluginName, Locale locale, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load every attributes associated to a plugin
static Map<String,Boolean> getAnonymizationStatusUserStaticField(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Get a map of anonymization status of a user field.
static void remove(int nIdAttribute, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete an attribute
static void removeAnonymizationStatusUserField(String strFieldName, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Remove an anonymization status of a user field.
static void update(IAttribute attribute, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update an attribute
static void updateAnonymizationStatusUserStaticField(String strFieldName, boolean bAnonymizeFiled, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update the anonymization status of a user field.
static void updateAttributeAnonymization(int nIdAttribute, boolean bAnonymize, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update the anonymization status of the attribute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributeHome

public AttributeHome()
Method Detail

findByPrimaryKey

public static IAttribute findByPrimaryKey(int nIdAttribute,
                                          Locale locale,
                                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load attribute

Parameters:
nIdAttribute - ID Attribute
locale - Locale
plugin - 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 - attribute
plugin - 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 attribute
plugin - 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 attribute
plugin - The plugin

findAll

public static List<IAttribute> findAll(Locale locale,
                                       fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load every attributes

Parameters:
locale - locale
plugin - 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 name
locale - locale
plugin - 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 - locale
plugin - 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 attribute
bAnonymize - 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 field
bAnonymizeFiled - True if the field should be anonymize, false otherwise
plugin - 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 field
plugin - 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 update
bAnonymizeFiled - True if the field should be anonymize, false otherwise
plugin - The plugin


Copyright © 2014 Mairie de Paris. All Rights Reserved.