Package com.atlassian.crowd.model.group
Class DelegatingGroupWithAttributes
java.lang.Object
com.atlassian.crowd.embedded.impl.AbstractDelegatingEntityWithAttributes
com.atlassian.crowd.model.group.DelegatingGroupWithAttributes
- All Implemented Interfaces:
Attributes
,DirectoryEntity
,Group
,GroupWithAttributes
,GroupWithMembers
,Comparable<Group>
public class DelegatingGroupWithAttributes
extends AbstractDelegatingEntityWithAttributes
implements GroupWithAttributes
Implementation of GroupWithAttributes that simply delegates to an underlying Group and Attributes object.
Instances of this class will be effectively immutable so long as either:
- It is constructed with immutable objects or
- the mutable objects it is constructed with are not "leaked".
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
boolean
Implementations must ensure equality based on getDirectoryId() and case-insensitive getName().long
This will returnnull
for directories which do not support external idsgetName()
getType()
int
hashCode()
Implementations must produce a hashcode based on getDirectoryId() and case-insensitive getName().boolean
isActive()
Methods inherited from class com.atlassian.crowd.embedded.impl.AbstractDelegatingEntityWithAttributes
getKeys, getValue, getValues, isEmpty
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.atlassian.crowd.embedded.api.Attributes
getKeys, getValue, getValues, isEmpty
-
Constructor Details
-
DelegatingGroupWithAttributes
-
-
Method Details
-
getDirectoryId
public long getDirectoryId()- Specified by:
getDirectoryId
in interfaceDirectoryEntity
- Returns:
- id of the directory in which the DirectoryEntity is stored.
-
getName
- Specified by:
getName
in interfaceDirectoryEntity
- Returns:
- name of the entity.
-
isActive
public boolean isActive() -
getDescription
- Specified by:
getDescription
in interfaceGroup
- Returns:
- description of the group or
null
if there is no description.
-
getType
-
getExternalId
Description copied from interface:Group
This will returnnull
for directories which do not support external ids- Specified by:
getExternalId
in interfaceGroup
- Returns:
- external id of the group or
null
it there is no external id
-
equals
Description copied from interface:DirectoryEntity
Implementations must ensure equality based on getDirectoryId() and case-insensitive getName().- Specified by:
equals
in interfaceDirectoryEntity
- Overrides:
equals
in classObject
- Parameters:
o
- object to compare to.- Returns:
true
if and only if the directoryId and the lowercase names 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 interfaceDirectoryEntity
- Overrides:
hashCode
in classObject
- Returns:
- hashcode.
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Group>
-