Class 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 Detail

      • UserGroupProfileEntity

        protected UserGroupProfileEntity()
    • 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.
      • 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()
      • getName

        public String getName()
        Description copied from interface: Group
        Get the group name
        Specified by:
        getName in interface Group
        Overrides:
        getName in class GroupDetail
        Returns:
        the group name.
      • 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
        Overrides:
        getNbUsers in class GroupDetail
        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
        Overrides:
        getTotalNbUsers in class GroupDetail
        Returns:
        the total number of distinct users in its group and subgroups.
      • getDomainId

        public String getDomainId()
        Description copied from interface: Group
        Get the domain id where the group is stored
        Specified by:
        getDomainId in interface Group
        Overrides:
        getDomainId in class GroupDetail
        Returns:
        the user domain identifier.
      • getSuperGroupId

        public String getSuperGroupId()
        Description copied from interface: Group
        Get the father group id
        Specified by:
        getSuperGroupId in interface Group
        Overrides:
        getSuperGroupId in class GroupDetail
        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: GroupDetail
        Set the domain id where the group is stored
        Overrides:
        setDomainId in class GroupDetail
      • getDomainName

        public String getDomainName()
      • getSubGroups

        public List<Group> getSubGroups()
        Description copied from interface: Group
        Gets the direct subgroups of this user group.
        Specified by:
        getSubGroups in interface Group
        Overrides:
        getSubGroups in class GroupDetail
        Returns:
        a list with its direct subgroups. If this group hasn't children group, then the returned list is empty.
      • isSynchronized

        public boolean isSynchronized()
        Description copied from interface: Group
        Is this group synchronized from a remote domain service?
        Specified by:
        isSynchronized in interface Group
        Overrides:
        isSynchronized in class GroupDetail
        Returns:
        true if this group is synchronized, false otherwise.
      • 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
        Overrides:
        isRoot in class GroupDetail
        Returns:
        true if this group is a root one, false otherwise.
      • getUserIds

        public String[] getUserIds()
        Description copied from interface: Group
        Get the list of users in the group
        Specified by:
        getUserIds in interface Group
        Overrides:
        getUserIds in class GroupDetail
        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
        Overrides:
        getRule in class GroupDetail
        Returns:
        a synchronization rule or null if no such rule is defined for this group.
      • getURI

        public URI getURI()
        Description copied from interface: WebEntity
        Gets the URI at which this web entity is published and can be accessed.
        Specified by:
        getURI in interface WebEntity
        Returns:
        the web entity URI.