public class GroupTemplate extends Object implements Group, Serializable
Used to create or update a group.
| Constructor and Description |
|---|
GroupTemplate(Group group)
Build a template from an existing group.
|
GroupTemplate(String name) |
GroupTemplate(String name,
long directoryId)
Contructor that defaults the
GroupType to GroupType.GROUP |
GroupTemplate(String name,
long directoryId,
GroupType type)
Build a template for a new group.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Group other) |
boolean |
equals(Object o)
Implementations must ensure equality based on
getDirectoryId() and case-insensitive getName().
|
String |
getDescription() |
long |
getDirectoryId() |
String |
getExternalId()
This will return
null for directories which do not support external ids |
String |
getName() |
GroupType |
getType() |
int |
hashCode()
Implementations must produce a hashcode based on
getDirectoryId() and case-insensitive getName().
|
boolean |
isActive() |
boolean |
isLocal() |
void |
setActive(boolean active) |
void |
setDescription(String description) |
void |
setDirectoryId(long directoryId) |
void |
setExternalId(String externalId) |
void |
setLocal(boolean local) |
void |
setName(String name) |
void |
setType(GroupType type) |
String |
toString() |
GroupTemplate |
withDirectoryId(long directoryId) |
public GroupTemplate(String name, long directoryId, GroupType type)
Used to create a group.
name - group name of new group.directoryId - ID of the directory in which to store the new group.type - the group type see GroupTypepublic GroupTemplate(String name)
public GroupTemplate(String name, long directoryId)
GroupType to GroupType.GROUPname - the name of the groupdirectoryId - ID of the directory in which to store the new group.public GroupTemplate(Group group)
Used to update a group.
group - group to build template from.public GroupTemplate withDirectoryId(long directoryId)
directoryId - directory id for the returned group templatedirectoryIdpublic void setName(String name)
public void setDirectoryId(long directoryId)
public long getDirectoryId()
getDirectoryId in interface DirectoryEntitypublic String getName()
getName in interface DirectoryEntitypublic boolean isActive()
public void setActive(boolean active)
public String getDescription()
getDescription in interface Groupnull if there is no description.public void setDescription(String description)
public GroupType getType()
public void setType(GroupType type)
public boolean isLocal()
public void setLocal(boolean local)
@Nullable public String getExternalId()
Groupnull for directories which do not support external idsgetExternalId in interface Groupnull it there is no external idpublic void setExternalId(String externalId)
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 int compareTo(Group other)
compareTo in interface Comparable<Group>Copyright © 2021 Atlassian. All rights reserved.