Examples of ObservationManager


Examples of javax.jcr.observation.ObservationManager

    /**
     * Utility method that removes all registered event listeners.
     */
    private void removeRegisteredEventListeners() {
        try {
            ObservationManager manager = getWorkspace().getObservationManager();
            // Use a copy to avoid modifying the set of registered listeners
            // while iterating over it
            Collection<EventListener> listeners =
                IteratorUtils.toList(manager.getRegisteredEventListeners());
            for (EventListener listener : listeners) {
                try {
                    manager.removeEventListener(listener);
                } catch (RepositoryException e) {
                    log.warn("Error removing event listener: " + listener, e);
                }
            }
        } catch (RepositoryException e) {
View Full Code Here

Examples of javax.jcr.observation.ObservationManager

                        context.getInternalVersionManager().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

Examples of javax.jcr.observation.ObservationManager

                        getWorkspaceInfo(wspName).itemStateMgr,
                        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

Examples of javax.jcr.observation.ObservationManager

     */
    private void registerSubscription(SubscriptionImpl subscription,
                                      ObservationResource resource) throws DavException {
        try {
            Session session = getRepositorySession(resource);
            ObservationManager oMgr = session.getWorkspace().getObservationManager();
            String itemPath = subscription.getLocator().getRepositoryPath();
            oMgr.addEventListener(subscription, subscription.getJcrEventTypes(),
                    itemPath, subscription.isDeep(),
                    subscription.getUuidFilters(),
                    subscription.getNodetypeNameFilters(),
                    subscription.isNoLocal());
        } catch (RepositoryException e) {
View Full Code Here

Examples of javax.jcr.observation.ObservationManager

    /**
     * Utility method that removes all registered event listeners.
     */
    private void removeRegisteredEventListeners() {
        try {
            ObservationManager manager = getWorkspace().getObservationManager();
            // Use a copy to avoid modifying the set of registered listeners
            // while iterating over it
            Collection<EventListener> listeners =
                IteratorUtils.toList(manager.getRegisteredEventListeners());
            for (EventListener listener : listeners) {
                try {
                    manager.removeEventListener(listener);
                } catch (RepositoryException e) {
                    log.warn("Error removing event listener: " + listener, e);
                }
            }
        } catch (RepositoryException e) {
View Full Code Here

Examples of javax.jcr.observation.ObservationManager

      this.prefixes = new LinkedHashMap<String, String>();

      // Observation manager per session
      ObservationManagerRegistry observationManagerRegistry =
         (ObservationManagerRegistry)container.getComponentInstanceOfType(ObservationManagerRegistry.class);
      ObservationManager observationManager = observationManagerRegistry.createObservationManager(this);

      LocalWorkspaceDataManagerStub workspaceDataManager =
         (LocalWorkspaceDataManagerStub)container.getComponentInstanceOfType(LocalWorkspaceDataManagerStub.class);

      this.dataManager = new SessionDataManager(this, workspaceDataManager);
View Full Code Here

Examples of javax.jcr.observation.ObservationManager

      this.prefixes = new LinkedHashMap<String, String>();

      // Observation manager per session
      ObservationManagerRegistry observationManagerRegistry =
         (ObservationManagerRegistry)container.getComponentInstanceOfType(ObservationManagerRegistry.class);
      ObservationManager observationManager = observationManagerRegistry.createObservationManager(this);

      LocalWorkspaceDataManagerStub workspaceDataManager =
         (LocalWorkspaceDataManagerStub)container.getComponentInstanceOfType(LocalWorkspaceDataManagerStub.class);

      this.dataManager = new SessionDataManager(this, workspaceDataManager);
View Full Code Here

Examples of javax.jcr.observation.ObservationManager

      this.prefixes = new LinkedHashMap<String, String>();

      // Observation manager per session
      ObservationManagerRegistry observationManagerRegistry =
         (ObservationManagerRegistry)container.getComponentInstanceOfType(ObservationManagerRegistry.class);
      ObservationManager observationManager = observationManagerRegistry.createObservationManager(this);

      LocalWorkspaceDataManagerStub workspaceDataManager =
         (LocalWorkspaceDataManagerStub)container.getComponentInstanceOfType(LocalWorkspaceDataManagerStub.class);

      this.dataManager = new SessionDataManager(this, workspaceDataManager);
View Full Code Here

Examples of javax.jcr.observation.ObservationManager

      this.prefixes = new LinkedHashMap<String, String>();

      // Observation manager per session
      ObservationManagerRegistry observationManagerRegistry =
         (ObservationManagerRegistry)container.getComponentInstanceOfType(ObservationManagerRegistry.class);
      ObservationManager observationManager = observationManagerRegistry.createObservationManager(this);

      LocalWorkspaceDataManagerStub workspaceDataManager =
         (LocalWorkspaceDataManagerStub)container.getComponentInstanceOfType(LocalWorkspaceDataManagerStub.class);

      this.dataManager = new SessionDataManager(this, workspaceDataManager);
View Full Code Here

Examples of javax.jcr.observation.ObservationManager

        this.dispatcher = dispatcher;
        this.session = session;
        this.pathPrefix = pathPrefix;
        if (session != null) {
            try {
                ObservationManager manager =
                    session.getWorkspace().getObservationManager();
                this.userData = ((ObservationManagerImpl) manager).getUserData();
            } catch (RepositoryException e) {
                // should never happen because this
                // implementation supports observation
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.