Package org.apache.lenya.notification

Examples of org.apache.lenya.notification.Message


        Text subject = new Text(MESSAGE_SUBJECT, subjectParams);
       
        String userMessage = getParameterAsString(PARAM_USER_NOTIFICATION_MESSAGE, "");
        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


        Identifiable[] recipients = { recipient };
        String subject = getSubject();
        String body = getBody();

        Message message = new Message(subject, new String[0], body, new String[0], sender,
                recipients);
        NotificationUtil.notify(this.manager, message);

    }
View Full Code Here

       
        Text[] subjectParams = { new Text(getEvent(), true) };
        Text[] params = { new Text(url, false) };
        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

           
            Text[] subjectParams = { new Text(getEvent(), true) };
            Text[] params = { new Text(reason, false), new Text(url, false) };
            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

        Text[] subjectParams = { new Text(getEvent(), true) };
        Text[] params = { new Text(url, false) };
        Text subject = new Text(MESSAGE_SUBJECT, subjectParams);
        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);
View Full Code Here

            String subject = "indexing-failed-subject";
            String[] subjectParams = new String[0];
            String body = "indexing-failed-body";
            String[] bodyParams = { this.pubId, this.area, this.uuid, this.language, msg };

            Message message = new Message(subject, subjectParams, body, bodyParams, sender,
                    recipients);
            NotificationUtil.notify(this.manager, message);

            getLogger().error(
                    "Could not index document [" + this.pubId + ":" + this.area + ":" + this.uuid
View Full Code Here

                        + request.getServerPort();
                final String webappUrl = authoringVersion.getCanonicalWebappURL();
                url = serverUrl + request.getContextPath() + webappUrl;
            }
            String[] params = { reason, url };
            Message message = new Message(MESSAGE_SUBJECT, new String[0],
                    MESSAGE_DOCUMENT_REJECTED, params, sender, recipients);

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

                        + request.getServerPort();
                final String webappUrl = liveVersion.getCanonicalWebappURL();
                url = serverUrl + request.getContextPath() + webappUrl;
            }
            String[] params = { url };
            Message message = new Message(MESSAGE_SUBJECT, new String[0],
                    MESSAGE_DOCUMENT_PUBLISHED, params, sender, recipients);

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

            url = serverUrl + request.getContextPath() + webappUrl;
        }

        String[] params = { url };

        Message message = new Message(MESSAGE_SUBJECT, new String[0], MESSAGE_DOCUMENT_SUBMITTED,
                params, sender, recipients);
        NotificationEventDescriptor descriptor = new NotificationEventDescriptor(message);
        RepositoryEvent event = RepositoryEventFactory.createEvent(this.manager, getSession(),
                getLogger(), descriptor);
        getSession().enqueueEvent(event);
View Full Code Here

            String subject = "indexing-failed-subject";
            String[] subjectParams = new String[0];
            String body = "indexing-failed-body";
            String[] bodyParams = { this.pubId, this.area, this.uuid, this.language, msg };

            Message message = new Message(subject, subjectParams, body, bodyParams, sender,
                    recipients);
            NotificationUtil.notify(this.manager, message);

            getLogger().error(
                    "Could not index document [" + this.pubId + ":" + this.area + ":" + this.uuid
View Full Code Here

TOP

Related Classes of org.apache.lenya.notification.Message

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.