Package org.encuestame.utils.json

Examples of org.encuestame.utils.json.SocialAccountBean


        try{
             final Poll poll = getPollService().getPollById(pollId, getUserPrincipalUsername());
             final List<SocialAccountBean> accountBeans = new ArrayList<SocialAccountBean>();
             //convert accounts id to real social accounts objects.
             for (int row = 0; row < twitterAccountsId.length; row++) {
                 final SocialAccountBean socialAccount = new SocialAccountBean();
                 socialAccount.setAccountId(twitterAccountsId[row]);
                 accountBeans.add(socialAccount);
             }
             //log.trace("Accounts:{" + accountBeans.size());
             String tweetText = poll.getQuestion().getQuestion();
             final String url = WidgetUtil.createShortUrl(ShortUrlProvider.TINYURL, this.buildPollURL(poll, request));
View Full Code Here


    /**
     * Test {@link SocialAccountBean}.
     */
    @Test
    public void testUnitTwitterAccountBean(){
        final SocialAccountBean accountBean = new SocialAccountBean();
        accountBean.setAccount("account");
        accountBean.setAccountId(1L);
        accountBean.setType("type");
        accountBean.setTypeAccount("typeAccount");
        accountBean.setDescriptionProfile("my description profile");
        accountBean.setEmail("jhonny@encuestame.org");
        accountBean.setDefaultSelected(Boolean.FALSE);
        accountBean.setAddedAccount(new Date());
        accountBean.setPrictureUrl("/encuestame/user");
        accountBean.setProfilePictureUrl("/encuestame/user/profile");
        accountBean.setRealName("Jhonny");
        accountBean.setSocialAccountName("Jhonny");
    }
View Full Code Here

                 log.debug("tweet text "+tweetText);
                 //check real lenght if execed limit required.
                final List<SocialAccountBean> accountBeans = new ArrayList<SocialAccountBean>();
                //convert accounts id to real social accounts objects.
                for (int row = 0; row < twitterAccountsId.length; row++) {
                    final SocialAccountBean socialAccount = new SocialAccountBean();
                    socialAccount.setAccountId(twitterAccountsId[row]);
                    accountBeans.add(socialAccount);
                }
                log.debug("Accounts:{" + accountBeans.size());
                // multi publish social account.
                final List<TweetPollSavedPublishedStatus> results = getTweetPollService()
View Full Code Here

     *            {@link SocialAccount}.
     * @return {@link SocialAccountBean}
     */
    public static final SocialAccountBean convertSocialAccountToBean(
            final SocialAccount socialAccount) {
        final SocialAccountBean socialAccountBean = new SocialAccountBean();
        socialAccountBean.setAccount(socialAccount.getSocialAccountName());
        socialAccountBean.setAccountId(socialAccount.getId());
        socialAccountBean.setTypeAccount(socialAccount.getAccounType()
                .toString());
        socialAccountBean.setDescriptionProfile(socialAccount
                .getDescriptionProfile());
        socialAccount.setEmail(socialAccount.getEmail() == null ? ""
                : socialAccount.getEmail());
        socialAccountBean.setDefaultSelected(socialAccount.getDefaultSelected() == null ? false
                        : socialAccount.getDefaultSelected());
        socialAccountBean.setAddedAccount(socialAccount.getAddedAccount());
        socialAccountBean.setPrictureUrl(socialAccount.getPrictureUrl());
        socialAccountBean.setProfilePictureUrl(socialAccount
                .getProfilePictureUrl());
        socialAccountBean.setProfileThumbnailPictureUrl(socialAccount
                .getProfileThumbnailPictureUrl());
        socialAccountBean.setRealName(socialAccount.getRealName());
        socialAccountBean.setSocialAccountName(socialAccount
                .getSocialAccountName());
        socialAccountBean.setSocialProfileUrl(socialAccount
                .getPublicProfileUrl() == null ? "" : socialAccount
                .getPublicProfileUrl());
        return socialAccountBean;
    }
View Full Code Here

        final List<SocialAccountBean> accounts = new ArrayList<SocialAccountBean>();
        for (SocialAccount socialAccount : socialAccounts) {
            log.debug("addSocialStats to "+socialAccount.getId());
            final HashMap<String, Long> stats = getAccountDao().getSocialAccountStats(socialAccount);
            log.debug("addSocialStats stats: "+stats);
            final SocialAccountBean bean = ConvertDomainBean.convertSocialAccountToBean(socialAccount);
            log.debug("addSocialStats stats tweetpoll: "+stats.get("tweetpoll"));
            log.debug("addSocialStats stats poll: "+stats.get("poll"));
            log.debug("addSocialStats stats survey: "+stats.get("survey"));
            bean.setTweetpoll(stats.get("tweetpoll"));
            bean.setPoll(stats.get("poll"));
            bean.setSurvey(stats.get("survey"));
            log.debug("addSocialStats bean: "+bean.toString());
            accounts.add(bean);
        }
        return accounts;
    }
View Full Code Here

TOP

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

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.