|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.crowd.model.user.UserTemplate com.atlassian.crowd.model.user.UserTemplateWithAttributes
public class UserTemplateWithAttributes
Mutable user template with mutable attributes.
Constructor Summary | |
---|---|
|
UserTemplateWithAttributes(String username,
long directoryId)
|
protected |
UserTemplateWithAttributes(User user)
|
|
UserTemplateWithAttributes(UserWithAttributes user)
Creates new UserTemplateWithAttributes based on the given user with attributes. |
Method Summary | |
---|---|
Map<String,Set<String>> |
getAttributes()
|
Set<String> |
getKeys()
Gets all the keys of the attributes. |
String |
getValue(String name)
Returns any value associated with the given key, returns null if there is no value. |
Set<String> |
getValues(String name)
Get all the values associated with a given key. |
boolean |
isEmpty()
|
static UserTemplateWithAttributes |
ofUserWithNoAttributes(User user)
Creates new UserTemplateWithAttributes based on the given user with empty attributes. |
void |
removeAttribute(String name)
|
void |
setAttribute(String name,
Set<String> values)
|
void |
setAttribute(String name,
String value)
|
Methods inherited from class com.atlassian.crowd.model.user.UserTemplate |
---|
compareTo, equals, getDirectoryId, getDisplayName, getEmailAddress, getFirstName, getLastName, getName, hashCode, isActive, setActive, setDirectoryId, setDisplayName, setEmailAddress, setFirstName, setLastName, setName, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.atlassian.crowd.model.user.User |
---|
getFirstName, getLastName |
Methods inherited from interface com.atlassian.crowd.model.DirectoryEntity |
---|
equals, getDirectoryId, getName, hashCode |
Methods inherited from interface com.atlassian.crowd.embedded.api.User |
---|
compareTo, equals, getDirectoryId, getDisplayName, getEmailAddress, hashCode, isActive |
Constructor Detail |
---|
public UserTemplateWithAttributes(String username, long directoryId)
public UserTemplateWithAttributes(UserWithAttributes user)
user
- user to use as a templateprotected UserTemplateWithAttributes(User user)
Method Detail |
---|
public static UserTemplateWithAttributes ofUserWithNoAttributes(User user)
user
- user to use as a template
public Map<String,Set<String>> getAttributes()
public Set<String> getValues(String name)
Attributes
getValues
in interface Attributes
name
- the key to retrieve the values for
public String getValue(String name)
Attributes
null
if there is no value.
getValue
in interface Attributes
name
- the key to retrieve the value for
null
if there is no valuepublic Set<String> getKeys()
Attributes
getKeys
in interface Attributes
public boolean isEmpty()
isEmpty
in interface Attributes
true
if there are no attributespublic void setAttribute(String name, String value)
public void setAttribute(String name, Set<String> values)
public void removeAttribute(String name)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |