Examples of RepositoryEvent


Examples of org.apache.karaf.features.RepositoryEvent

     * @param uri the features repository URI.
     * @throws Exception in case of restore failure.
     */
    public void restoreRepository(URI uri) throws Exception {
        repositories.put(uri, (RepositoryImpl) repo.get());
        callListeners(new RepositoryEvent(repo.get(), RepositoryEvent.EventType.RepositoryAdded, false));
        features = null;
    }
View Full Code Here

Examples of org.apache.karaf.features.RepositoryEvent

    }

    public void registerListener(FeaturesListener listener) {
        listeners.add(listener);
        for (Repository repository : listRepositories()) {
            listener.repositoryEvent(new RepositoryEvent(repository, RepositoryEvent.EventType.RepositoryAdded, true));
        }
        for (Feature feature : listInstalledFeatures()) {
            listener.featureEvent(new FeatureEvent(feature, FeatureEvent.EventType.FeatureInstalled, true));
        }
    }
View Full Code Here

Examples of org.apache.karaf.features.RepositoryEvent

        validateRepository(uri);
        RepositoryImpl repo = null;
        repo = new RepositoryImpl(uri);
        repositories.put(uri, repo);
        repo.load();
        callListeners(new RepositoryEvent(repo, RepositoryEvent.EventType.RepositoryAdded, false));
        features = null;
        return repo;
       
    }
View Full Code Here

Examples of org.apache.karaf.features.RepositoryEvent

    }

    public void internalRemoveRepository(URI uri) {
        Repository repo = repositories.remove(uri);
        this.repo.set(repo);
        callListeners(new RepositoryEvent(repo, RepositoryEvent.EventType.RepositoryRemoved, false));
        features = null;
    }
View Full Code Here

Examples of org.apache.karaf.features.RepositoryEvent

        features = null;
    }
   
    public void restoreRepository(URI uri) throws Exception {
      repositories.put(uri, (RepositoryImpl)repo.get());
      callListeners(new RepositoryEvent(repo.get(), RepositoryEvent.EventType.RepositoryAdded, false));
        features = null;
    }
View Full Code Here

Examples of org.apache.lenya.cms.observation.RepositoryEvent

        Text[] params = { new Text(url, false), new Text(userMessage, false) };
        Text body = new Text(MESSAGE_DOCUMENT_PUBLISHED, params);
        Message message = new Message(subject, body, sender, recipients);

        NotificationEventDescriptor descriptor = new NotificationEventDescriptor(message);
        RepositoryEvent event = RepositoryEventFactory.createEvent(this.manager, liveVersion,
                getLogger(), descriptor);
        getSession().enqueueEvent(event);
    }
View Full Code Here

Examples of org.apache.lenya.cms.observation.RepositoryEvent

        String string = number + " " + encodeVersion(workflow, version);
        addToMetaData(string);
       
        WorkflowEventDescriptor descriptor = new WorkflowEventDescriptor(version);
        RepositoryEvent event = RepositoryEventFactory.createEvent(
                this.manager, getDocument(), getLogger(), descriptor);
        getDocument().getRepositoryNode().getSession().enqueueEvent(event);
    }
View Full Code Here

Examples of org.apache.lenya.cms.observation.RepositoryEvent

        Text subject = new Text(MESSAGE_SUBJECT, subjectParams);
        Text body = new Text(MESSAGE_DOCUMENT_PUBLISHED, params);
        Message message = new Message(subject, body, sender, recipients);

        NotificationEventDescriptor descriptor = new NotificationEventDescriptor(message);
        RepositoryEvent event = RepositoryEventFactory.createEvent(this.manager, getSession(),
                getLogger(), descriptor);
        getSession().enqueueEvent(event);
    }
View Full Code Here

Examples of org.apache.lenya.cms.observation.RepositoryEvent

            Text subject = new Text(MESSAGE_SUBJECT, subjectParams);
            Text body = new Text(MESSAGE_DOCUMENT_REJECTED, params);
            Message message = new Message(subject, body, sender, recipients);

            NotificationEventDescriptor descriptor = new NotificationEventDescriptor(message);
            RepositoryEvent event = RepositoryEventFactory.createEvent(this.manager, getSession(),
                    getLogger(), descriptor);
            getSession().enqueueEvent(event);
        }
    }
View Full Code Here

Examples of org.apache.lenya.cms.observation.RepositoryEvent

        Text body = new Text(MESSAGE_DOCUMENT_SUBMITTED, params);
        Message message = new Message(subject, body, sender, recipients);


        NotificationEventDescriptor descriptor = new NotificationEventDescriptor(message);
        RepositoryEvent event = RepositoryEventFactory.createEvent(this.manager, getSession(),
                getLogger(), descriptor);
        getSession().enqueueEvent(event);
    }
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.