public class GroupManager extends AbstractLogEnabled implements Component, Serviceable
Modifier and Type | Field and Description |
---|---|
protected GroupDirectoryContextHelper |
_directoryContextHelper
The helper for the associations group directory/context
|
protected GroupDirectoryDAO |
_groupDirectoryDAO
The DAO for group directories
|
static String |
ROLE
Avalon Role
|
Constructor and Description |
---|
GroupManager() |
Modifier and Type | Method and Description |
---|---|
Group |
getGroup(GroupDirectory groupDirectory,
String groupId)
Get a particular group of the given
GroupDirectory by its id |
Group |
getGroup(GroupIdentity groupIdentity)
Get a particular group of the given
GroupDirectory by its id |
Group |
getGroup(String groupDirectoryId,
String groupId)
Get a particular group of the given
GroupDirectory by its id |
Group |
getGroupByContext(String context,
String groupId)
Get a particular group on a given context
|
Set<Group> |
getGroups(GroupDirectory groupDirectory)
Get all the groups of a given
GroupDirectory |
Set<Group> |
getGroups(String groupDirectoryId)
Get all the groups of a given
GroupDirectory |
Set<Group> |
getGroupsByContext(String context)
Get all the groups on a given context
|
Set<String> |
getUserGroups(GroupDirectory groupDirectory,
UserIdentity userIdentity)
Get all the groups of a
GroupDirectory the given user is in |
Set<String> |
getUserGroups(String groupDirectoryId,
UserIdentity userIdentity)
Get all the groups of a
GroupDirectory the given user is in |
Set<GroupIdentity> |
getUserGroups(UserIdentity userIdentity)
Get all the groups the given user is in
|
void |
service(ServiceManager manager) |
getLogger, setLogger
protected GroupDirectoryDAO _groupDirectoryDAO
protected GroupDirectoryContextHelper _directoryContextHelper
public GroupManager()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public Group getGroup(GroupIdentity groupIdentity)
GroupDirectory
by its idgroupIdentity
- The group identitypublic Group getGroup(GroupDirectory groupDirectory, String groupId)
GroupDirectory
by its idgroupDirectory
- The group directorygroupId
- The id of the grouppublic Group getGroup(String groupDirectoryId, String groupId)
GroupDirectory
by its idgroupDirectoryId
- The id of the group directorygroupId
- The id of the grouppublic Group getGroupByContext(String context, String groupId)
context
- The contextgroupId
- The id of the grouppublic Set<Group> getGroups(GroupDirectory groupDirectory)
GroupDirectory
groupDirectory
- The group directorypublic Set<Group> getGroups(String groupDirectoryId)
GroupDirectory
groupDirectoryId
- The id of the group directorypublic Set<Group> getGroupsByContext(String context)
context
- The contextpublic Set<GroupIdentity> getUserGroups(UserIdentity userIdentity)
userIdentity
- The user identity.public Set<String> getUserGroups(GroupDirectory groupDirectory, UserIdentity userIdentity)
GroupDirectory
the given user is ingroupDirectory
- The group directoryuserIdentity
- The user identity.public Set<String> getUserGroups(String groupDirectoryId, UserIdentity userIdentity)
GroupDirectory
the given user is ingroupDirectoryId
- The id of the group directoryuserIdentity
- The user identity.