Class AttributeHome


  • public class AttributeHome
    extends java.lang.Object
    AttributeHome
    • Constructor Summary

      Constructors 
      Constructor Description
      AttributeHome()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      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.
      static int create​(IAttribute attribute, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Insert an new attribute
      static java.util.List<IAttribute> findAll​(java.util.Locale locale, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load every attributes
      static IAttribute findByPrimaryKey​(int nIdAttribute, java.util.Locale locale, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load attribute
      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
      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
      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.
      static void remove​(int nIdAttribute, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Delete an attribute
      static void removeAnonymizationStatusUserField​(java.lang.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​(java.lang.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

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AttributeHome

        public AttributeHome()
    • 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 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 java.util.List<IAttribute> findAll​(java.util.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 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 name
        locale - locale
        plugin - 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 - 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 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 field
        bAnonymizeFiled - True if the field should be anonymize, false otherwise
        plugin - 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 field
        plugin - 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 update
        bAnonymizeFiled - True if the field should be anonymize, false otherwise
        plugin - The plugin