Package com.atlassian.crowd.model.group
Class GroupTemplate
java.lang.Object
com.atlassian.crowd.model.group.GroupTemplate
- All Implemented Interfaces:
DirectoryEntity,Group,Serializable,Comparable<Group>
- Direct Known Subclasses:
GroupTemplateWithAttributes
A publicly mutable Group implementation.
Used to create or update a group.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionGroupTemplate(Group group) Build a template from an existing group.GroupTemplate(String name) GroupTemplate(String name, long directoryId) Contructor that defaults theGroupTypetoGroupType.GROUPGroupTemplate(String name, long directoryId, GroupType type) Build a template for a new group. -
Method Summary
Modifier and TypeMethodDescriptionintbooleanlonggetName()getType()inthashCode()booleanisActive()booleanisLocal()voidsetActive(boolean active) voidsetDescription(String description) voidsetDirectoryId(long directoryId) voidsetExternalId(String externalId) voidsetLocal(boolean local) voidvoidtoString()withDirectoryId(long directoryId)
-
Constructor Details
-
GroupTemplate
Build a template for a new group.Used to create a group.
- Parameters:
name- group name of new group.directoryId- ID of the directory in which to store the new group.type- the group type seeGroupType
-
GroupTemplate
-
GroupTemplate
Contructor that defaults theGroupTypetoGroupType.GROUP- Parameters:
name- the name of the groupdirectoryId- ID of the directory in which to store the new group.
-
GroupTemplate
Build a template from an existing group.Used to update a group.
- Parameters:
group- group to build template from.
-
-
Method Details
-
withDirectoryId
- Parameters:
directoryId- directory id for the returned group template- Returns:
- a copy of this group template, with the directory id of this copy set to
directoryId
-
setName
-
setDirectoryId
public void setDirectoryId(long directoryId) -
getDirectoryId
public long getDirectoryId()- Specified by:
getDirectoryIdin interfaceDirectoryEntity
-
getName
- Specified by:
getNamein interfaceDirectoryEntity
-
isActive
public boolean isActive() -
setActive
public void setActive(boolean active) -
getDescription
- Specified by:
getDescriptionin interfaceGroup
-
setDescription
-
getType
-
setType
-
isLocal
public boolean isLocal() -
setLocal
public void setLocal(boolean local) -
getExternalId
- Specified by:
getExternalIdin interfaceGroup
-
setExternalId
-
equals
- Specified by:
equalsin interfaceDirectoryEntity- Overrides:
equalsin classObject
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceDirectoryEntity- Overrides:
hashCodein classObject
-
compareTo
- Specified by:
compareToin interfaceComparable<Group>
-
toString
-