Class EntryCollector
- java.lang.Object
-
- org.apache.jackrabbit.core.security.authorization.AccessControlObserver
-
- org.apache.jackrabbit.core.security.authorization.acl.EntryCollector
-
- All Implemented Interfaces:
EventListener
,SynchronousEventListener
,AccessControlConstants
public class EntryCollector extends AccessControlObserver implements AccessControlConstants
EntryCollector
collects ACEs defined and effective for a givenNode
and listens to access control modifications in order to inform listeners.
-
-
Field Summary
Fields Modifier and Type Field Description protected NodeId
rootID
The root id.protected SessionImpl
systemSession
The system session used to register an event listener and process the events as well as collect AC entries.-
Fields inherited from class org.apache.jackrabbit.core.security.authorization.AccessControlObserver
MOVE, POLICY_ADDED, POLICY_MODIFIED, POLICY_REMOVED
-
Fields inherited from interface org.apache.jackrabbit.core.security.authorization.AccessControlConstants
N_ACCESSCONTROL, N_POLICY, N_REPO_POLICY, NT_REP_ACCESS_CONTROL, NT_REP_ACCESS_CONTROLLABLE, NT_REP_ACE, NT_REP_ACL, NT_REP_DENY_ACE, NT_REP_GRANT_ACE, NT_REP_PRINCIPAL_ACCESS_CONTROL, NT_REP_REPO_ACCESS_CONTROLLABLE, P_GLOB, P_PRINCIPAL_NAME, P_PRIVILEGES
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
EntryCollector(SessionImpl systemSession, NodeId rootID)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
close()
Release all resources contained by this instance.protected List<org.apache.jackrabbit.core.security.authorization.acl.Entry>
collectEntries(NodeImpl node, EntryFilter filter)
Collect the ACEs effective at the given node applying the specified filter.protected org.apache.jackrabbit.core.security.authorization.acl.EntryCollector.Entries
getEntries(NodeId nodeId)
protected org.apache.jackrabbit.core.security.authorization.acl.EntryCollector.Entries
getEntries(NodeImpl node)
Retrieve the access control entries defined for the given node.void
onEvent(EventIterator events)
Collects access controlled nodes that are effected by access control changes together with the corresponding modification types, and notifies access control listeners about the modifications.-
Methods inherited from class org.apache.jackrabbit.core.security.authorization.AccessControlObserver
addListener, notifyListeners, removeListener
-
-
-
-
Field Detail
-
systemSession
protected final SessionImpl systemSession
The system session used to register an event listener and process the events as well as collect AC entries.
-
rootID
protected final NodeId rootID
The root id.
-
-
Constructor Detail
-
EntryCollector
protected EntryCollector(SessionImpl systemSession, NodeId rootID) throws RepositoryException
- Parameters:
systemSession
-rootID
-- Throws:
RepositoryException
-
-
Method Detail
-
close
protected void close()
Release all resources contained by this instance. It will no longer be used. This implementation only stops listening to ac modification events.- Overrides:
close
in classAccessControlObserver
-
collectEntries
protected List<org.apache.jackrabbit.core.security.authorization.acl.Entry> collectEntries(NodeImpl node, EntryFilter filter) throws RepositoryException
Collect the ACEs effective at the given node applying the specified filter.- Parameters:
node
-filter
-- Returns:
- Throws:
RepositoryException
-
getEntries
protected org.apache.jackrabbit.core.security.authorization.acl.EntryCollector.Entries getEntries(NodeImpl node) throws RepositoryException
Retrieve the access control entries defined for the given node. If the node is not access controlled or if the ACL is empty this method returns an empty list.- Parameters:
node
-- Returns:
- Throws:
RepositoryException
-
getEntries
protected org.apache.jackrabbit.core.security.authorization.acl.EntryCollector.Entries getEntries(NodeId nodeId) throws RepositoryException
- Parameters:
nodeId
-- Returns:
- Throws:
RepositoryException
-
onEvent
public void onEvent(EventIterator events)
Collects access controlled nodes that are effected by access control changes together with the corresponding modification types, and notifies access control listeners about the modifications.- Specified by:
onEvent
in interfaceEventListener
- Parameters:
events
-
-
-