Package org.fenixedu.academic.domain.messaging

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


    }

    private ActionForward viewThreadOnPage(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response, Integer pageNumber) throws FenixServiceException {

        ConversationThread thread = this.getRequestedThread(request);
        request.setAttribute("thread", thread);

        request.setAttribute("pageNumber", pageNumber);
        request.setAttribute("pageNumbers", computeNumberOfPages(DEFAULT_PAGE_SIZE, thread.getMessageSet().size()));
        request.setAttribute("messages", getContentToDisplay(thread.getMessageSet(), pageNumber, DEFAULT_PAGE_SIZE));

        Person loggedPerson = getLoggedPerson(request);
        request.setAttribute("person", loggedPerson);

        Forum forum = getRequestedForum(request);
View Full Code Here


    }

    private static void copyThreads(ExecutionCourseForum sourceForum, ExecutionCourseForum targetForum) {

        while (!sourceForum.getConversationThreadSet().isEmpty()) {
            ConversationThread sourceConversationThread = sourceForum.getConversationThreadSet().iterator().next();

            if (!targetForum.hasConversationThreadWithSubject(sourceConversationThread.getTitle())) {
                sourceConversationThread.setForum(targetForum);
            } else {
                ConversationThread targetConversionThread =
                        targetForum.getConversationThreadBySubject(sourceConversationThread.getTitle());
                for (ConversationMessage message : sourceConversationThread.getMessageSet()) {
                    message.setConversationThread(targetConversionThread);
                }
                sourceForum.removeConversationThread(sourceConversationThread);
View Full Code Here

    protected void run(CreateConversationThreadAndMessageBean createConversationThreadAndMessageBean) {

        Person creator = createConversationThreadAndMessageBean.getCreator();

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

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

    }
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.domain.messaging.ConversationThread

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.