public interface GroupManager
Group
Modifier and Type | Method and Description |
---|---|
Group |
addGroup(Group group,
String groupName)
Adds a group to a group.
|
Group |
addRole(Group group,
String roleName)
Grants a role to a group.
|
Group |
createGroup(String name)
Creates a new group in the root folder.
|
Map<String,ACL> |
getACLs(String group) |
Collection<Group> |
getAllGroups()
Get all groups defined in the system.
|
Collection<String> |
getAllGroups(String groupName)
Deprecated.
since 5.5, use
getAllSuperGroups(String) instead. |
Collection<String> |
getAllSubGroups(String groupName)
Returns all sub-groups of the given group.
|
Collection<String> |
getAllSuperGroups(String groupName)
Returns all super-groups of the given group, i.e.
|
Collection<String> |
getDirectSubGroups(String groupName)
Returns sub-groups directly assigned to the given group.
|
Collection<String> |
getDirectSuperGroups(String groupName)
Returns direct super-groups of the given group.
|
Group |
getGroup(String name)
Get a group by name.
|
Collection<String> |
getGroupsWithGroup(String groupName)
Deprecated.
since 5.5, use
getDirectSubGroups(String) instead. |
Collection<String> |
getGroupsWithRole(String roleName)
Returns all groups having assigned the provided role.
|
Group |
removeGroup(Group group,
String groupName)
Removes group from a group.
|
Group |
removeRole(Group group,
String roleName)
Removes role from a group.
|
Group createGroup(String name) throws UnsupportedOperationException, AccessDeniedException
IllegalArgumentException
- if the name is not valid or if a group with this name already existsUnsupportedOperationException
- if the implementation does not support writingAccessDeniedException
Group getGroup(String name) throws UnsupportedOperationException, AccessDeniedException
UnsupportedOperationException
- if the implementation does not support writingAccessDeniedException
Collection<Group> getAllGroups() throws UnsupportedOperationException
UnsupportedOperationException
@Deprecated Collection<String> getAllGroups(String groupName) throws UnsupportedOperationException
getAllSuperGroups(String)
instead.UnsupportedOperationException
getAllSuperGroups(String)
Collection<String> getAllSuperGroups(String groupName) throws UnsupportedOperationException
Given the following groups:
/ ├── people │ └──employees ("employees" is directly assigned to the "people" super-group) │ └──developers ("developers" is directly assigned to the "employees" super-group; and is thus transitively assigned to the "people" super-group) #getAllSuperGroups("people") = [] #getAllSuperGroups("employees") = ["people"] #getAllSuperGroups("developers") = ["employees","people"]
UnsupportedOperationException
Collection<String> getAllSubGroups(String groupName) throws UnsupportedOperationException
Given the following groups:
/ ├── people │ └──employees ("employees" is directly assigned to the "people" super-group) │ └──developers ("developers" is directly assigned to the "employees" super-group; and is thus transitively assigned to the "people" super-group) #getAllSubGroups("people") = ["employees","developers"] #getAllSubGroups("employees") = ["developers"] #getAllSubGroups("developers") = []
UnsupportedOperationException
Group addRole(Group group, String roleName) throws AccessDeniedException
AccessDeniedException
Group addGroup(Group group, String groupName) throws AccessDeniedException
AccessDeniedException
@Deprecated Collection<String> getGroupsWithGroup(String groupName)
getDirectSubGroups(String)
instead.getDirectSubGroups(String)
Collection<String> getDirectSubGroups(String groupName)
Given the following groups:
/ ├── people │ └──employees ("employees" is directly assigned to the "people" super-group) │ └──developers ("developers" is directly assigned to the "employees" super-group; and is thus transitively assigned to the "people" super-group) #getDirectSubGroups("people") = ["employees"] #getDirectSubGroups("employees") = ["developers"] #getDirectSubGroups("developers") = []
Collection<String> getDirectSuperGroups(String groupName)
Given the following groups:
/ ├── people │ └──employees ("employees" is directly assigned to the "people" super-group) │ └──developers ("developers" is directly assigned to the "employees" super-group; and is thus transitively assigned to the "people" super-group) #getDirectSuperGroups("people") = [] #getDirectSuperGroups("employees") = ["people"] #getDirectSuperGroups("developers") = ["employees"]
Collection<String> getGroupsWithRole(String roleName)
Group removeGroup(Group group, String groupName) throws AccessDeniedException
AccessDeniedException
Group removeRole(Group group, String roleName) throws AccessDeniedException
AccessDeniedException
Copyright © 2003–2018 Magnolia International Ltd.. All rights reserved.