Package org.encuestame.utils.json

Examples of org.encuestame.utils.json.TweetItemPublishedResponse


     * @param savedPublishedStatus
     * @return
     */
    public static final TweetItemPublishedResponse convertTweetPollStatusToJson(
        final TweetPollSavedPublishedStatus savedPublishedStatus) {
        final TweetItemPublishedResponse tweetResponse = new TweetItemPublishedResponse();
    tweetResponse.datePublished = savedPublishedStatus
        .getPublicationDateTweet() == null ? null : DateUtil
        .getFormatDate(savedPublishedStatus.getPublicationDateTweet());
    tweetResponse.setId(savedPublishedStatus.getId());
        tweetResponse.textTweeted = savedPublishedStatus.getTweetContent();
        tweetResponse.statusTweet = savedPublishedStatus.getStatus().name();
        tweetResponse.statusDescriptionTweet = savedPublishedStatus.getDescriptionStatus();
        tweetResponse.socialAccountId = savedPublishedStatus.getSocialAccount().getId();
        tweetResponse.sourceTweet = savedPublishedStatus.getApiType().name();
        tweetResponse.tweetId = savedPublishedStatus.getTweetId() == null ? "" : savedPublishedStatus.getTweetId();
    tweetResponse.tweetUrl = savedPublishedStatus.getTweetId() == null ? ""
        : SocialUtils.getSocialTweetPublishedUrl(savedPublishedStatus
            .getTweetId(),
                savedPublishedStatus.getSocialAccount().getSocialAccountName(),
                savedPublishedStatus.getSocialAccount().getAccounType());
    tweetResponse.setTypeItem(defineTypeOfItem(savedPublishedStatus.getPoll(), savedPublishedStatus.getTweetPoll(), savedPublishedStatus.getSurvey()));
        tweetResponse.socialAccountName = savedPublishedStatus.getSocialAccount().getSocialAccountName();
        return tweetResponse;
    }
View Full Code Here

TOP

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

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.