Examples of UserAccountBean


Examples of org.encuestame.utils.web.UserAccountBean

            @RequestParam(value = "id", required = true) Long userId,
            HttpServletRequest request,
            HttpServletResponse response) throws JsonGenerationException, JsonMappingException, IOException {
            try {
                final Map<String, Object> jsonResponse = new HashMap<String, Object>();
                final UserAccountBean user = getUser(userId);
                log.debug("user.getListPermission() "+user.getUsername());
                log.debug("user.getListPermission() "+user.getListPermission().size());
                jsonResponse.put("userPermissions", user.getListPermission());
                setItemResponse(jsonResponse);
            } catch (EnMeNoResultsFoundException e) {
                setError(e.getMessage(), response);
                log.error(e);
            }
View Full Code Here

Examples of org.encuestame.utils.web.UserAccountBean

            @RequestParam(value = "id", required = true) Long userId,
            HttpServletRequest request,
            HttpServletResponse response) throws JsonGenerationException, JsonMappingException, IOException {
        try {
            final Map<String, Object> sucess = new HashMap<String, Object>();
            final UserAccountBean user = getUser(userId);
            log.debug("user info "+userId);
            if (user == null) {
                setError(new EnMeNoResultsFoundException("user not found").getMessage(), response);
                log.error("user not found");
            } else {
View Full Code Here

Examples of org.encuestame.utils.web.UserAccountBean

            log.debug("user newEmailUser " + email);
            final Integer userUnconfirmed = getSecurityService().retrieveListUserUnconfirmedByAccount();
            if (userUnconfirmed >= unconfirmedAccountsLimit) {
                throw new EnMeExpcetion(getMessage("unconfirmed_limit", request, null));
            }
            final UserAccountBean userBean = new UserAccountBean();
            userBean.setEmail(email);
            userBean.setUsername(username);
            // get the current user logged
            final UserAccount account = getUserAccount();
            final ValidateOperations cv = new ValidateOperations( getServiceManager().getApplicationServices()
                  .getSecurityService());
            boolean emailValid = cv.validateUserEmail(email, account);
View Full Code Here

Examples of org.encuestame.utils.web.UserAccountBean

            @PathVariable String username,
            HttpServletRequest request,
            HttpServletResponse response) {
        username = filterValue(username);
        try {
        final UserAccountBean accountBean = getSecurityService().searchUserByUsername(username);
            if (accountBean == null) {
                return "404";
            } else {
                //1 - load all items poll / survey / poll for {username} order by date
                //2 - hashtag created by {username}
View Full Code Here

Examples of org.encuestame.utils.web.UserAccountBean

            @PathVariable String inviteCode,
            final ModelMap model,
            HttpServletResponse response,
            HttpServletRequest request) {
            log.debug("Invitation Code----->" + inviteCode);
        UserAccountBean userAccountBean;
        try {
            userAccountBean = getSecurityService().getUserAccountbyCode(inviteCode);
        } catch (EnMeNoResultsFoundException e) {
            log.error(e.getMessage());
            return "signin";
View Full Code Here

Examples of org.encuestame.utils.web.UserAccountBean

    /**
     * Test for {@link UserAccountBean}.
     */
    @Test
    public void testUnitUserBean(){
        final UserAccountBean userBean = new UserAccountBean();
        userBean.setId(1L);
        userBean.setDateNew(new Date());
        userBean.setEmail("juanATencuestame.org");
        userBean.setInviteCode("code");
        userBean.setName("name");
        userBean.setPassword("password");
        userBean.setPrimaryUserId(1L);
        userBean.setStatus(Boolean.TRUE);
        userBean.setUsername("username");
        final Collection<UnitPermission> listPermission = new HashSet<UnitPermission>();
        userBean.setListPermission(listPermission);
        final Collection<UnitGroupBean> listGroups = new HashSet<UnitGroupBean>();
        userBean.setListGroups(listGroups);
        assertNotNull(userBean.getId());
        assertNotNull(userBean.getDateNew());
        assertNotNull(userBean.getEmail());
        assertNotNull(userBean.getInviteCode());
        assertNotNull(userBean.getName());
        assertNotNull(userBean.getPassword());
        assertNotNull(userBean.getPrimaryUserId());
        assertNotNull(userBean.getStatus());
        assertNotNull(userBean.getUsername());
        assertEquals(userBean.getListGroups().size(), 0);
        assertEquals(userBean.getListPermission().size(), 0);
    }
View Full Code Here

Examples of org.encuestame.utils.web.UserAccountBean

    public void testUnitLocationFormatBean(){
        final UnitLocationFolder locationFolder = new UnitLocationFolder();
        locationFolder.setId(1L);
        locationFolder.setName("folder");
        locationFolder.setType("type");
        locationFolder.setUnitUserBean(new UserAccountBean());
        assertNotNull(locationFolder.getId());
        assertNotNull(locationFolder.getName());
        assertNotNull(locationFolder.getUnitUserBean());
        assertNotNull(locationFolder.getType());
    }
View Full Code Here

Examples of org.encuestame.utils.web.UserAccountBean

     * @param currentUsername
     * @return
     * @throws EnMeNoResultsFoundException
     */
    public UserAccountBean getUserCompleteInfo(final Long userId, final String currentUsername) throws EnMeNoResultsFoundException {
        UserAccountBean userInfo = null;
        final UserAccount user = getAccountDao().getUserAccountById(userId);
        if(this.validateOwnerGroup(user, currentUsername)){
            userInfo =  ConvertDomainBean.convertSecondaryUserToUserBean(user);
            log.debug("getUserCompleteInfo info "+userInfo.getId());
        }
        return userInfo;
    }
View Full Code Here

Examples of org.encuestame.utils.web.UserAccountBean

     * @param name
     * @param email
     * @return
     */
    public UserAccountBean createUserAccountBean(final String name, final String email){
        final UserAccountBean userAcc = new UserAccountBean();
        userAcc.setName(name);
        userAcc.setEmail(email);
        return userAcc;
    }
View Full Code Here

Examples of org.encuestame.utils.web.UserAccountBean

     */
    @Override
    public UserAccountBean createUserAdministration(
            AdministratorProfile administratorProfile) {
        log.debug("===============CREATE ADMON==============");
        final UserAccountBean account = this.securityOperations.createAdministrationUser(administratorProfile);
        return account;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.