com.atlassian.crowd.model.user
Class UserTemplateWithAttributes

java.lang.Object
  extended by com.atlassian.crowd.model.user.UserTemplate
      extended by com.atlassian.crowd.model.user.UserTemplateWithAttributes
All Implemented Interfaces:
Attributes, User, UserWithAttributes, DirectoryEntity, java.io.Serializable, java.lang.Comparable<User>, java.security.Principal
Direct Known Subclasses:
UserTemplateWithCredentialAndAttributes

public class UserTemplateWithAttributes
extends UserTemplate
implements UserWithAttributes

Mutable user template with mutable attributes.

See Also:
Serialized Form

Constructor Summary
  UserTemplateWithAttributes(java.lang.String username, long directoryId)
           
protected UserTemplateWithAttributes(User user)
           
  UserTemplateWithAttributes(UserWithAttributes user)
          Creates new UserTemplateWithAttributes based on the given user with attributes.
 
Method Summary
 java.util.Map<java.lang.String,java.util.Set<java.lang.String>> getAttributes()
           
 java.util.Set<java.lang.String> getKeys()
           
 java.lang.String getValue(java.lang.String name)
           
 java.util.Set<java.lang.String> getValues(java.lang.String name)
           
 boolean isEmpty()
           
static UserTemplateWithAttributes ofUserWithNoAttributes(User user)
          Creates new UserTemplateWithAttributes based on the given user with empty attributes.
 void removeAttribute(java.lang.String name)
           
 void setAttribute(java.lang.String name, java.util.Set<java.lang.String> values)
           
 void setAttribute(java.lang.String name, java.lang.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

UserTemplateWithAttributes

public UserTemplateWithAttributes(java.lang.String username,
                                  long directoryId)

UserTemplateWithAttributes

public UserTemplateWithAttributes(UserWithAttributes user)
Creates new UserTemplateWithAttributes based on the given user with attributes.

Parameters:
user - user to use as a template

UserTemplateWithAttributes

protected UserTemplateWithAttributes(User user)
Method Detail

ofUserWithNoAttributes

public static UserTemplateWithAttributes ofUserWithNoAttributes(User user)
Creates new UserTemplateWithAttributes based on the given user with empty attributes.

Parameters:
user - user to use as a template
Returns:
UserTemplateWithAttributes based on the given user with empty attributes

getAttributes

public java.util.Map<java.lang.String,java.util.Set<java.lang.String>> getAttributes()

getValues

public java.util.Set<java.lang.String> getValues(java.lang.String name)
Specified by:
getValues in interface Attributes

getValue

public java.lang.String getValue(java.lang.String name)
Specified by:
getValue in interface Attributes

getKeys

public java.util.Set<java.lang.String> getKeys()
Specified by:
getKeys in interface Attributes

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Attributes

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.String value)

setAttribute

public void setAttribute(java.lang.String name,
                         java.util.Set<java.lang.String> values)

removeAttribute

public void removeAttribute(java.lang.String name)


Copyright © 2012 Atlassian. All Rights Reserved.