Package com.atlassian.crowd.embedded.api
Interface Attributes
- All Known Subinterfaces:
Directory,GroupWithAttributes,UserWithAttributes
- All Known Implementing Classes:
AbstractDelegatingEntityWithAttributes,DelegatingGroupWithAttributes,DelegatingUserWithAttributes,ImmutableAttributes,ImmutableDirectory
public interface Attributes
Represents attributes that can be associated to users and groups. One attribute key can have multiple values
associated to it.
-
Method Details
-
getValues
Get all the values associated with a given key. Duplicate values are not allowed, and this should be enforced case-insensitively to match the behaviour of LDAP servers. Will return null if the key does not exist.- Parameters:
key- the key to retrieve the values for- Returns:
- the values associated with the given key. It may return null or empty set if the key does not exist.
-
getValue
Returns any value associated with the given key, returnsnullif there is no value.- Parameters:
key- the key to retrieve the value for- Returns:
- any value associated with the given key, or
nullif there is no value
-
getKeys
Gets all the keys of the attributes. Warning: case-insensitive keys are currently no enforced, however this is the case for LDAP, so this may be implemented in the future.- Returns:
- a set of all the keys.
-
isEmpty
boolean isEmpty()- Returns:
trueif there are no attributes
-