Examples of ConversationMessage


Examples of org.fenixedu.academic.domain.messaging.ConversationMessage

        String quotedMessageId = this.getQuotedMessageId(request);
        String quotationText = null;
        if (quotedMessageId != null) {
            MessageResources resources = this.getResources(request, "MESSAGING_RESOURCES");
            ConversationMessage message = (ConversationMessage) FenixFramework.getDomainObject(quotedMessageId);

            String author = message.getCreator().getName() + " (" + message.getCreator().getUsername() + ")";

            quotationText =
                    resources.getMessage(this.getLocale(request), "messaging.viewThread.quotationText", author, message.getBody()
                            .getContent());

        }
        return new MultiLanguageString(quotationText);
    }
View Full Code Here

Examples of org.fenixedu.academic.domain.messaging.ConversationMessage

        sendEmailWithConversationMessage(teachers, students, conversationMessage);

    }

    private void notifyLastReplier(ConversationMessage conversationMessage) {
        ConversationMessage nextToLastConversationMessage =
                conversationMessage.getConversationThread().getNextToLastConversationMessage();

        if (nextToLastConversationMessage != null) {
            Person nextToLastMessageReplier = nextToLastConversationMessage.getCreator();
            if (!conversationMessage.getConversationThread().getForum()
                    .isPersonReceivingMessagesByEmail(nextToLastMessageReplier)) {
                final Set<Person> teachers = new HashSet<Person>();
                final Set<Person> students = new HashSet<Person>();
                if (nextToLastMessageReplier.hasRole(RoleType.TEACHER)) {
View Full Code Here

Examples of org.fenixedu.academic.domain.messaging.ConversationMessage

        super();
    }

    protected void run(CreateConversationMessageBean createConversationMessageBean) {

        ConversationMessage conversationMessage =
                createConversationMessageBean.getConversationThread().createConversationMessage(
                        createConversationMessageBean.getCreator(), createConversationMessageBean.getBody());
        super.sendNotifications(conversationMessage);

    }
View Full Code Here

Examples of org.fenixedu.academic.domain.messaging.ConversationMessage

        ConversationThread conversationThread =
                createConversationThreadAndMessageBean.getForum().createConversationThread(creator,
                        createConversationThreadAndMessageBean.getSubject());

        ConversationMessage conversationMessage =
                conversationThread.createConversationMessage(creator, createConversationThreadAndMessageBean.getBody());
        super.sendNotifications(conversationMessage);

    }
View Full Code Here

Examples of org.jboss.errai.bus.client.ConversationMessage

            /**
             * Prepare to send a message back to the client, informing it that a successful login has
             * been performed.
             */
            ConversationMessage successfulMsg = ConversationMessage.create(message)
                    .command(SecurityCommands.SuccessfulAuth)
                    .toSubject("LoginClient")
                    .set(SecurityParts.Roles, authSubject.toRolesString())
                    .set(SecurityParts.Name, name);

            try {
                ResourceBundle bundle = ResourceBundle.getBundle("errai");
                String motdText = bundle.getString("errai.login_motd");

                /**
                 * If the MOTD is configured, then add it to the message.
                 */
                if (motdText != null) {
                    successfulMsg.set(MessageParts.MessageText, motdText);
                }
            }
            catch (Exception e) {
                // do nothing.
            }

            /**
             * Transmit the message back to the client.
             */
            successfulMsg.sendNowWith(bus);
        }
        catch (LoginException e) {
            /**
             * The login failed. How upsetting. Life must go on, and we must inform the client of the
             * unfortunate news.
View Full Code Here

Examples of org.jboss.errai.bus.client.ConversationMessage

        bus.subscribe("ClientNegotiationService", new MessageCallback() {
            public void callback(CommandMessage message) {
                AuthSubject subject = (AuthSubject)
                        ((HttpSession) message.getResource("Session")).getAttribute(ErraiService.SESSION_AUTH_DATA);

                ConversationMessage reply = ConversationMessage.create(message);

                if (subject != null) {
                    reply.set(SecurityParts.Roles, subject.toRolesString());
                    reply.set(SecurityParts.Name, subject.getUsername());
                }

                reply.sendNowWith(bus);
            }
        });

        configurator.configure();
    }
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.