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

public class AttributeHome extends Object
AttributeHome
  • 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 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