fr.paris.lutece.portal.service.user.attribute
Class AttributeService

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

public final class AttributeService
extends Object

AttributeService


Method Summary
 void createAttribute(IAttribute attribute)
          Create a new attribute and its attribute field.
 List<IAttribute> getAllAttributesWithFields(Locale locale)
          Get all user attributes with its attribute fields
 List<IAttribute> getAllAttributesWithoutFields(Locale locale)
          Get all user attribute without its attribute fields.
 IAttribute getAttributeWithFields(int nIdAttribute, Locale locale)
          Get the attribute with its attribute fields
 IAttribute getAttributeWithoutFields(int nIdAttribute, Locale locale)
          Get an attribute without its attribute fields
 List<IAttribute> getCoreAttributesWithFields(Locale locale)
          Get core user attributes with its attribute fields
 List<IAttribute> getCoreAttributesWithoutFields(Locale locale)
          Get core user attribute without its attribute fields
static AttributeService getInstance()
          Get the instance of AttributeService
 List<IAttribute> getPluginAttributesWithFields(String strPluginName, Locale locale)
          Get plugin user attributes with its attribute fields
 List<IAttribute> getPluginAttributesWithoutFields(String strPluginName, Locale locale)
          Get plugin user attribute without its attribute fields
 void removeAttribute(int nIdAttribute)
          Remove the attribute from a given attribute ID
 void setAttributeField(IAttribute attribute)
          Set the attribute field from a given IAttribute
 void setAttributeFields(List<IAttribute> listAttributes)
          Set the attribute fields from a given list of IAttribute
 void updateAnonymizationStatusUserField(int nIdAttribute, boolean bAnonymize)
          Update the anonymization status of the attribute.
 void updateAttribute(IAttribute attribute)
          Update the attribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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.


Copyright © 2014 Mairie de Paris. All Rights Reserved.