Package com.adito.security

Examples of com.adito.security.UserDatabaseException


                                        .getString("fullname"), results.getDate("last_password_change"),
                                        UserDatabaseManager.getInstance().getRealm(results.getInt("realm_ID")));
                        addRoles(user);
                        return user;
                    } catch (Exception e) {
                        throw new UserDatabaseException("Failed to get user realm.");
                    }
        }
      } finally {
        results.close();
      }
    } catch (UserDatabaseException ude) {
      throw ude;
    } catch (SQLException ex) {
      throw new UserDatabaseException("Failed to execute SQL query", ex);
    } catch (ClassNotFoundException ex) {
      throw new UserDatabaseException("Failed to execute SQL query", ex);
    } finally {
      try {
        if (ps != null) {
          ps.releasePreparedStatement();
        }
View Full Code Here


              }
            } finally {
              ps.releasePreparedStatement();
            }
        } catch (Exception e) {
            throw new UserDatabaseException("failed to get all users", e);
        }
  }
View Full Code Here

        }
      } finally {
        ps.releasePreparedStatement();
      }
    } catch (Exception ex) {
      throw new UserDatabaseException("Failed to execute SQL query", ex);
    }
  }
View Full Code Here

        ps.setString(2, username);
        ps.setInt(3, realm.getResourceId());
      }
      ps.execute();
    } catch (Exception e) {
      throw new UserDatabaseException(
          "Failed to change password for user " + username + " in realm " + realm + ".");
    } finally {
      if (ps != null) {
        try {
          ps.releasePreparedStatement();
View Full Code Here

                }
            } finally {
                ps.releasePreparedStatement();
            }
        } catch (Exception e) {
            throw new UserDatabaseException("failed to get all roles", e);
        }
  }
View Full Code Here

      }
      Role[] r = new Role[roles.size()];
      roles.toArray(r);
      u.setRoles(r);
    } catch (Exception e) {
      throw new UserDatabaseException("Failed to add roles to user.", e);
    } finally {
      if (ps != null) {
        try {
          ps.releasePreparedStatement();
        } catch (SQLException e) {
View Full Code Here

                    Pattern p = Pattern.compile(pattern);
                    if (!p.matcher(newPassword).matches()) {
                        errors.add(Globals.ERROR_KEY, new ActionMessage("setPassword.error.doesNotMatchPolicy"));
                    }
                } catch (Exception e) {
                    throw new UserDatabaseException("Could not check password against current policy.", e);
                }
            }
        } catch (Exception e) {
            errors.add(Globals.ERROR_KEY, new ActionMessage("setPassword.error.validateFailed", e.getMessage()));
        }
View Full Code Here

TOP

Related Classes of com.adito.security.UserDatabaseException

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.