Interface Group
-
- All Superinterfaces:
Comparable<Group>
,Serializable
- All Known Implementing Classes:
GroupDetail
,UserGroupProfileEntity
public interface Group extends Serializable, Comparable<Group>
A group of users in Silverpeas.- Author:
- mmoquillon
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static List<Group>
getAllRoots()
Gets allGroupState.VALID
root groups in Silverpeas.static List<Group>
getAllRootsInDomain(String domainId)
Gets allGroupState.VALID
root groups available in the specified domain in Silverpeas.List<User>
getAllUsers()
Gets the detail about all the users that are in this group (and in the subgroups of this group).static Group
getById(String groupId)
Gets the detail about the specified group of users.Date
getCreationDate()
Gets the date of the group creation.String
getDescription()
Get the group descriptionString
getDomainId()
Get the domain id where the group is storedString
getId()
Gets the unique identifier of this group.String
getName()
Get the group nameint
getNbUsers()
Gets the number of direct users in this group; the users from its subgroups aren't counted.String
getRule()
Gets the synchronization rule that is applied to this group.Date
getSaveDate()
Gets the date of the last group save.GroupState
getState()
Please useisValidState()
to retrieve group validity information.Date
getStateSaveDate()
Gets the last date of the last state save.List<Group>
getSubGroups()
Gets the direct subgroups of this user group.String
getSuperGroupId()
Get the father group idint
getTotalNbUsers()
Gets the total number of users in this group and in its subgroups.String[]
getUserIds()
Get the list of users in the groupboolean
isRemovedState()
This method is the only one able to indicate the group removed state.boolean
isRoot()
Is this group is a root one?boolean
isSynchronized()
Is this group synchronized from a remote domain service?boolean
isValidState()
This method is the only one able to indicate the group validity state.-
Methods inherited from interface java.lang.Comparable
compareTo
-
-
-
-
Method Detail
-
getById
static Group getById(String groupId)
Gets the detail about the specified group of users.- Parameters:
groupId
- the unique identifier of the group to get.- Returns:
- the detail about the group with the specified identifier or null if no such group exists.
-
getAllRoots
static List<Group> getAllRoots()
Gets allGroupState.VALID
root groups in Silverpeas. A root group is the group of users without any other parent group.- Returns:
- a list with all the groups in the Silverpeas portal.
-
getAllRootsInDomain
static List<Group> getAllRootsInDomain(String domainId)
Gets allGroupState.VALID
root groups available in the specified domain in Silverpeas.- Parameters:
domainId
- the unique identifier of the domain to which the root groups belong.- Returns:
- a list with all the root user groups in the specified domain.
-
getId
String getId()
Gets the unique identifier of this group.- Returns:
- the group unique identifier.
-
getDomainId
String getDomainId()
Get the domain id where the group is stored- Returns:
- the user domain identifier.
-
getSuperGroupId
String getSuperGroupId()
Get the father group id- Returns:
- the identifier of the group parent of this group. Null the group has no parent.
-
getName
String getName()
Get the group name- Returns:
- the group name.
-
getDescription
String getDescription()
Get the group description- Returns:
- the group description.
-
getUserIds
String[] getUserIds()
Get the list of users in the group- Returns:
- the identifiers of the users in this group.
-
getRule
String getRule()
Gets the synchronization rule that is applied to this group.- Returns:
- a synchronization rule or null if no such rule is defined for this group.
-
isSynchronized
boolean isSynchronized()
Is this group synchronized from a remote domain service?- Returns:
- true if this group is synchronized, false otherwise.
-
getNbUsers
int getNbUsers()
Gets 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#getTotalNbUsers
method instead.- Returns:
- the number of direct users.
-
getTotalNbUsers
int getTotalNbUsers()
Gets 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.
- Returns:
- the total number of distinct users in its group and subgroups.
-
isRoot
boolean isRoot()
Is this group is a root one? A root group is a group that has no father group.- Returns:
- true if this group is a root one, false otherwise.
-
getSubGroups
List<Group> getSubGroups()
Gets the direct subgroups of this user group.- Returns:
- a list with its direct subgroups. If this group hasn't children group, then the returned list is empty.
-
getAllUsers
List<User> getAllUsers()
Gets the detail about all the users that are in this group (and in the subgroups of this group).- Returns:
- a list of all the user details in this group.
-
getCreationDate
Date getCreationDate()
Gets the date of the group creation.- Returns:
- creation date of the group as
Date
.
-
getSaveDate
Date getSaveDate()
Gets the date of the last group save.- Returns:
- the date of the last group save as
Date
.
-
getState
GroupState getState()
Please useisValidState()
to retrieve group validity information. Please useisRemovedState()
to retrieve group removed information. This method returns the stored state information but not the functional information.- Returns:
- the state of the group.
-
isValidState
boolean isValidState()
This method is the only one able to indicate the group validity state. Please do not usegetState()
to retrieve group validity information.- Returns:
- true if valid state, false otherwise.
-
isRemovedState
boolean isRemovedState()
This method is the only one able to indicate the group removed state. Please do not usegetState()
to retrieve group removed information.- Returns:
- true if deleted state, false otherwise.
-
-