Package lumis.portal.user
Class UserAttributeManager
- java.lang.Object
-
- lumis.portal.user.UserAttributeManager
-
- All Implemented Interfaces:
IUserAttributeManagerSPI
public class UserAttributeManager extends java.lang.Object implements IUserAttributeManagerSPI
IUserAttributeManagerSPI
implementation.- Since:
- 11.0.0
- Version:
- $Revision$ $Date$
-
-
Constructor Summary
Constructors Constructor Description UserAttributeManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearAllUserAttributesCache()
Clears internal cache ofUserAttribute
maintained by this manager.void
deleServiceInstanceAttributes(java.lang.String serviceInstanceId)
Delete all user attribute from the given service instance.java.util.Collection<UserAttribute>
getAvailableUserAttributes(ServiceInstanceConfig serviceInstance, ITransaction transaction)
Returns all user attributes that the service instance ha permission to use.java.util.Collection<UserAttribute>
getIdentifyUserAttributes()
Returns all attributes that identify user.java.util.Optional<UserAttribute>
getUserAttribute(java.lang.String serviceInstanceId, java.lang.String attributeKey)
Returns an unmodifiable user attribute.java.util.Map<java.lang.String,java.util.Map<java.lang.String,UserAttribute>>
getUserAttributesByServiceInstance()
Returns an unmodifiable map with a unmodifiable implementation of all defineduser attributes
.java.util.Map<java.lang.String,UserAttribute>
getUserAttributesByUserAttributeId()
Returns the all user attributes mapped by user attribute identifier.java.util.Map<java.lang.String,? extends UserAttribute>
getUserAttributesMap()
Returns an unmodifiable map with a unmodifiable implementation of all global defineduser attributes
.boolean
isUserAttributeAvailable(java.lang.String serviceInstanceId, UserAttribute userAttribute)
Check if given service instance has permission to use the given user attribute.
-
-
-
Method Detail
-
getUserAttributesByServiceInstance
public java.util.Map<java.lang.String,java.util.Map<java.lang.String,UserAttribute>> getUserAttributesByServiceInstance()
Description copied from interface:IUserAttributeManagerSPI
Returns an unmodifiable map with a unmodifiable implementation of all defineduser attributes
. This map may not reflect changes on the current transaction.- Specified by:
getUserAttributesByServiceInstance
in interfaceIUserAttributeManagerSPI
- Returns:
- the map.
-
getUserAttributesByUserAttributeId
public java.util.Map<java.lang.String,UserAttribute> getUserAttributesByUserAttributeId()
Description copied from interface:IUserAttributeManagerSPI
Returns the all user attributes mapped by user attribute identifier.- Specified by:
getUserAttributesByUserAttributeId
in interfaceIUserAttributeManagerSPI
- Returns:
- the all user attributes mapped by user attribute identifier.
-
getUserAttributesMap
public java.util.Map<java.lang.String,? extends UserAttribute> getUserAttributesMap()
Description copied from interface:IUserAttributeManagerSPI
Returns an unmodifiable map with a unmodifiable implementation of all global defineduser attributes
. Global user attributes are attribute not related to a service instance. This map may not reflect changes on the current transaction.- Specified by:
getUserAttributesMap
in interfaceIUserAttributeManagerSPI
- Returns:
- an unmodifiable map with a unmodifiable implementation of all global defined
user attributes
.
-
clearAllUserAttributesCache
public void clearAllUserAttributesCache()
Description copied from interface:IUserAttributeManagerSPI
Clears internal cache ofUserAttribute
maintained by this manager. If there is a transaction active, the clearing will be applied after its commit.- Specified by:
clearAllUserAttributesCache
in interfaceIUserAttributeManagerSPI
-
deleServiceInstanceAttributes
public void deleServiceInstanceAttributes(java.lang.String serviceInstanceId)
Description copied from interface:IUserAttributeManagerSPI
Delete all user attribute from the given service instance.- Specified by:
deleServiceInstanceAttributes
in interfaceIUserAttributeManagerSPI
- Parameters:
serviceInstanceId
- the service instance identifier.
-
getUserAttribute
public java.util.Optional<UserAttribute> getUserAttribute(java.lang.String serviceInstanceId, java.lang.String attributeKey)
Description copied from interface:IUserAttributeManagerSPI
Returns an unmodifiable user attribute.- Specified by:
getUserAttribute
in interfaceIUserAttributeManagerSPI
- Parameters:
serviceInstanceId
- the service instance identifier.attributeKey
- the local attribute identifier.- Returns:
- an unmodifiable user attribute.
-
getIdentifyUserAttributes
public java.util.Collection<UserAttribute> getIdentifyUserAttributes()
Description copied from interface:IUserAttributeManagerSPI
Returns all attributes that identify user.- Specified by:
getIdentifyUserAttributes
in interfaceIUserAttributeManagerSPI
- Returns:
- all attributes that identify user.
-
getAvailableUserAttributes
public java.util.Collection<UserAttribute> getAvailableUserAttributes(ServiceInstanceConfig serviceInstance, ITransaction transaction) throws PortalException
Description copied from interface:IUserAttributeManagerSPI
Returns all user attributes that the service instance ha permission to use.- Specified by:
getAvailableUserAttributes
in interfaceIUserAttributeManagerSPI
- Parameters:
serviceInstance
- the service instance.transaction
- the transaction.- Returns:
- all user attributes that the service instance ha permission to use.
- Throws:
PortalException
-
isUserAttributeAvailable
public boolean isUserAttributeAvailable(java.lang.String serviceInstanceId, UserAttribute userAttribute)
Description copied from interface:IUserAttributeManagerSPI
Check if given service instance has permission to use the given user attribute.- Specified by:
isUserAttributeAvailable
in interfaceIUserAttributeManagerSPI
- Parameters:
serviceInstanceId
- the service instance identifier.userAttribute
- the user attribute.- Returns:
- true if given service instance has permission to use the given user attribute.
-
-