Package org.encuestame.utils.web

Examples of org.encuestame.utils.web.TweetPollDetailBean


                        "/tweetpoll/" + tweetPoll.getTweetPollId() + "/" + tweetPoll.getQuestion().getSlugQuestion());
                text = VelocityEngineUtils.mergeTemplateIntoString(
                        velocityEngine, HTML_TEMPLATES + "/tweetpoll_form.vm", "utf-8", model);
            } else if (TypeSearchResult.TWEETPOLLRESULT.equals(typeItem)) {
                final TweetPoll tpoll = getTweetPollService().getTweetPollById(pollId);
                final TweetPollDetailBean tpollDetail = getTweetPollService().getTweetPollDetailInfo(pollId);
                model.put("owner_picture", domain + "/picture/profile/" + tpoll.getEditorOwner().getUsername() + "/thumbnail");
                model.put("editorOwner", tpoll.getEditorOwner());
                model.put("question", tpoll.getQuestion());
                model.put("url", EnMeUtils.createTweetPollUrlAccess(domain, tpoll));
                model.put("answersList", tpollDetail.getResults());
                model.put("date_published", EnMeUtils.formatDate(tpoll.getCreateDate(), "HH:mm - d MMMM yyyy"));
                text = VelocityEngineUtils.mergeTemplateIntoString(
                        velocityEngine, HTML_TEMPLATES + "/tweetpoll_votes.vm", "utf-8", model);
                embebedBody.setAditionalInfo(tpollDetail.getResults());
            } else if (TypeSearchResult.POLL.equals(typeItem)) {
                // generate poll body
                final Poll poll = getPollService().getPollById(pollId);
                final PollDetailBean detailBean = getPollService().getPollDetailInfo(poll.getPollId());
                model.put("owner_picture", domain + "/picture/profile/" + poll.getEditorOwner().getUsername() + "/thumbnail");
View Full Code Here


        }
     }

    public TweetPollDetailBean getTweetPollDetailInfo(final Long tpollId)
            throws EnMeNoResultsFoundException {
        final TweetPollDetailBean tpollDetail = new TweetPollDetailBean();

        final TweetPoll tpoll = getTweetPollById(tpollId);
        tpollDetail.setTpollBean(ConvertDomainBean
                .convertTweetPollToBean(tpoll));
        tpollDetail.setResults(this.getResultsByTweetPollId(tpoll
                .getTweetPollId()));
        tpollDetail.setListAnswers(ConvertDomainBean
                .convertAnswersToQuestionAnswerBean(getQuestionDao()
                        .getAnswersByQuestionId(tpoll.getQuestion().getQid())));
        return tpollDetail;
    }
View Full Code Here

TOP

Related Classes of org.encuestame.utils.web.TweetPollDetailBean

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.