public abstract class AbstractAccessControlProvider extends Object implements AccessControlProvider
AccessControlProvider.initialize(AccessControlSchema) from the derived implementation.| Modifier and Type | Field and Description |
|---|---|
private Map<String,AccessControl> |
id2nodeMap |
private static org.slf4j.Logger |
LOG
Logger instance.
|
| Constructor and Description |
|---|
AbstractAccessControlProvider()
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkForCyclicDependencies(AccessControlGroup group,
Set<AccessControlGroup> visitedGroups)
Checks that the given
AccessControlGroup has no cyclic inheritance
graph. |
boolean |
collectAccessControlIds(String groupId,
Set<String> permissions)
This method collects the
IDs of all AccessControlPermissions (or more
precisely of all AccessControls) contained in the AccessControl identified by the given groupId. |
protected void |
collectAccessControls(AccessControlGroup group,
Set<AccessControlGroup> toplevelGroups)
Called from
initialize(AccessControlSchema) to collect all AccessControls recursively. |
boolean |
collectAccessControls(String groupId,
Set<AccessControl> permissions)
This method collects the
AccessControls contained in the AccessControl
identified by the given groupId. |
void |
collectPermissionIds(AccessControlGroup group,
Set<String> permissions)
Recursive implementation of
collectAccessControlIds(String, Set) for AccessControlGroups. |
void |
collectPermissionNodes(AccessControlGroup group,
Set<AccessControl> permissions)
Recursive implementation of
collectAccessControls(String, Set) for AccessControlGroups. |
AccessControl |
getAccessControl(String nodeId) |
protected void |
initialize(AccessControlSchema config)
Performs the required initialization of this class.
|
private static final org.slf4j.Logger LOG
private final Map<String,AccessControl> id2nodeMap
getAccessControl(String)public AbstractAccessControlProvider()
protected void initialize(AccessControlSchema config)
config - is the AccessControlSchema.protected void checkForCyclicDependencies(AccessControlGroup group, Set<AccessControlGroup> visitedGroups)
AccessControlGroup has no cyclic inheritance
graph.group - is the AccessControlGroup to check.visitedGroups - is where the AccessControlGroup are collected to detect cycles.protected void collectAccessControls(AccessControlGroup group, Set<AccessControlGroup> toplevelGroups)
initialize(AccessControlSchema) to collect all AccessControls recursively.group - the AccessControlGroup to traverse.toplevelGroups - is the Set of all AccessControlGroups from
AccessControlSchema.getGroups().public AccessControl getAccessControl(String nodeId)
getAccessControl in interface AccessControlProvidernodeId - is the ID of the requested AccessControl.AccessControl or null if not found.public boolean collectAccessControlIds(String groupId, Set<String> permissions)
AccessControlProviderIDs of all AccessControlPermissions (or more
precisely of all AccessControls) contained in the AccessControl identified by the given groupId.collectAccessControlIds in interface AccessControlProvidergroupId - is the ID of the AccessControl (typically an
AccessControlGroup) to collect.permissions - is the Set where to add the collected
IDs. This will include the given groupId.true if the given groupId has been found, false otherwise.AccessControlProvider.collectAccessControls(String, Set)public void collectPermissionIds(AccessControlGroup group, Set<String> permissions)
collectAccessControlIds(String, Set) for AccessControlGroups.group - is the AccessControlGroup to traverse.permissions - is the Set used to collect.public boolean collectAccessControls(String groupId, Set<AccessControl> permissions)
AccessControlProviderAccessControls contained in the AccessControl
identified by the given groupId.collectAccessControls in interface AccessControlProvidergroupId - is the ID of the AccessControl (typically an
AccessControlGroup) to collect.permissions - is the Set where to add the collected AccessControls.
This will include the AccessControl identified by the given
groupId.true if the given groupId has been found, false otherwise.public void collectPermissionNodes(AccessControlGroup group, Set<AccessControl> permissions)
collectAccessControls(String, Set) for AccessControlGroups.group - is the AccessControlGroup to traverse.permissions - is the Set used to collect.Copyright © 2014–2016 OASP-Team. All rights reserved.