Package org.apache.lenya.inbox

Examples of org.apache.lenya.inbox.InboxMessage


        super.doCheckPreconditions();

        String id = getParameterAsString("messageId");
        if (id != null) {
            org.apache.lenya.inbox.Inbox inbox = (org.apache.lenya.inbox.Inbox) getParameter("inbox");
            InboxMessage message = inbox.getMessage(id);
            message.markAsRead(true);
        }
       
    }
View Full Code Here


        super.doExecute();
       
        String deleteId = getParameterAsString("deleteMessageId");
        if (deleteId != null) {
            org.apache.lenya.inbox.Inbox inbox = (org.apache.lenya.inbox.Inbox) getParameter("inbox");
            InboxMessage message = inbox.getMessage(deleteId);
            inbox.remove(message);
        }
    }
View Full Code Here

        this.manager = manager;
        this.user = user;
    }

    public synchronized InboxMessage add(Message message) {
        InboxMessage msg = new XmlSourceInboxMessage(this, generateId(), message, false);
        messages().add(msg);
        save();
        return msg;
    }
View Full Code Here

                    }
                    boolean read = Boolean.valueOf(readString).booleanValue();

                    Message message = new Message(subject, subjectParams, body, bodyParams, sender,
                            recipients);
                    InboxMessage msg = new XmlSourceInboxMessage(this, id, message, read);
                    this.messages.add(msg);
                }
            }

        } catch (Exception e) {
View Full Code Here

    protected void doExecute() throws Exception {
        super.doExecute();
        String id = getParameterAsString(PARAM_MESSAGE_ID);
        if (id != null) {
            org.apache.lenya.inbox.Inbox inbox = getInbox();
            InboxMessage message = inbox.getMessage(id);
            if (message == null) {
                addErrorMessage("The message " + id + " does not exist.");
            } else {
                inbox.remove(message);
            }
View Full Code Here

        org.apache.lenya.inbox.Inbox inbox = getInbox();

        String id = getParameterAsString(PARAM_MESSAGE_ID);
        if (id != null) {
            InboxMessage message = inbox.getMessage(id);
            if (message == null) {
                addErrorMessage("The message " + id + " does not exist.");
            } else {
                message.markAsRead(true);
            }
        }
       
        InboxMessage[] messages = inbox.getMessages();
        int nofUnreadMessages = 0;
View Full Code Here

        super.prepareView();
       
        String replyToMessageId = getParameterAsString(PARAM_REPLY_TO);
        if (replyToMessageId != null) {
            org.apache.lenya.inbox.Inbox inbox = getInbox();
            InboxMessage message = inbox.getMessage(replyToMessageId);
            if (message != null) {
                User sender = (User) message.getMessage().getSender();
                setParameter(PARAM_RECIPIENT, sender.getId());
            }
        }

        User user = getSession().getIdentity().getUser();
View Full Code Here

TOP

Related Classes of org.apache.lenya.inbox.InboxMessage

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.