Class CRMUserAttributesService
java.lang.Object
fr.paris.lutece.plugins.crm.service.user.CRMUserAttributesService
- All Implemented Interfaces:
fr.paris.lutece.portal.service.security.UserAttributesService
public final class CRMUserAttributesService
extends Object
implements fr.paris.lutece.portal.service.security.UserAttributesService
CRMUserAttributesService
-
Method Summary
Modifier and TypeMethodDescriptionvoidCreate a new user attributegetAttribute(String strUserId, String strAttribute) getAttributes(int nIdCRMUser) Get the user attributes from a given id crm usergetAttributes(String strUserId) static CRMUserAttributesServiceGet the instance of CRMUserAttributesServicegetUserAttributeKeyLabels(Locale locale) Gets the user attribute key labels.Get the list of user attribute keys defined in crm.propertiesbooleanisAttributeValueInUse(String strAttributeValue, String strUserAttributeKey) Check if a value of an attribute is used by a user for a given attribute keyvoidremove(int nIdCRMUser) Remove the user attributes of the crm uservoidsetCRMUserService(CRMUserService crmUserService) Set the CRMUserService
-
Method Details
-
getService
Get the instance of CRMUserAttributesService- Returns:
- the instance of
CRMUserAttributesService
-
setCRMUserService
Set the CRMUserService- Parameters:
crmUserService- the CRMUserService
-
getAttribute
- Specified by:
getAttributein interfacefr.paris.lutece.portal.service.security.UserAttributesService
-
getAttributes
- Specified by:
getAttributesin interfacefr.paris.lutece.portal.service.security.UserAttributesService
-
getAttributes
Get the user attributes from a given id crm user- Parameters:
nIdCRMUser- the id crm user- Returns:
- a map of user attribute key, user attribute value
-
remove
public void remove(int nIdCRMUser) Remove the user attributes of the crm user- Parameters:
nIdCRMUser- the id crm user
-
create
Create a new user attribute- Parameters:
nIdCRMUser- the id crm userstrUserAttributeKey- the user attribute keystrUserAttributeValue- the user attribute value
-
getUserAttributeKeys
Get the list of user attribute keys defined in crm.properties- Returns:
- a list of user attribute keys
-
getUserAttributeKeyLabels
Gets the user attribute key labels.- Parameters:
locale- the locale- Returns:
- the user attribute key labels
-
isAttributeValueInUse
Check if a value of an attribute is used by a user for a given attribute key- Parameters:
strUserAttributeValue- The value of the attributestrUserAttributeKey- The key of the attribute- Returns:
- True if a user has an attribute matching the given key and value, false otherwise. Also return false if the given attribute key is null or empty.
-