Package org.encuestame.utils.json

Examples of org.encuestame.utils.json.ProfileUserAccount


    @RequestMapping(value = "/api/settings/profile/my.json", method = RequestMethod.GET)
    public @ResponseBody ModelMap myAccountProfile(HttpServletRequest request,
            HttpServletResponse response) throws JsonGenerationException,
            JsonMappingException, IOException {
        final Map<String, Object> jsonResponse = new HashMap<String, Object>();
        ProfileUserAccount user;
        try {
            user = getProfileUserInfo();
            jsonResponse.put("account", user);
            setItemResponse(jsonResponse);
        } catch (EnMeNoResultsFoundException e) {
View Full Code Here


    /**
     * Test {@link ProfileUserAccount}.
     */
    @Test
    public void testProfileUserAccount(){
        final ProfileUserAccount profile = new ProfileUserAccount();
        profile.setEmail("jhonny@encuestame.org");
        profile.setLanguage("Sp");
        profile.setName("Jhonny English");
        profile.setPrivateProfile(Boolean.TRUE);
        profile.setUsername("jhonny");
        assertNotNull(profile);
        assertNotNull(profile.getEmail());
        assertNotNull(profile.getLanguage());
        assertNotNull(profile.getName());
        assertNotNull(profile.getPrivateProfile());
        assertNotNull(profile.getUsername());
    }
View Full Code Here

    public String settingsAccountController(
        ModelMap model,
        final UserAccount userAccount,
        HttpServletRequest request,
        HttpServletResponse response) {
        ProfileUserAccount user;
        try {
            user = getProfileUserInfo();
            model.put("account", user);
            addi18nProperty(model, "settings_config_profile_title", request, response);
            addi18nProperty(model, "settings_config_profile_description", request, response);
            addi18nProperty(model, "settings_config_profile_email", request, response);
            addi18nProperty(model, "settings_config_profile_email_description", request, response);
            addi18nProperty(model, "settings_config_profile_username", request, response);
            addi18nProperty(model, "settings_config_profile_username_description", request, response);
            addi18nProperty(model, "settings_config_profile_complete_name", request, response);
            addi18nProperty(model, "settings_config_profile_language", request, response);
            addi18nProperty(model, "e_005", request, response);
            addi18nProperty(model, "commons_update", request, response);
            // picture
            addi18nProperty(model, "settings_config_picture_title", request, response);
            addi18nProperty(model, "settings_config_picture_description", request, response);
            addi18nProperty(model, "settings_config_picture_own", request, response);
            addi18nProperty(model, "settings_config_picture_restrictions", request, response);
            addi18nProperty(model, "m_023", request, response);
            addi18nProperty(model, "settings_config_profile_form_not_valid", request, response);
            //social settings

            log.debug("settingsAccountController user: " + user.toString());
        } catch (EnMeNoResultsFoundException e) {
            log.error(e);
            e.printStackTrace();
        }
        return "settings/account";
View Full Code Here

     * @param secUserSecondary
     * @return
     */
    public static final ProfileUserAccount convertUserAccountToUserProfileBean(
            final UserAccount secUserSecondary) {
        final ProfileUserAccount unitUserBean = new ProfileUserAccount();
        if (secUserSecondary != null) {
            unitUserBean.setName(secUserSecondary.getCompleteName());
            unitUserBean.setEmail(secUserSecondary.getUserEmail());
            unitUserBean.setUsername(secUserSecondary.getUsername());
            unitUserBean.setPictureSource(secUserSecondary.getPictureSource().toString());
            // TODO: Bug 112, add private, language y bio.
        }
        return unitUserBean;
    }
View Full Code Here

TOP

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

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.