Package eu.xenit.alfred.api.people
Interface IPeopleService
public interface IPeopleService
Service around people and groups.
-
Method Summary
Modifier and TypeMethodDescriptionvoidAddToParentGroup(String parentgroup, String childauthority) Adds an authority as a child to a group.GetContainerGroups(String userName) Gets the groups of the current userGets the information of a group, identified by the nodeRef in which the group is storedGets the information of a group, identified by the groupIdentifier (this is the name with the GROUP_ prefix)Gets a list of all groupsGets the information of all the people existing in alfresco.Gets the information of a person represented by a noderef.Gets the information of a person represented by a userName.GetSubgroupsInGroup(String name, boolean immediate) Gets the subgroups of the given group (i.e.GetUsersOfGroup(String name, boolean immediate) Gets the information of all the people of a given group.booleanChecks if authority with that name is of type groupbooleanChecks if authority with that name is uservoidUnlinkFromParentGroup(String parentgroup, String childauthority) Unlink an authority (user or subgroup) from a parent group.
-
Method Details
-
GetPerson
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
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 subgroupsimmediate- 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
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
Gets the information of all the people existing in alfresco.- Returns:
- The information of all the people.
-
GetUsersOfGroup
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
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
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
Gets a list of all groups- Returns:
- A list of Group objects, one for each group in this Alfresco
-
UnlinkFromParentGroup
Unlink an authority (user or subgroup) from a parent group.- Parameters:
parentgroup- The parent group that will lose childauthority as a childchildauthority- The child authority (user or group) that will lose parentgroup as a parent
-
AddToParentGroup
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 childchildauthority- The authority that will gain a parent to be member/subgroup of
-
GetCurrentUser
Person GetCurrentUser()- Returns:
- The current user its information.
-
GetContainerGroups
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
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
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
-