Interface IPeopleService


public interface IPeopleService
Service around people and groups.
  • Method Details

    • GetPerson

      Person GetPerson(NodeRef ref)
      Gets the information of a person represented by a noderef.
      Parameters:
      ref - The noderef that represents a person.
      Returns:
      The information of a person.
    • GetSubgroupsInGroup

      List<Group> GetSubgroupsInGroup(String name, boolean immediate)
      Gets the subgroups of the given group (i.e. the contained authorities of type group)
      Parameters:
      name - Name of the parent group of which you want to find the subgroups
      immediate - Set to true if you only want direct subgroups, not subgroups-of-subgroups and beyond
      Returns:
      null, if the given group does not exist
    • GetPerson

      Person GetPerson(String userName)
      Gets the information of a person represented by a userName.
      Parameters:
      userName - The user name that represents a person.
      Returns:
      The information of a person.
    • GetPeople

      List<Person> GetPeople()
      Gets the information of all the people existing in alfresco.
      Returns:
      The information of all the people.
    • GetUsersOfGroup

      List<Person> GetUsersOfGroup(String name, boolean immediate)
      Gets the information of all the people of a given group.
      Parameters:
      immediate - If true, only look at the direct member of this group. If false, look at the members of all recursive child groups.
      name - The name of the group.
      Returns:
      The information of all the people.
    • GetGroup

      Group GetGroup(String groupIdentifier)
      Gets the information of a group, identified by the groupIdentifier (this is the name with the GROUP_ prefix)
      Parameters:
      groupIdentifier - the identifying name unique to the group
      Returns:
      A container object with the name, identifier and noderef of the group
    • GetGroup

      Group GetGroup(NodeRef nodeRef)
      Gets the information of a group, identified by the nodeRef in which the group is stored
      Parameters:
      nodeRef - the nodeRef in which the group is stored
      Returns:
      A container object with the name, identifier and noderef of the group
    • GetGroups

      List<Group> GetGroups()
      Gets a list of all groups
      Returns:
      A list of Group objects, one for each group in this Alfresco
    • UnlinkFromParentGroup

      void UnlinkFromParentGroup(String parentgroup, String childauthority)
      Unlink an authority (user or subgroup) from a parent group.
      Parameters:
      parentgroup - The parent group that will lose childauthority as a child
      childauthority - The child authority (user or group) that will lose parentgroup as a parent
    • AddToParentGroup

      void AddToParentGroup(String parentgroup, String childauthority)
      Adds an authority as a child to a group. Users become members of the parent group, groups become subgroups of the parent group (so all of their users will be member of the parent group too)
      Parameters:
      parentgroup - The group that will gain a child
      childauthority - The authority that will gain a parent to be member/subgroup of
    • GetCurrentUser

      Person GetCurrentUser()
      Returns:
      The current user its information.
    • GetContainerGroups

      Set<String> GetContainerGroups(String userName)
      Gets the groups of the current user
      Parameters:
      userName - The name of the user of which the groups are requested.
      Returns:
      A list of the names of the groups of the given user.
    • isUser

      boolean isUser(String authorityName)
      Checks if authority with that name is user
      Parameters:
      authorityName - The name of the authority to check
      Returns:
      Whether the authority is a user
    • isGroup

      boolean isGroup(String authorityName)
      Checks if authority with that name is of type group
      Parameters:
      authorityName - The name of the authority to check
      Returns:
      Whether the authority is a group