Package org.apache.lenya.cms.observation

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


        } catch (TransactionException e) {
            throw new RepositoryException(e);
        }

        for (Iterator i = this.events.iterator(); i.hasNext();) {
            RepositoryEvent event = (RepositoryEvent) i.next();
            for (Iterator l = this.listeners.iterator(); l.hasNext();) {
                RepositoryListener listener = (RepositoryListener) l.next();
                listener.eventFired(event);
            }
        }
View Full Code Here


        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

        } catch (TransactionException e) {
            throw new RepositoryException(e);
        }

        for (Iterator i = this.events.iterator(); i.hasNext();) {
            RepositoryEvent event = (RepositoryEvent) i.next();
            for (Iterator l = this.listeners.iterator(); l.hasNext();) {
                RepositoryListener listener = (RepositoryListener) l.next();
                listener.eventFired(event);
            }
        }
View Full Code Here

        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

        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, getSession(),
                getLogger(), descriptor);
        getSession().enqueueEvent(event);
    }
View Full Code Here

        Identifiable[] recipients = { alice };

        Message message = new Message(SUBJECT, new String[0], "body", new String[0], lenya,
                recipients);
        NotificationEventDescriptor descr = new NotificationEventDescriptor(message);
        RepositoryEvent event = RepositoryEventFactory.createEvent(getManager(), session,
                getLogger(), descr);

        session.enqueueEvent(event);
       
        Inbox inbox = getInbox(alice);
View Full Code Here

            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

        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

            throw new RepositoryException(e);
        }
    }

    protected void enqueueEvent(Object descriptor) {
        RepositoryEvent event = RepositoryEventFactory.createEvent(this.manager, this, getLogger(),
                descriptor);
        getSession().enqueueEvent(event);
    }
View Full Code Here

        Identifiable[] recipients = { alice };

        Message message = new Message(SUBJECT, new String[0], "body", new String[0], lenya,
                recipients);
        NotificationEventDescriptor descr = new NotificationEventDescriptor(message);
        RepositoryEvent event = RepositoryEventFactory.createEvent(getManager(), session,
                getLogger(), descr);
        event.setNodeUri(getFactory().getPublication("test").getArea("authoring").getSite()
                .getNode("/index").getLink("en").getDocument().getRepositoryNode().getSourceURI());

        session.enqueueEvent(event);

        Inbox inbox = getInbox(alice);
View Full Code Here

TOP

Related Classes of org.apache.lenya.cms.observation.RepositoryEvent

Copyright © 2018 www.massapicom. 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.