Class GroupDetail
- java.lang.Object
-
- org.silverpeas.core.admin.user.model.GroupDetail
-
- All Implemented Interfaces:
Serializable
,Comparable<Group>
,Group
- Direct Known Subclasses:
UserGroupProfileEntity
public class GroupDetail extends Object implements Group
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description GroupDetail()
Constructs an empty group detail.GroupDetail(GroupDetail toClone)
Constructs a group detail from the specified one.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(Group o)
boolean
equals(Object obj)
List<User>
getAllUsers()
Gets the detail about all the users that are in this group (and in the subgroups of this group).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()
Get the group idString
getName()
Get the group nameint
getNbUsers()
Gets the number of direct users in this group; the users from its subgroups aren't counted.protected static OrganizationController
getOrganisationController()
String
getRule()
Gets the synchronization rule that is applied to this group.Date
getSaveDate()
Gets the date of the last group save.String
getSpecificId()
Get the group specific idGroupState
getState()
Please useGroup.isValidState()
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 groupint
hashCode()
boolean
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.void
setCreationDate(Date creationDate)
void
setDescription(String newDescription)
Set the group descriptionvoid
setDomainId(String newDomainId)
Set the domain id where the group is storedvoid
setId(String newId)
Set the group idvoid
setName(String newName)
Set the group namevoid
setRule(String rule)
void
setSaveDate(Date saveDate)
void
setSpecificId(String newSpecificId)
Set the group specific idvoid
setState(GroupState state)
The state of the group is updated and the according save date too.void
setStateSaveDate(Date stateSaveDate)
void
setSuperGroupId(String newSuperGroupId)
Set the father group idvoid
setTotalNbUsers(int nbUsers)
void
setUserIds(String[] sUserIds)
Set the list of users in the group
-
-
-
Constructor Detail
-
GroupDetail
public GroupDetail()
Constructs an empty group detail.
-
GroupDetail
public GroupDetail(GroupDetail toClone)
Constructs a group detail from the specified one. The given group detail is cloned to the new group detail.BE CAREFULL:
nbUsers
andnbTotalUsers
fields are not copied.- Parameters:
toClone
- a group to clone.
-
-
Method Detail
-
getId
public String getId()
Get the group id
-
setId
public void setId(String newId)
Set the group id
-
getSpecificId
public String getSpecificId()
Get the group specific id
-
setSpecificId
public void setSpecificId(String newSpecificId)
Set the group specific id
-
getDomainId
public String getDomainId()
Description copied from interface:Group
Get the domain id where the group is stored- Specified by:
getDomainId
in interfaceGroup
- Returns:
- the user domain identifier.
-
setDomainId
public void setDomainId(String newDomainId)
Set the domain id where the group is stored
-
getSuperGroupId
public String getSuperGroupId()
Description copied from interface:Group
Get the father group id- Specified by:
getSuperGroupId
in interfaceGroup
- Returns:
- the identifier of the group parent of this group. Null the group has no parent.
-
setSuperGroupId
public void setSuperGroupId(String newSuperGroupId)
Set the father group id
-
setName
public void setName(String newName)
Set the group name
-
getDescription
public String getDescription()
Description copied from interface:Group
Get the group description- Specified by:
getDescription
in interfaceGroup
- Returns:
- the group description.
-
setDescription
public void setDescription(String newDescription)
Set the group description
-
setUserIds
public void setUserIds(String[] sUserIds)
Set the list of users in the group
-
getUserIds
public String[] getUserIds()
Description copied from interface:Group
Get the list of users in the group- Specified by:
getUserIds
in interfaceGroup
- Returns:
- the identifiers of the users in this group.
-
compareTo
public int compareTo(Group o)
- Specified by:
compareTo
in interfaceComparable<Group>
-
getRule
public String getRule()
Description copied from interface:Group
Gets the synchronization rule that is applied to this group.
-
setRule
public void setRule(String rule)
-
isSynchronized
public boolean isSynchronized()
Description copied from interface:Group
Is this group synchronized from a remote domain service?- Specified by:
isSynchronized
in interfaceGroup
- Returns:
- true if this group is synchronized, false otherwise.
-
getNbUsers
public int getNbUsers()
Description copied from interface:Group
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.- Specified by:
getNbUsers
in interfaceGroup
- Returns:
- the number of direct users.
-
getTotalNbUsers
public int getTotalNbUsers()
Description copied from interface:Group
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.
- Specified by:
getTotalNbUsers
in interfaceGroup
- Returns:
- the total number of distinct users in its group and subgroups.
-
setTotalNbUsers
public void setTotalNbUsers(int nbUsers)
-
getOrganisationController
protected static OrganizationController getOrganisationController()
-
isRoot
public boolean isRoot()
Description copied from interface:Group
Is this group is a root one? A root group is a group that has no father group.
-
getSubGroups
public List<Group> getSubGroups()
Description copied from interface:Group
Gets the direct subgroups of this user group.- Specified by:
getSubGroups
in interfaceGroup
- Returns:
- a list with its direct subgroups. If this group hasn't children group, then the returned list is empty.
-
getAllUsers
public List<User> getAllUsers()
Description copied from interface:Group
Gets the detail about all the users that are in this group (and in the subgroups of this group).- Specified by:
getAllUsers
in interfaceGroup
- Returns:
- a list of all the user details in this group.
-
isValidState
public boolean isValidState()
Description copied from interface:Group
This method is the only one able to indicate the group validity state. Please do not useGroup.getState()
to retrieve group validity information.- Specified by:
isValidState
in interfaceGroup
- Returns:
- true if valid state, false otherwise.
-
isRemovedState
public boolean isRemovedState()
Description copied from interface:Group
This method is the only one able to indicate the group removed state. Please do not useGroup.getState()
to retrieve group removed information.- Specified by:
isRemovedState
in interfaceGroup
- Returns:
- true if deleted state, false otherwise.
-
getCreationDate
public Date getCreationDate()
Description copied from interface:Group
Gets the date of the group creation.- Specified by:
getCreationDate
in interfaceGroup
- Returns:
- creation date of the group as
Date
.
-
setCreationDate
public void setCreationDate(Date creationDate)
- Parameters:
creationDate
- the date of the user creation
-
getSaveDate
public Date getSaveDate()
Description copied from interface:Group
Gets the date of the last group save.- Specified by:
getSaveDate
in interfaceGroup
- Returns:
- the date of the last group save as
Date
.
-
setSaveDate
public void setSaveDate(Date saveDate)
- Parameters:
saveDate
- the date of the last group save
-
getState
public GroupState getState()
Description copied from interface:Group
Please useGroup.isValidState()
to retrieve group validity information. Please useGroup.isRemovedState()
to retrieve group removed information. This method returns the stored state information but not the functional information.
-
setState
public void setState(GroupState state)
The state of the group is updated and the according save date too.- Parameters:
state
- the state of the group.
-
getStateSaveDate
public Date getStateSaveDate()
Description copied from interface:Group
Gets the last date of the last state save.- Specified by:
getStateSaveDate
in interfaceGroup
- Returns:
- the date of last state save (when it changes) as
Date
.
-
setStateSaveDate
public void setStateSaveDate(Date stateSaveDate)
- Parameters:
stateSaveDate
- the date of last user state save (when it changes)
-
-