Package com.finiac.exception

Examples of com.finiac.exception.UnableToRegisterException


  }
 
  public int userRegister(String userName, String password, String role) throws Exception
  {
    if(userName.length()<6||password.length()<6||role.length()==0)
      throw new UnableToRegisterException();
    String cryptPassword = DigestUtils.sha256Hex(password +passwordHashPadding);
    User user = new User();
    user.setUserName(userName);
    user.setPassword(cryptPassword);
    user.setRole(role);
View Full Code Here


    try{
      String userName=request.getParameter("userName");
      String password=request.getParameter("password");
      String role=request.getParameter("role");
      if(!role.equals("ADMIN") && !role.equals("USER") && !role.equals("FEE"))
        throw new UnableToRegisterException();
      this.userRegister(userName, password, role);
      return new ModelAndView("redirect:addUserPage.htm");
     
    }
    catch (NullPointerException e) {
View Full Code Here

    try{
      long userId=Long.parseLong(request.getParameter("userId"));
      String password=request.getParameter("password");
      String role=request.getParameter("role");
      if(password.length()<6||role.length()==0)
        throw new UnableToRegisterException();
      User user= new User();
      user= userDAO.selectById(userId);
      String cryptPassword = DigestUtils.sha256Hex(password +passwordHashPadding);
      user.setPassword(cryptPassword);
      user.setRole(role);
View Full Code Here

TOP

Related Classes of com.finiac.exception.UnableToRegisterException

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.