Examples of EnMeNoResultsFoundException


Examples of org.encuestame.persistence.exception.EnMeNoResultsFoundException

            final EnMePermission permission,
            final String action)
            throws EnMeExpcetion{
        final UserAccount user = getValidateUser(userId, loggedUser);
        if(user == null){
            throw new EnMeNoResultsFoundException("user not found");
        } else {
            log.debug("Update Permission "+permission.toString());
            if(action.equals("add")){
                user.getSecUserPermissions().add(this.getPermissionByName(permission));
                log.debug("Added Permission "+permission.toString());
View Full Code Here

Examples of org.encuestame.persistence.exception.EnMeNoResultsFoundException

            final String username) throws EnMeNoResultsFoundException {
        final UserAccount userAccount = getUserAccount(userId); //TODO: I need confirm this user perhaps same group of logged user.
        //search group by group id and owner user id.
        final Group group = getGroupDao().getGroupById(groupId, getUserAccount(username).getAccount());
        if(group == null){
            throw new EnMeNoResultsFoundException("group not found");
        } else {
            //add new group.
            userAccount.setGroup(group);
            getAccountDao().saveOrUpdate(userAccount);
        }
View Full Code Here

Examples of org.encuestame.persistence.exception.EnMeNoResultsFoundException

          log.debug("changeStateSocialAccount account");
          log.debug("changeStateSocialAccount account accountId "+accountId);
          log.debug("changeStateSocialAccount account action "+action);
        }
        if (social == null) {
            throw new EnMeNoResultsFoundException("social accout not found");
        }
        if ("default".equals(action)) {
           social.setDefaultSelected(!social.getDefaultSelected());
           getAccountDao().saveOrUpdate(social);
        } else if("remove".equals(action)) {
View Full Code Here

Examples of org.encuestame.persistence.exception.EnMeNoResultsFoundException

     */
    public UserAccountBean getUserAccountbyCode(final String inviteCode) throws EnMeNoResultsFoundException{
        final UserAccount userAcc;
        SignUpBean singUp = new SignUpBean();
        if (inviteCode == null) {
            throw new EnMeNoResultsFoundException("confirmation code is missing");
        } else {
            userAcc = getAccountDao().getUserAccountbyInvitationCode(inviteCode);
            if (userAcc!=null) {
                userAcc.setInviteCode(null);
                userAcc.setUserStatus(Boolean.TRUE);
                getAccountDao().saveOrUpdate(userAcc);
            }else{
                throw new EnMeNoResultsFoundException("confirmation code not found");
            }
        }
        singUp = ConvertDomainBean.convertUserAccountToSignUpBean(userAcc);
        if (EnMePlaceHolderConfigurer.getBooleanProperty("application.email.enabled")) {
            try {
View Full Code Here

Examples of org.encuestame.persistence.exception.EnMeNoResultsFoundException

   * .Long)
   */
    public UserAccount getUserbyId (final Long id) throws EnMeNoResultsFoundException{
      final UserAccount user = getAccountDao().getUserAccountById(id);
         if (user == null) {
           throw new EnMeNoResultsFoundException("confirmation code not found");
         }
      return user;

    }
View Full Code Here

Examples of org.encuestame.persistence.exception.EnMeNoResultsFoundException

     */
    public UserAccount findAccountByConnection(final SocialProvider provider, final String profileId)
           throws EnMeNoResultsFoundException {
        final SocialAccount ac = this.findAccountConnectionBySocialProfileId(provider, profileId);
        if (ac == null) {
            throw new EnMeNoResultsFoundException("connection not found");
        } else {
            return ac.getUserOwner();
        }
    }
View Full Code Here

Examples of org.encuestame.persistence.exception.EnMeNoResultsFoundException

     * @throws EnMeNoResultsFoundException
     */
    public void disconnect(String accountId, SocialProvider provider) throws EnMeNoResultsFoundException {
        final SocialAccount ac = this.getAccountConnection(accountId, provider);
        if(ac == null){
            throw new EnMeNoResultsFoundException("connection not found");
        } else {
            getHibernateTemplate().delete(ac);
        }
    }
View Full Code Here

Examples of org.encuestame.persistence.exception.EnMeNoResultsFoundException

        if (ac != null) {
            final OAuth1Token oAuthToken = new OAuth1Token(ac.getAccessToken(),
                    ac.getSecretToken());
            return oAuthToken;
        } else {
            throw new EnMeNoResultsFoundException("connection not found");
        }
    }
View Full Code Here

Examples of org.encuestame.persistence.exception.EnMeNoResultsFoundException

    public Long getProviderAccountId(String accountId, SocialProvider provider) throws EnMeNoResultsFoundException {
        final SocialAccount ac = this.getAccountConnection(accountId, provider);
        if (ac != null) {
            return ac.getId();
        } else {
            throw new EnMeNoResultsFoundException("connection not found");
        }
    }
View Full Code Here

Examples of org.encuestame.persistence.exception.EnMeNoResultsFoundException

    public ApplicationConnection findAppConnection(final String accessToken) throws EnMeNoResultsFoundException{
         final DetachedCriteria criteria = DetachedCriteria.forClass(ApplicationConnection.class);
         criteria.add(Restrictions.eq("accessToken", accessToken) );
         final ApplicationConnection app = (ApplicationConnection) DataAccessUtils.uniqueResult(getHibernateTemplate().findByCriteria(criteria));
         if(app == null){
            throw new EnMeNoResultsFoundException(accessToken);
         } else {
            return app;
         }
    }
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.