Class UserGroupProfileEntity
- java.lang.Object
-
- org.silverpeas.core.admin.user.model.GroupDetail
-
- org.silverpeas.core.webapi.profile.UserGroupProfileEntity
-
- All Implemented Interfaces:
Serializable,Comparable<Group>,Group,WebEntity
public class UserGroupProfileEntity extends GroupDetail implements WebEntity
The profile of the user group web entity in the WEB. It is a web entity representing a group of users that can be serialized into a given media type (JSON, XML). It is a decorator that decorates a Group object with additional properties concerning its exposition in the WEB.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedUserGroupProfileEntity()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Group o)booleanequals(Object obj)static UserGroupProfileEntityfromGroup(Group group)Decorates the specified user group with the required WEB exposition features.static UserGroupProfileEntity[]fromGroups(List<? extends Group> groups, URI groupsURI)Decorates the specified user groups with required WEB exposition features.URIgetChildrenUri()Gets the URI at which its direct children groups can be retrieved.StringgetDescription()Get the group descriptionStringgetDomainId()Get the domain id where the group is storedStringgetDomainName()StringgetId()Get the group idStringgetName()Get the group nameintgetNbUsers()Gets the number of direct users in this group; the users from its subgroups aren't counted.URIgetParentUri()Gets the URI of its parent group.StringgetRule()Gets the synchronization rule that is applied to this group.StringgetSpecificId()Get the group specific idList<Group>getSubGroups()Gets the direct subgroups of this user group.StringgetSuperGroupId()Get the father group idintgetTotalNbUsers()Gets the total number of users in this group and in its subgroups.URIgetURI()Gets the URI at which this web entity is published and can be accessed.String[]getUserIds()Get the list of users in the groupURIgetUsersUri()inthashCode()booleanisRoot()Is this group is a root one?booleanisSynchronized()Is this group synchronized from a remote domain service?voidsetDescription(String newDescription)Set the group descriptionvoidsetDomainId(String newDomainId)Set the domain id where the group is storedvoidsetId(String newId)Set the group idvoidsetName(String newName)Set the group namevoidsetRule(String rule)voidsetSpecificId(String newSpecificId)Set the group specific idvoidsetSuperGroupId(String newSuperGroupId)Set the father group idvoidsetUserIds(String[] sUserIds)Set the list of users in the groupUserGroupProfileEntitywithAsUri(URI groupUri)-
Methods inherited from class org.silverpeas.core.admin.user.model.GroupDetail
getAllUsers, getCreationDate, getOrganisationController, getSaveDate, getState, getStateSaveDate, isRemovedState, isValidState, setCreationDate, setSaveDate, setState, setStateSaveDate, setTotalNbUsers
-
-
-
-
Method Detail
-
fromGroup
public static UserGroupProfileEntity fromGroup(Group group)
Decorates the specified user group with the required WEB exposition features.- Parameters:
group- the user group to decorate.- Returns:
- a web entity representing the specified group profile.
-
fromGroups
public static UserGroupProfileEntity[] fromGroups(List<? extends Group> groups, URI groupsURI)
Decorates the specified user groups with required WEB exposition features.- Parameters:
groups- a list of user groups to decorate.groupsURI- the URI at which the specified groups are defined.- Returns:
- a list of web entities representing the specified group profiles.
-
withAsUri
public UserGroupProfileEntity withAsUri(URI groupUri)
-
getParentUri
public URI getParentUri()
Gets the URI of its parent group.- Returns:
- the URI of its parent group or null if this group is a root one.
-
getChildrenUri
public URI getChildrenUri()
Gets the URI at which its direct children groups can be retrieved.- Returns:
- the URI at which its subgroups can be get.
-
getUsersUri
public URI getUsersUri()
-
getDescription
public String getDescription()
Description copied from interface:GroupGet the group description- Specified by:
getDescriptionin interfaceGroup- Overrides:
getDescriptionin classGroupDetail- Returns:
- the group description.
-
getId
public String getId()
Description copied from class:GroupDetailGet the group id- Specified by:
getIdin interfaceGroup- Overrides:
getIdin classGroupDetail- Returns:
- the group unique identifier.
-
getName
public String getName()
Description copied from interface:GroupGet the group name- Specified by:
getNamein interfaceGroup- Overrides:
getNamein classGroupDetail- Returns:
- the group name.
-
getNbUsers
public int getNbUsers()
Description copied from interface:GroupGets the number of direct users in this group; the users from its subgroups aren't counted. To count also the users in its subgroups, please use theorg.silverpeas.core.admin.user.model.Group#getTotalNbUsersmethod instead.- Specified by:
getNbUsersin interfaceGroup- Overrides:
getNbUsersin classGroupDetail- Returns:
- the number of direct users.
-
getTotalNbUsers
public int getTotalNbUsers()
Description copied from interface:GroupGets the total number of users in this group and in its subgroups. Users that are in several groups are counted only once.Depending on the requester, the total number of users can omit some users by their state (usually the users whose their account is deactivated). By default, all the users whose the account is deleted aren't taken into account.
- Specified by:
getTotalNbUsersin interfaceGroup- Overrides:
getTotalNbUsersin classGroupDetail- Returns:
- the total number of distinct users in its group and subgroups.
-
getSpecificId
public String getSpecificId()
Description copied from class:GroupDetailGet the group specific id- Overrides:
getSpecificIdin classGroupDetail
-
setDescription
public void setDescription(String newDescription)
Description copied from class:GroupDetailSet the group description- Overrides:
setDescriptionin classGroupDetail
-
setId
public void setId(String newId)
Description copied from class:GroupDetailSet the group id- Overrides:
setIdin classGroupDetail
-
setName
public void setName(String newName)
Description copied from class:GroupDetailSet the group name- Overrides:
setNamein classGroupDetail
-
getDomainId
public String getDomainId()
Description copied from interface:GroupGet the domain id where the group is stored- Specified by:
getDomainIdin interfaceGroup- Overrides:
getDomainIdin classGroupDetail- Returns:
- the user domain identifier.
-
getSuperGroupId
public String getSuperGroupId()
Description copied from interface:GroupGet the father group id- Specified by:
getSuperGroupIdin interfaceGroup- Overrides:
getSuperGroupIdin classGroupDetail- Returns:
- the identifier of the group parent of this group. Null the group has no parent.
-
setDomainId
public void setDomainId(String newDomainId)
Description copied from class:GroupDetailSet the domain id where the group is stored- Overrides:
setDomainIdin classGroupDetail
-
setSpecificId
public void setSpecificId(String newSpecificId)
Description copied from class:GroupDetailSet the group specific id- Overrides:
setSpecificIdin classGroupDetail
-
setSuperGroupId
public void setSuperGroupId(String newSuperGroupId)
Description copied from class:GroupDetailSet the father group id- Overrides:
setSuperGroupIdin classGroupDetail
-
getDomainName
public String getDomainName()
-
getSubGroups
public List<Group> getSubGroups()
Description copied from interface:GroupGets the direct subgroups of this user group.- Specified by:
getSubGroupsin interfaceGroup- Overrides:
getSubGroupsin classGroupDetail- Returns:
- a list with its direct subgroups. If this group hasn't children group, then the returned list is empty.
-
setUserIds
public void setUserIds(String[] sUserIds)
Description copied from class:GroupDetailSet the list of users in the group- Overrides:
setUserIdsin classGroupDetail
-
setRule
public void setRule(String rule)
- Overrides:
setRulein classGroupDetail
-
isSynchronized
public boolean isSynchronized()
Description copied from interface:GroupIs this group synchronized from a remote domain service?- Specified by:
isSynchronizedin interfaceGroup- Overrides:
isSynchronizedin classGroupDetail- Returns:
- true if this group is synchronized, false otherwise.
-
isRoot
public boolean isRoot()
Description copied from interface:GroupIs this group is a root one? A root group is a group that has no father group.- Specified by:
isRootin interfaceGroup- Overrides:
isRootin classGroupDetail- Returns:
- true if this group is a root one, false otherwise.
-
getUserIds
public String[] getUserIds()
Description copied from interface:GroupGet the list of users in the group- Specified by:
getUserIdsin interfaceGroup- Overrides:
getUserIdsin classGroupDetail- Returns:
- the identifiers of the users in this group.
-
getRule
public String getRule()
Description copied from interface:GroupGets the synchronization rule that is applied to this group.- Specified by:
getRulein interfaceGroup- Overrides:
getRulein classGroupDetail- Returns:
- a synchronization rule or null if no such rule is defined for this group.
-
compareTo
public int compareTo(Group o)
- Specified by:
compareToin interfaceComparable<Group>- Overrides:
compareToin classGroupDetail
-
equals
public boolean equals(Object obj)
- Overrides:
equalsin classGroupDetail
-
hashCode
public int hashCode()
- Overrides:
hashCodein classGroupDetail
-
-