protected EntryCollector(SessionImpl systemSession, ACLEditor systemEditor, NodeId rootID) throws RepositoryException {
this.systemSession = systemSession;
this.systemEditor = systemEditor;
this.rootID = rootID;
ObservationManager observationMgr = systemSession.getWorkspace().getObservationManager();
/*
Make sure the collector and all subscribed listeners are informed upon
ACL modifications. Interesting events are:
- new ACL (NODE_ADDED)
- new ACE (NODE_ADDED)
- changing ACE (PROPERTY_CHANGED)
- removed ACL (NODE_REMOVED)
- removed ACE (NODE_REMOVED)
*/
int events = Event.PROPERTY_CHANGED | Event.NODE_ADDED | Event.NODE_REMOVED;
String[] ntNames = new String[] {
systemSession.getJCRName(NT_REP_ACCESS_CONTROLLABLE),
systemSession.getJCRName(NT_REP_ACL),
systemSession.getJCRName(NT_REP_ACE)
};
observationMgr.addEventListener(this, events, systemSession.getRootNode().getPath(), true, null, ntNames, true);
}