com.atlassian.crowd.integration.model.user
Class UserTemplateWithAttributes

java.lang.Object
  extended by com.atlassian.crowd.integration.model.user.UserTemplate
      extended by com.atlassian.crowd.integration.model.user.UserTemplateWithAttributes
All Implemented Interfaces:
AttributeAware, DirectoryEntity, User, UserWithAttributes, Serializable
Direct Known Subclasses:
UserTemplateWithCredentialAndAttributes

public class UserTemplateWithAttributes
extends UserTemplate
implements UserWithAttributes

See Also:
Serialized Form

Constructor Summary
UserTemplateWithAttributes(String username, Long directoryId)
           
UserTemplateWithAttributes(User user)
           
 
Method Summary
 String getAttribute(String name)
           
 Set<String> getAttributeNames()
           
 Map<String,List<String>> getAttributes()
           
 List<String> getAttributes(String name)
           
 boolean hasAttribute(String name)
           
 void setAttribute(String name, List<String> values)
           
 void setAttribute(String name, String value)
           
 
Methods inherited from class com.atlassian.crowd.integration.model.user.UserTemplate
equals, getDirectoryId, getDisplayName, getEmailAddress, getFirstName, getIconLocation, getLastName, getName, hashCode, isActive, setActive, setDirectoryId, setDisplayName, setEmailAddress, setFirstName, setIconLocation, 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.integration.model.user.User
getDisplayName, getEmailAddress, getFirstName, getIconLocation, getLastName, isActive
 
Methods inherited from interface com.atlassian.crowd.integration.model.DirectoryEntity
equals, getDirectoryId, getName, hashCode
 

Constructor Detail

UserTemplateWithAttributes

public UserTemplateWithAttributes(String username,
                                  Long directoryId)

UserTemplateWithAttributes

public UserTemplateWithAttributes(User user)
Method Detail

getAttributes

public Map<String,List<String>> getAttributes()

getAttributes

public List<String> getAttributes(String name)
Specified by:
getAttributes in interface AttributeAware
Parameters:
name - attribute name.
Returns:
collection of attribute values or an empty list if the attribute with the given name does not exist.

getAttribute

public String getAttribute(String name)
Specified by:
getAttribute in interface AttributeAware
Parameters:
name - attribute name.
Returns:
single attribute value or null if the attribute with the given name does not exist. If multiple attribute values exist, any one could be returned.

getAttributeNames

public Set<String> getAttributeNames()
Specified by:
getAttributeNames in interface AttributeAware
Returns:
set of attribute names.

hasAttribute

public boolean hasAttribute(String name)
Specified by:
hasAttribute in interface AttributeAware
Parameters:
name - attribute name.
Returns:
true if an only if the user has an attribute with the supplied name and has one or more values.

setAttribute

public void setAttribute(String name,
                         String value)

setAttribute

public void setAttribute(String name,
                         List<String> values)


Copyright © 2010 Atlassian Pty Ltd. All Rights Reserved.