com.stratelia.webactiv.beans.admin
Class Group

java.lang.Object
  extended by com.stratelia.webactiv.beans.admin.Group
All Implemented Interfaces:
Serializable, Comparable<Group>
Direct Known Subclasses:
UserGroupProfileEntity

public class Group
extends Object
implements Serializable, Comparable<Group>

See Also:
Serialized Form

Constructor Summary
Group()
          Constructor
Group(Group toClone)
           
 
Method Summary
 int compareTo(Group o)
           
 boolean equals(Object obj)
           
static List<Group> getAllRoots()
          Gets all root groups available in Silverpeas, whatever their domain.
static List<Group> getAllRootsInDomain(String domainId)
          Gets all root groups available in the specified domain in Silverpeas.
 List<? extends UserDetail> getAllUsers()
          Gets the detail about all the users that are in this group (and in the subgroups of this group).
static Group getById(String id)
          Gets the group with the specified unique identifier.
 String getDescription()
          Get the group description
 String getDomainId()
          Get the domain id where the group is stored
 String getId()
          Get the group id
 String getName()
          Get the group name
 int getNbUsers()
          Gets the number of direct users in this group; the users from its subgroups aren't counted.
protected static OrganisationController getOrganisationController()
           
 String getRule()
           
 String getSpecificId()
          Get the group specific id
 List<? extends Group> getSubGroups()
          Gets the direct subgroups of this user group.
 String getSuperGroupId()
          Get the father group id
 int getTotalNbUsers()
          Gets the total number of users in this group and in its subgroups.
 String[] getUserIds()
          Get the list of users in the group
 int hashCode()
           
 boolean isRoot()
          Is this group is a root one?
 boolean isSynchronized()
           
 void setDescription(String newDescription)
          Set the group description
 void setDomainId(String newDomainId)
          Set the domain id where the group is stored
 void setId(String newId)
          Set the group id
 void setName(String newName)
          Set the group name
 void setRule(String rule)
           
 void setSpecificId(String newSpecificId)
          Set the group specific id
 void setSuperGroupId(String newSuperGroupId)
          Set the father group id
protected  void setTotalNbUsers(int nbUsers)
           
 void setUserIds(String[] sUserIds)
          Set the list of users in the group
 void traceGroup()
          Trace the group's values
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Group

public Group()
Constructor


Group

public Group(Group toClone)
Method Detail

getById

public static Group getById(String id)
Gets the group with the specified unique identifier.

Parameters:
id - the unique identifier of the group to get.
Returns:
the group with the specified unique identifier or null if no such group exists.

getAllRoots

public static List<Group> getAllRoots()
Gets all root groups available in Silverpeas, whatever their domain.

Returns:
a list with all the groups in the Silverpeas portal.

getAllRootsInDomain

public static List<Group> getAllRootsInDomain(String domainId)
Gets all 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

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()
Get the domain id where the group is stored


setDomainId

public void setDomainId(String newDomainId)
Set the domain id where the group is stored


getSuperGroupId

public String getSuperGroupId()
Get the father group id


setSuperGroupId

public void setSuperGroupId(String newSuperGroupId)
Set the father group id


getName

public String getName()
Get the group name


setName

public void setName(String newName)
Set the group name


getDescription

public String getDescription()
Get 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()
Get the list of users in the group


traceGroup

public void traceGroup()
Trace the group's values


compareTo

public int compareTo(Group o)
Specified by:
compareTo in interface Comparable<Group>

getRule

public String getRule()

setRule

public void setRule(String rule)

isSynchronized

public boolean isSynchronized()

getNbUsers

public 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 the com.stratelia.webactiv.beans.admin.Group#getTotalNbUsers method instead.

Returns:
the number of direct users.

getTotalNbUsers

public 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.

setTotalNbUsers

protected void setTotalNbUsers(int nbUsers)

getOrganisationController

protected static OrganisationController getOrganisationController()

isRoot

public 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.

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getSubGroups

public List<? extends 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

public List<? extends UserDetail> 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.


Copyright © 2016 Silverpeas. All Rights Reserved.