Class AttributeDAO

  • All Implemented Interfaces:
    IAttributeDAO

    public class AttributeDAO
    extends java.lang.Object
    implements IAttributeDAO
    AttributeDAO
    • Constructor Summary

      Constructors 
      Constructor Description
      AttributeDAO()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addAnonymizationStatusUserField​(java.lang.String strFieldName, boolean bAnonymizeFiled, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Add an anonymization status to a user field.
      void delete​(int nIdAttribute, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Delete an attribute
      int insert​(IAttribute attribute, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Insert a new attribute
      IAttribute load​(int nIdAttribute, java.util.Locale locale, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load attribute
      void removeAnonymizationStatusUserField​(java.lang.String strFieldName, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Remove an anonymization status to a user field.
      java.util.List<IAttribute> selectAll​(java.util.Locale locale, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load every attributes
      java.util.Map<java.lang.String,​java.lang.Boolean> selectAnonymizationStatusUserStaticField​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Get the anonymization status of a user field.
      java.util.List<IAttribute> selectMyLuteceAttributes​(java.util.Locale locale, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load every attributes that do not come from a plugin
      java.util.List<IAttribute> selectPluginAttributes​(java.lang.String strPluginName, java.util.Locale locale, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load every attributes from plugin name
      void store​(IAttribute attribute, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Update an attribute
      void updateAnonymizationStatusUserStaticField​(java.lang.String strFieldName, boolean bAnonymizeFiled, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Update the anonymization status of a user field.
      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

      • AttributeDAO

        public AttributeDAO()
    • Method Detail

      • load

        public IAttribute load​(int nIdAttribute,
                               java.util.Locale locale,
                               fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Load attribute
        Specified by:
        load in interface IAttributeDAO
        Parameters:
        nIdAttribute - ID
        locale - Locale
        plugin - The plugin
        Returns:
        Attribute
      • insert

        public int insert​(IAttribute attribute,
                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Insert a new attribute
        Specified by:
        insert in interface IAttributeDAO
        Parameters:
        attribute - the attribute
        plugin - The plugin
        Returns:
        new PK
      • store

        public void store​(IAttribute attribute,
                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Update an attribute
        Specified by:
        store in interface IAttributeDAO
        Parameters:
        attribute - the attribute
        plugin - The plugin
      • delete

        public void delete​(int nIdAttribute,
                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Delete an attribute
        Specified by:
        delete in interface IAttributeDAO
        Parameters:
        nIdAttribute - the ID of the attribute
        plugin - The plugin
      • selectAll

        public java.util.List<IAttribute> selectAll​(java.util.Locale locale,
                                                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Load every attributes
        Specified by:
        selectAll in interface IAttributeDAO
        Parameters:
        locale - locale
        plugin - The plugin
        Returns:
        list of attributes
      • selectPluginAttributes

        public java.util.List<IAttribute> selectPluginAttributes​(java.lang.String strPluginName,
                                                                 java.util.Locale locale,
                                                                 fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Load every attributes from plugin name
        Specified by:
        selectPluginAttributes in interface IAttributeDAO
        Parameters:
        strPluginName - plugin name
        locale - locale
        plugin - The plugin
        Returns:
        list of attributes
      • selectMyLuteceAttributes

        public java.util.List<IAttribute> selectMyLuteceAttributes​(java.util.Locale locale,
                                                                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Load every attributes that do not come from a plugin
        Specified by:
        selectMyLuteceAttributes in interface IAttributeDAO
        Parameters:
        locale - locale
        plugin - 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:
        updateAttributeAnonymization in interface IAttributeDAO
        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
      • selectAnonymizationStatusUserStaticField

        public java.util.Map<java.lang.String,​java.lang.Boolean> selectAnonymizationStatusUserStaticField​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Get the anonymization status of a user field.
        Specified by:
        selectAnonymizationStatusUserStaticField in interface IAttributeDAO
        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​(java.lang.String strFieldName,
                                                    boolean bAnonymizeFiled,
                                                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Add an anonymization status to a user field.
        Specified by:
        addAnonymizationStatusUserField in interface IAttributeDAO
        Parameters:
        strFieldName - Name of the field
        bAnonymizeFiled - True if the field should be anonymize, false otherwise
        plugin - The plugin
      • removeAnonymizationStatusUserField

        public void removeAnonymizationStatusUserField​(java.lang.String strFieldName,
                                                       fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Remove an anonymization status to a user field.
        Specified by:
        removeAnonymizationStatusUserField in interface IAttributeDAO
        Parameters:
        strFieldName - Name of the field
        plugin - The plugin
      • updateAnonymizationStatusUserStaticField

        public void updateAnonymizationStatusUserStaticField​(java.lang.String strFieldName,
                                                             boolean bAnonymizeFiled,
                                                             fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Update the anonymization status of a user field.
        Specified by:
        updateAnonymizationStatusUserStaticField in interface IAttributeDAO
        Parameters:
        strFieldName - Name of the field to update
        bAnonymizeFiled - True if the field should be anonymize, false otherwise
        plugin - The plugin