com.atlassian.crowd.integration.model
Class EntityWithAttributes

java.lang.Object
  extended by com.atlassian.crowd.integration.model.EntityWithAttributes
All Implemented Interfaces:
AttributeAware
Direct Known Subclasses:
InternalGroupWithAttributes, InternalUserWithAttributes

public abstract class EntityWithAttributes
extends Object
implements AttributeAware


Constructor Summary
EntityWithAttributes(Map<String,List<String>> attributes)
           
 
Method Summary
 String getAttribute(String name)
           
 Set<String> getAttributeNames()
           
 List<String> getAttributes(String name)
           
 boolean hasAttribute(String name)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EntityWithAttributes

public EntityWithAttributes(Map<String,List<String>> attributes)
Method Detail

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.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.