Package tigase.db

Examples of tigase.db.UserExistsException


      query = "insert into " + profiles_tbl
        + " (id_, accountstatus_)"
        + " values ('" + JIDUtils.getNodeNick(user) + "', 0);";
      stmt.executeUpdate(query);
    } catch (SQLException e) {
      throw new UserExistsException("Error while adding user to repository, user exists?", e);
    } finally {
      release(stmt, null);
      stmt = null;
    }
  }
View Full Code Here


      stmt.executeUpdate(query);
      query = "delete from " + profiles_tbl
        + " where (id_ = '" + JIDUtils.getNodeNick(user+ "');";
      stmt.executeUpdate(query);
    } catch (SQLException e) {
      throw new UserExistsException("Error while adding user to repository, user exists?", e);
    } finally {
      release(stmt, null);
      stmt = null;
    }
  }
View Full Code Here

   */
  public synchronized void addUser(final String user) throws UserExistsException {
    try {
      xmldb.addNode1(user);
    } catch (NodeExistsException e) {
      throw new UserExistsException(USER_STR+user+" already exists.", e);
    } // end of try-catch
  }
View Full Code Here

  public void addUser(final String user_id)
    throws UserExistsException, TigaseDBException {
    try {
      addUserRepo(user_id);
    } catch (SQLException e) {
      throw new UserExistsException("Error adding user to repository: ", e);
    }
  }
View Full Code Here

        if (is_result) {
          rs = add_user.getResultSet();
        }
      }
    } catch (SQLIntegrityConstraintViolationException e) {
      throw new UserExistsException("Error while adding user to repository, user exists?", e);
    } catch (SQLException e) {
      throw new TigaseDBException("Problem accessing repository.", e);
    } finally {
      release(null, rs);
    }
View Full Code Here

    } catch (NoSuchAlgorithmException e) {
      throw
        new TigaseDBException("Password encoding algorithm is not supported.",
          e);
    } catch (SQLException e) {
      throw new UserExistsException("Error while adding user to repository, user exists?", e);
    }
  }
View Full Code Here

        add_user_plain_pw_sp.setString(1, JIDUtils.getNodeID(user));
        add_user_plain_pw_sp.setString(2, password);
        rs = add_user_plain_pw_sp.executeQuery();
      }
    } catch (SQLIntegrityConstraintViolationException e) {
      throw new UserExistsException("Error while adding user to repository, user exists?", e);
    } catch (SQLException e) {
      throw new TigaseDBException("Problem accessing repository.", e);
    } finally {
      release(null, rs);
    }
View Full Code Here

TOP

Related Classes of tigase.db.UserExistsException

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.