Package javax.jcr.observation

Examples of javax.jcr.observation.ObservationManager.addEventListener()


                        vMgr.getPersistenceManager(), SYSTEM_ROOT_NODE_ID,
                        null, null, executor);

                SystemSession defSysSession = getSystemSession(wspName);
                ObservationManager obsMgr = defSysSession.getWorkspace().getObservationManager();
                obsMgr.addEventListener(systemSearchMgr, Event.NODE_ADDED
                        | Event.NODE_REMOVED | Event.PROPERTY_ADDED
                        | Event.PROPERTY_CHANGED | Event.PROPERTY_REMOVED,
                        "/" + defSysSession.getJCRName(NameConstants.JCR_SYSTEM),
                        true, null, null, false);
            }
View Full Code Here


                        latch.countDown();
                    }
                }
            };

            observationManager.addEventListener(listener, PROPERTY_CHANGED, testNodePath, true, null, null, false);

            //Now touch foo and modify foo2
            session.getNode(testNodePath).setProperty("foo","bar");
            session.getNode(testNodePath).setProperty("foo2","bar2");
            session.save();
View Full Code Here

                        context.getInternalVersionManager().getPersistenceManager(),
                        SYSTEM_ROOT_NODE_ID, null, null);

                SystemSession defSysSession = getSystemSession(wspName);
                ObservationManager obsMgr = defSysSession.getWorkspace().getObservationManager();
                obsMgr.addEventListener(systemSearchMgr, Event.NODE_ADDED
                        | Event.NODE_REMOVED | Event.PROPERTY_ADDED
                        | Event.PROPERTY_CHANGED | Event.PROPERTY_REMOVED,
                        "/" + defSysSession.getJCRName(NameConstants.JCR_SYSTEM),
                        true, null, null, false);
            }
View Full Code Here

                systemSession.getJCRName(NT_REP_ACCESS_CONTROLLABLE),
                systemSession.getJCRName(NT_REP_ACL),
                systemSession.getJCRName(NT_REP_ACE)
        };
        String rootPath = systemSession.getRootNode().getPath();
        observationMgr.addEventListener(this, events, rootPath, true, null, ntNames, true);
        /*
         In addition both the collector and all subscribed listeners should be
         informed about any kind of move events.
         */
        moveListener = new MoveListener();
View Full Code Here

        /*
         In addition both the collector and all subscribed listeners should be
         informed about any kind of move events.
         */
        moveListener = new MoveListener();
        observationMgr.addEventListener(moveListener, Event.NODE_MOVED, rootPath, true, null, null, true);
    }

    /**
     * Release all resources contained by this instance. It will no longer be
     * used. This implementation only stops listening to ac modification events.
View Full Code Here

                        context.getInternalVersionManager().getPersistenceManager(),
                        SYSTEM_ROOT_NODE_ID, null, null);

                SystemSession defSysSession = getSystemSession(wspName);
                ObservationManager obsMgr = defSysSession.getWorkspace().getObservationManager();
                obsMgr.addEventListener(systemSearchMgr, Event.NODE_ADDED
                        | Event.NODE_REMOVED | Event.PROPERTY_ADDED
                        | Event.PROPERTY_CHANGED | Event.PROPERTY_REMOVED,
                        "/" + defSysSession.getJCRName(NameConstants.JCR_SYSTEM),
                        true, null, null, false);
            }
View Full Code Here

                        context.getInternalVersionManager().getPersistenceManager(),
                        SYSTEM_ROOT_NODE_ID, null, null);

                SystemSession defSysSession = getSystemSession(wspName);
                ObservationManager obsMgr = defSysSession.getWorkspace().getObservationManager();
                obsMgr.addEventListener(systemSearchMgr, Event.NODE_ADDED
                        | Event.NODE_REMOVED | Event.PROPERTY_ADDED
                        | Event.PROPERTY_CHANGED | Event.PROPERTY_REMOVED,
                        "/" + defSysSession.getJCRName(NameConstants.JCR_SYSTEM),
                        true, null, null, false);
            }
View Full Code Here

                        nsReg, ntReg, getWorkspaceInfo(wspName).itemStateMgr,
                        vMgr.getPersistenceManager(), SYSTEM_ROOT_NODE_ID, null, null);

                SystemSession defSysSession = getSystemSession(wspName);
                ObservationManager obsMgr = defSysSession.getWorkspace().getObservationManager();
                obsMgr.addEventListener(systemSearchMgr, Event.NODE_ADDED
                        | Event.NODE_REMOVED | Event.PROPERTY_ADDED
                        | Event.PROPERTY_CHANGED | Event.PROPERTY_REMOVED,
                        "/" + defSysSession.getJCRName(NameConstants.JCR_SYSTEM),
                        true, null, null, false);
            }
View Full Code Here

                        context.getInternalVersionManager().getPersistenceManager(),
                        SYSTEM_ROOT_NODE_ID, null, null);

                SystemSession defSysSession = getSystemSession(wspName);
                ObservationManager obsMgr = defSysSession.getWorkspace().getObservationManager();
                obsMgr.addEventListener(systemSearchMgr, Event.NODE_ADDED
                        | Event.NODE_REMOVED | Event.PROPERTY_ADDED
                        | Event.PROPERTY_CHANGED | Event.PROPERTY_REMOVED,
                        "/" + defSysSession.getJCRName(NameConstants.JCR_SYSTEM),
                        true, null, null, false);
            }
View Full Code Here

        final List<Event> failedEvents = new ArrayList<Event>();
        final AtomicReference<CountDownLatch> eventCount = new AtomicReference<CountDownLatch>();
        final Session observingSession = createAnonymousSession();
        try {
            ObservationManager obsMgr = observingSession.getWorkspace().getObservationManager();
            obsMgr.addEventListener(new EventListener() {
                @Override
                public void onEvent(EventIterator events) {
                    while (events.hasNext()) {
                        Event event = events.nextEvent();
                        try {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.