* @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;
}