Package org.ametys.core.group
Class GroupManager
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.core.group.GroupManager
- All Implemented Interfaces:
LogEnabled
,Component
,Serviceable
Component for getting group list.
-
Field Summary
Modifier and TypeFieldDescriptionprotected GroupDirectoryContextHelper
The helper for the associations group directory/contextprotected GroupDirectoryDAO
The DAO for group directoriesstatic final String
Avalon Role -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet a particular group of the givenGroupDirectory
by its idgetGroup
(GroupDirectory groupDirectory, String groupId) Get a particular group of the givenGroupDirectory
by its idgetGroup
(GroupIdentity groupIdentity) Get a particular group of the givenGroupDirectory
by its idgetGroupByContext
(String context, String groupId) Get a particular group on a given contextGet all the groups of a givenGroupDirectory
getGroups
(GroupDirectory groupDirectory) Get all the groups of a givenGroupDirectory
getGroupsByContext
(String context) Get all the groups on a given contextgetUserGroups
(String groupDirectoryId, UserIdentity userIdentity) Get all the groups of aGroupDirectory
the given user is ingetUserGroups
(GroupDirectory groupDirectory, UserIdentity userIdentity) Get all the groups of aGroupDirectory
the given user is ingetUserGroups
(UserIdentity userIdentity) Get all the groups the given user is invoid
service
(ServiceManager manager) Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
Avalon Role -
_groupDirectoryDAO
The DAO for group directories -
_directoryContextHelper
The helper for the associations group directory/context
-
-
Constructor Details
-
GroupManager
public GroupManager()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getGroup
Get a particular group of the givenGroupDirectory
by its id- Parameters:
groupIdentity
- The group identity- Returns:
- The group or null if not found
-
getGroup
Get a particular group of the givenGroupDirectory
by its id- Parameters:
groupDirectory
- The group directorygroupId
- The id of the group- Returns:
- The group or null if not found
-
getGroup
Get a particular group of the givenGroupDirectory
by its id- Parameters:
groupDirectoryId
- The id of the group directorygroupId
- The id of the group- Returns:
- The group or null if not found
-
getGroupByContext
Get a particular group on a given context- Parameters:
context
- The contextgroupId
- The id of the group- Returns:
- The group or null if not found
-
getGroups
Get all the groups of a givenGroupDirectory
- Parameters:
groupDirectory
- The group directory- Returns:
- The set of groups of the group directory
-
getGroups
Get all the groups of a givenGroupDirectory
- Parameters:
groupDirectoryId
- The id of the group directory- Returns:
- The set of groups of the group directory
-
getGroupsByContext
Get all the groups on a given context- Parameters:
context
- The context- Returns:
- The set of groups
-
getUserGroups
Get all the groups the given user is in- Parameters:
userIdentity
- The user identity.- Returns:
- The set of groups the user is in
-
getUserGroups
Get all the groups of aGroupDirectory
the given user is in- Parameters:
groupDirectory
- The group directoryuserIdentity
- The user identity.- Returns:
- A set of groups the user is in
-
getUserGroups
Get all the groups of aGroupDirectory
the given user is in- Parameters:
groupDirectoryId
- The id of the group directoryuserIdentity
- The user identity.- Returns:
- A set of groups the user is in
-