com.atlassian.crowd.integration.model.group
Class LDAPGroupWithAttributes

java.lang.Object
  extended by com.atlassian.crowd.integration.model.group.LDAPGroupWithAttributes
All Implemented Interfaces:
AttributeAware, DirectoryEntity, Group, GroupWithAttributes, LDAPDirectoryEntity, java.io.Serializable

public class LDAPGroupWithAttributes
extends java.lang.Object
implements GroupWithAttributes, LDAPDirectoryEntity

See Also:
Serialized Form

Constructor Summary
LDAPGroupWithAttributes(java.lang.String dn, GroupTemplateWithAttributes group)
           
 
Method Summary
 boolean equals(java.lang.Object o)
          Implementations must ensure equality based on getDirectoryId() and case-insensitive getName().
 java.lang.String getAttribute(java.lang.String name)
           
 java.util.Set<java.lang.String> getAttributeNames()
           
 java.util.List<java.lang.String> getAttributes(java.lang.String name)
           
 java.lang.String getDescription()
           
 java.lang.Long getDirectoryId()
           
 java.lang.String getDn()
          Gets the standardised distinguished name for the LDAP entity.
 java.lang.String getName()
           
 GroupType getType()
           
 boolean hasAttribute(java.lang.String name)
           
 int hashCode()
          Implementations must produce a hashcode based on getDirectoryId() and case-insensitive getName().
 boolean isActive()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LDAPGroupWithAttributes

public LDAPGroupWithAttributes(java.lang.String dn,
                               GroupTemplateWithAttributes group)
Method Detail

getDn

public java.lang.String getDn()
Description copied from interface: LDAPDirectoryEntity
Gets the standardised distinguished name for the LDAP entity.

Specified by:
getDn in interface LDAPDirectoryEntity
Returns:
distinguished name.

getName

public java.lang.String getName()
Specified by:
getName in interface DirectoryEntity
Returns:
name of the entity.

getDirectoryId

public java.lang.Long getDirectoryId()
Specified by:
getDirectoryId in interface DirectoryEntity
Returns:
id of the directory in which the DirectoryEntity is stored.

getType

public GroupType getType()
Specified by:
getType in interface Group
Returns:
the type of the group.

isActive

public boolean isActive()
Specified by:
isActive in interface Group
Returns:
true if and only if the user is allowed to authenticate.

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in interface Group
Returns:
description of the group or null if there is no description.

getAttributes

public java.util.List<java.lang.String> getAttributes(java.lang.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 java.lang.String getAttribute(java.lang.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 java.util.Set<java.lang.String> getAttributeNames()
Specified by:
getAttributeNames in interface AttributeAware
Returns:
set of attribute names.

hasAttribute

public boolean hasAttribute(java.lang.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.

equals

public boolean equals(java.lang.Object o)
Description copied from interface: DirectoryEntity
Implementations must ensure equality based on getDirectoryId() and case-insensitive getName().

Specified by:
equals in interface DirectoryEntity
Overrides:
equals in class java.lang.Object
Parameters:
o - object to compare to.
Returns:
true if and only if the directoryId and name.toLowerCase() of the directory entities match.

hashCode

public int hashCode()
Description copied from interface: DirectoryEntity
Implementations must produce a hashcode based on getDirectoryId() and case-insensitive getName().

Specified by:
hashCode in interface DirectoryEntity
Overrides:
hashCode in class java.lang.Object
Returns:
hashcode.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.