Package org.jresearch.gossip.util

Examples of org.jresearch.gossip.util.MessageProcessor


                siteUrl.append(request.getContextPath());
                siteUrl.append(config.get(IConst.CONFIG.MODULE_PREFIX));
                siteUrl.append("/");

                String tSubj = dao.getThreadSubject(messageForm.getTid());
                MessageProcessor mp = MessageProcessor.getInstance();
                String mess = mp.prepareMessage(HtmlCodec.encode(messageForm
                        .getText()), 0, messages);
                mess = mp.cleanup(mess);

                /*
                 * {0} - subsriber's login {1} - site url {2} - show message url
                 * {3} - topic title {4} - new message text {5} - new message
                 * sender {6} - site name
View Full Code Here


        MessageResources messages = getResources(request);
        HttpSession session = request.getSession();
        SendAdminMailForm samForm = (SendAdminMailForm) form;
        User user = (User) session.getAttribute(IConst.SESSION.USER_KEY);
        UserDAO dao = UserDAO.getInstance();
        MessageProcessor mp = MessageProcessor.getInstance();
        String mess = mp.prepareMessage(HtmlCodec.encode(samForm.getText()), 0,
                messages);
        StringBuffer siteUrl = new StringBuffer();
        siteUrl.append(request.getServerName());
        siteUrl.append(":");
        siteUrl.append(request.getServerPort());
        siteUrl.append(request.getContextPath());
        siteUrl.append(Configurator.getInstance().get(
                IConst.CONFIG.MODULE_PREFIX));
        siteUrl.append("/");
        /*
         * {0} - login {1} - message text {2} - site url {3} - site name
         */
        Object[] messArgs = new Object[] { "", mp.nl2br(mess),
                siteUrl.toString(),
                Configurator.getInstance().get(IConst.CONFIG.SITE_NAME) };
        MailQueue queue = (MailQueue) session.getServletContext().getAttribute(
                IConst.CONTEXT.MAIL_QUEUE);
        try {
View Full Code Here

        return SKIP_BODY;
    }

    private String process(String result, boolean skipSmiles)
        throws ConfiguratorException {
        MessageProcessor mp = MessageProcessor.getInstance();
        Configurator conf = Configurator.getInstance();
        result = mp.prepareMessage(result, this.cutToLength,
                (MessageResources) pageContext.getServletContext().getAttribute(Globals.MESSAGES_KEY +
                    conf.get(IConst.CONFIG.MODULE_PREFIX)));

        if ((cutToLength == 0) && !skipSmiles) {
            result = mp.processEmoticons(result,
                    (MessageResources) pageContext.getServletContext()
                                                  .getAttribute(Globals.MESSAGES_KEY +
                        conf.get(IConst.CONFIG.MODULE_PREFIX)));
        }else if(skipSmiles){
            result=mp.cleanup(result);
        }

        return result;
    }
View Full Code Here

TOP

Related Classes of org.jresearch.gossip.util.MessageProcessor

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.