Class GroupDetail

    • 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 and nbTotalUsers fields are not copied.

        Parameters:
        toClone - a group to clone.
    • Method Detail

      • getId

        public String getId()
        Get the group id
        Specified by:
        getId in interface Group
        Returns:
        the group unique identifier.
      • 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 interface Group
        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 interface Group
        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
      • getName

        public String getName()
        Description copied from interface: Group
        Get the group name
        Specified by:
        getName in interface Group
        Returns:
        the group name.
      • 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 interface Group
        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 interface Group
        Returns:
        the identifiers of the users in this group.
      • getRule

        public String getRule()
        Description copied from interface: Group
        Gets the synchronization rule that is applied to this group.
        Specified by:
        getRule in interface Group
        Returns:
        a synchronization rule or null if no such rule is defined for 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 interface Group
        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 the org.silverpeas.core.admin.user.model.Group#getTotalNbUsers method instead.
        Specified by:
        getNbUsers in interface Group
        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 interface Group
        Returns:
        the total number of distinct users in its group and subgroups.
      • setTotalNbUsers

        public void setTotalNbUsers​(int nbUsers)
      • 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.
        Specified by:
        isRoot in interface Group
        Returns:
        true if this group is a root one, false otherwise.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getSubGroups

        public List<Group> getSubGroups()
        Description copied from interface: Group
        Gets the direct subgroups of this user group.
        Specified by:
        getSubGroups in interface Group
        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 interface Group
        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 use Group.getState() to retrieve group validity information.
        Specified by:
        isValidState in interface Group
        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 use Group.getState() to retrieve group removed information.
        Specified by:
        isRemovedState in interface Group
        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 interface Group
        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 interface Group
        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 use Group.isValidState() to retrieve group validity information. Please use Group.isRemovedState() to retrieve group removed information. This method returns the stored state information but not the functional information.
        Specified by:
        getState in interface Group
        Returns:
        the state of the group.
      • 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 interface Group
        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)