Class AttributeService

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

@ApplicationScoped public class AttributeService extends Object
AttributeService
  • Method Details

    • getInstance

      @Deprecated(since="8.0", forRemoval=true) public static AttributeService getInstance()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use @Inject to obtain the AttributeService instance. This method will be removed in future versions.
      Returns the unique instance of the AttributeService service.

      This method is deprecated and is provided for backward compatibility only. For new code, use dependency injection with @Inject to obtain the AttributeService instance instead.

      Returns:
      The unique 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.