Package com.gnizr.core.exceptions

Examples of com.gnizr.core.exceptions.NoSuchUserException


      if(TagUtil.isPrefixedUserTag(ctag)){
        UserTag tmpObj = TagUtil.parsePrefixedUserTag(ctag);
        if((tmpObj.getUser().getId() <= 0) && tmpObj.getUser().getUsername() != null){
          userX = GnizrDaoUtil.getUser(userDao,tmpObj.getUser().getUsername());       
          if(userX == null){
            throw new NoSuchUserException(tmpObj.getUser().getUsername());
          }
        }else{
          userX = user;
        }
        tagX = tmpObj.getTag().getLabel();
View Full Code Here


      u = GnizrDaoUtil.getUser(userDao,user.getUsername());
    }else{
      u = userDao.getUser(user.getId());
    }
    if(u == null){
      throw new NoSuchUserException("no such user: "+user.getUsername());
    }
    return u.getAccountStatus();
  }
View Full Code Here

    logger.debug("activateUserAccount: user="+user);
    User u = null;
    if(user.getId() <= 0 && user.getUsername() != null){
      u = GnizrDaoUtil.getUser(userDao, user.getUsername());           
      if(u == null){
        throw new NoSuchUserException("no such user:"+user.getUsername());
      }
    }else{
      u = new User(user);
      // no password change is required.
      u.setPassword(null);
View Full Code Here

    logger.debug("disableUserAccount: username="+user);
    User u = null;
    if(user.getId() <= 0 && user.getUsername() != null){
      u = GnizrDaoUtil.getUser(userDao,user.getUsername());
      if(u == null){
        throw new NoSuchUserException("no such user: "+user.getUsername());
      }
    }else{
      u = new User(user);
    }
    u.setAccountStatus(AccountStatus.DISABLED);
View Full Code Here

    logger.debug("resetUserAccount: username="+user);
    User u = null;
    if(user.getId() <= 0 && user.getUsername() != null){
      u = GnizrDaoUtil.getUser(userDao,user.getUsername());
      if(u == null){
        throw new NoSuchUserException("no such user: "+user.getUsername());
      }
    }else{
      u = new User(user);
    }
    u.setAccountStatus(AccountStatus.INACTIVE);
View Full Code Here

   */
  public User getUser(String username) throws NoSuchUserException{
    logger.debug("getUser: username="+username);   
    User u = GnizrDaoUtil.getUser(userDao, username);
    if(u == null){
      throw new NoSuchUserException("no such user: "+username);
    }
    return u;
  }
View Full Code Here

            tags.add(new Tag(ut.getTag()));
          }
        }
      }
    } else if (gnizrUser == null) {
      throw new NoSuchUserException("missing user: "
          + UserSchema.GNIZR_USER);
    }
    return tags;
  }
View Full Code Here

            tags.add(new Tag(ut.getTag()));
          }
        }
      }
    } else if (gnizrUser == null) {
      throw new NoSuchUserException("missing superuser: "
          + UserSchema.GNIZR_USER);
    }
    return tags;
  }
View Full Code Here

            tags.add(new Tag(ut.getTag()));
          }
        }
      }
    } else if (gnizrUser == null) {
      throw new RuntimeException(new NoSuchUserException(
          "missing superuser: " + UserSchema.GNIZR_USER));
    }
    return tags;
  }
View Full Code Here

  public static void fillId(UserDao userDao, User user)
      throws NoSuchUserException {
    if (hasMissingId(user) == true) {
      User obj = getUser(userDao, user.getUsername());
      if (obj == null) {
        throw new NoSuchUserException("no such user="
            + user.getUsername());
      }
      user.setId(obj.getId());
    }
  }
View Full Code Here

TOP

Related Classes of com.gnizr.core.exceptions.NoSuchUserException

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.