public class GroupEntity extends Object implements GroupWithAttributes, Comparable<Group>
| Constructor and Description |
|---|
GroupEntity(String name,
String description,
GroupType type,
boolean active) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Group o) |
boolean |
equals(Object o)
Implementations must ensure equality based on
getDirectoryId() and case-insensitive getName().
|
MultiValuedAttributeEntityList |
getAttributes() |
String |
getDescription() |
long |
getDirectoryId() |
String |
getExternalId()
This will return
null for directories which do not support external ids |
Set<String> |
getKeys()
Gets all the keys of the attributes.
|
String |
getName() |
GroupType |
getType() |
String |
getValue(String key)
Returns any value associated with the given key, returns
null if there is no value. |
Set<String> |
getValues(String key)
Get all the values associated with a given key.
|
int |
hashCode()
Implementations must produce a hashcode based on
getDirectoryId() and case-insensitive getName().
|
boolean |
isActive() |
boolean |
isEmpty() |
static GroupEntity |
newMinimalInstance(String groupName)
Creates a new minimal group instance.
|
void |
setAttributes(MultiValuedAttributeEntityList attributes) |
String |
toString() |
public String getDescription()
getDescription in interface Groupnull if there is no description.public GroupType getType()
public boolean isActive()
public long getDirectoryId()
getDirectoryId in interface DirectoryEntitypublic String getName()
getName in interface DirectoryEntitypublic void setAttributes(MultiValuedAttributeEntityList attributes)
@Nullable public MultiValuedAttributeEntityList getAttributes()
@Nullable public String getExternalId()
Groupnull for directories which do not support external idsgetExternalId in interface Groupnull it there is no external id@Nullable public Set<String> getValues(String key)
AttributesgetValues in interface Attributeskey - the key to retrieve the values for@Nullable public String getValue(String key)
Attributesnull if there is no value.getValue in interface Attributeskey - the key to retrieve the value fornull if there is no valuepublic Set<String> getKeys()
AttributesgetKeys in interface Attributespublic boolean isEmpty()
isEmpty in interface Attributestrue if there are no attributespublic int compareTo(Group o)
compareTo in interface Comparable<Group>public boolean equals(Object o)
DirectoryEntityequals in interface DirectoryEntityequals in class Objecto - object to compare to.true if and only if the directoryId
and the lowercase names of the directory entities match.public int hashCode()
DirectoryEntityhashCode in interface DirectoryEntityhashCode in class Objectpublic static GroupEntity newMinimalInstance(String groupName)
groupName - group nameCopyright © 2018 Atlassian. All rights reserved.