Package org.encuestame.utils.json

Examples of org.encuestame.utils.json.LinksSocialBean


    /**
     * Test {@link LinksSocialBean}
     */
    @Test
    public void testLinkSocial() {
        LinksSocialBean linkSocial = new LinksSocialBean();
        linkSocial.setLink("https:/xxxx.xxxx.xxx");
        linkSocial.setProvider("TWITTER");
        assertNotNull(linkSocial);
        assertNotNull(linkSocial.getLink());
        assertNotNull(linkSocial.getProvider());
    }
View Full Code Here


     */
    public static final LinksSocialBean convertTweetPollSavedPublishedStatus(
            final TweetPollSavedPublishedStatus tweetPollSavedPublishedStatus) {
        final SimpleDateFormat simpleDateFormat = new SimpleDateFormat(
                DateUtil.DEFAULT_FORMAT_DATE);
        final LinksSocialBean linksSocialBean = new LinksSocialBean();
        linksSocialBean.setProvider(tweetPollSavedPublishedStatus
                .getSocialAccount().getAccounType().name());
        linksSocialBean.setLink(SocialUtils.getSocialTweetPublishedUrl(
                tweetPollSavedPublishedStatus.getTweetId(),
                tweetPollSavedPublishedStatus.getSocialAccount()
                        .getSocialAccountName(), tweetPollSavedPublishedStatus
                        .getSocialAccount().getAccounType()));
        linksSocialBean
                .setPublishedDate(simpleDateFormat
                        .format(tweetPollSavedPublishedStatus
                                .getPublicationDateTweet()));
        linksSocialBean.setPublishText(tweetPollSavedPublishedStatus
                .getTweetContent() == null ? tweetPollSavedPublishedStatus
                .getTweetPoll().getQuestion().getQuestion()
                : tweetPollSavedPublishedStatus.getTweetContent());
        log.debug("getTweetPollLinks " + linksSocialBean.toString());
        return linksSocialBean;
    }
View Full Code Here

TOP

Related Classes of org.encuestame.utils.json.LinksSocialBean

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.