Class AttributeService

java.lang.Object
fr.paris.lutece.portal.service.user.attribute.AttributeService

public final class AttributeService extends Object
AttributeService
  • Method Details

    • getInstance

      public static AttributeService getInstance()
      Get the instance of AttributeService
      Returns:
      an instance of AttributeService
    • getAttributeWithoutFields

      public IAttribute getAttributeWithoutFields(int nIdAttribute, Locale locale)
      Get an attribute without its attribute fields
      Parameters:
      nIdAttribute - the id attribute
      locale - Locale
      Returns:
      a IAttribute
    • getAttributeWithFields

      public IAttribute getAttributeWithFields(int nIdAttribute, Locale locale)
      Get the attribute with its attribute fields
      Parameters:
      nIdAttribute - the id attribute
      locale - the Locale
      Returns:
      a IAttribute
    • getAllAttributesWithoutFields

      public List<IAttribute> getAllAttributesWithoutFields(Locale locale)
      Get all user attribute without its attribute fields.
      Parameters:
      locale - the Locale
      Returns:
      a list of IAttribute
    • getCoreAttributesWithoutFields

      public List<IAttribute> getCoreAttributesWithoutFields(Locale locale)
      Get core user attribute without its attribute fields
      Parameters:
      locale - the Locale
      Returns:
      a list of IAttribute
    • getPluginAttributesWithoutFields

      public List<IAttribute> getPluginAttributesWithoutFields(String strPluginName, Locale locale)
      Get plugin user attribute without its attribute fields
      Parameters:
      strPluginName - the plugin name
      locale - the Locale
      Returns:
      a list of IAttribute
    • getAllAttributesWithFields

      public List<IAttribute> getAllAttributesWithFields(Locale locale)
      Get all user attributes with its attribute fields
      Parameters:
      locale - the Locale
      Returns:
      a list of IAttribute
    • getCoreAttributesWithFields

      public List<IAttribute> getCoreAttributesWithFields(Locale locale)
      Get core user attributes with its attribute fields
      Parameters:
      locale - the Locale
      Returns:
      a list of IAttribute
    • getPluginAttributesWithFields

      public List<IAttribute> getPluginAttributesWithFields(String strPluginName, Locale locale)
      Get plugin user attributes with its attribute fields
      Parameters:
      strPluginName - the plugin name
      locale - the Locale
      Returns:
      a list of IAttribute
    • setAttributeFields

      public void setAttributeFields(List<IAttribute> listAttributes)
      Set the attribute fields from a given list of IAttribute
      Parameters:
      listAttributes - the list of IAttribute
    • setAttributeField

      public void setAttributeField(IAttribute attribute)
      Set the attribute field from a given IAttribute
      Parameters:
      attribute - the IAttribute
    • createAttribute

      public void createAttribute(IAttribute attribute)
      Create a new attribute and its attribute field.
      Parameters:
      attribute - the IAttribute to create
    • updateAttribute

      public void updateAttribute(IAttribute attribute)
      Update the attribute
      Parameters:
      attribute - the IAttribute to update
    • removeAttribute

      public void removeAttribute(int nIdAttribute)
      Remove the attribute from a given attribute ID
      Parameters:
      nIdAttribute - the ID attribute
    • updateAnonymizationStatusUserField

      public void updateAnonymizationStatusUserField(int nIdAttribute, boolean bAnonymize)
      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.