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 Group
null
if there is no description.public GroupType getType()
public boolean isActive()
public long getDirectoryId()
getDirectoryId
in interface DirectoryEntity
public String getName()
getName
in interface DirectoryEntity
public void setAttributes(MultiValuedAttributeEntityList attributes)
@Nullable public MultiValuedAttributeEntityList getAttributes()
@Nullable public String getExternalId()
Group
null
for directories which do not support external idsgetExternalId
in interface Group
null
it there is no external id@Nullable public Set<String> getValues(String key)
Attributes
getValues
in interface Attributes
key
- the key to retrieve the values for@Nullable public String getValue(String key)
Attributes
null
if there is no value.getValue
in interface Attributes
key
- the key to retrieve the value fornull
if there is no valuepublic Set<String> getKeys()
Attributes
getKeys
in interface Attributes
public boolean isEmpty()
isEmpty
in interface Attributes
true
if there are no attributespublic int compareTo(Group o)
compareTo
in interface Comparable<Group>
public boolean equals(Object o)
DirectoryEntity
equals
in interface DirectoryEntity
equals
in class Object
o
- object to compare to.true
if and only if the directoryId
and the lowercase names of the directory entities match.public int hashCode()
DirectoryEntity
hashCode
in interface DirectoryEntity
hashCode
in class Object
public static GroupEntity newMinimalInstance(String groupName)
groupName
- group nameCopyright © 2020 Atlassian. All rights reserved.