Package lumis.portal.user
Class UserAttributeManager
- java.lang.Object
-
- lumis.portal.user.UserAttributeManager
-
- All Implemented Interfaces:
IUserAttributeManagerSPI
public class UserAttributeManager extends Object implements IUserAttributeManagerSPI
IUserAttributeManagerSPI
implementation.- Since:
- 11.0.0
- Version:
- $Revision: 24477 $ $Date: 2021-04-28 11:30:36 -0300 (Wed, 28 Apr 2021) $
-
-
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(String serviceInstanceId)
Delete all user attribute from the given service instance.Collection<UserAttribute>
getAvailableUserAttributes(ServiceInstanceConfig serviceInstance, ITransaction transaction)
Returns all user attributes that the service instance ha permission to use.Collection<UserAttribute>
getIdentifyUserAttributes()
Returns all attributes that identify user.Optional<UserAttribute>
getUserAttribute(String serviceInstanceId, String attributeKey)
Returns an unmodifiable user attribute.Map<String,Map<String,UserAttribute>>
getUserAttributesByServiceInstance()
Returns an unmodifiable map with a unmodifiable implementation of all defineduser attributes
.Map<String,UserAttribute>
getUserAttributesByUserAttributeId()
Returns the all user attributes mapped by user attribute identifier.Map<String,? extends UserAttribute>
getUserAttributesMap()
Returns an unmodifiable map with a unmodifiable implementation of all global defineduser attributes
.boolean
isUserAttributeAvailable(String serviceInstanceId, UserAttribute userAttribute)
Check if given service instance has permission to use the given user attribute.
-
-
-
Method Detail
-
getUserAttributesByServiceInstance
public Map<String,Map<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 Map<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 Map<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(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 Optional<UserAttribute> getUserAttribute(String serviceInstanceId, 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 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 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(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.
-
-