Examples of UserExistsException


Examples of org.openengsb.core.api.security.service.UserExistsException

    private Map<String, Map<Class<?>, Collection<Permission>>> permissionData = Maps.newHashMap();

    @Override
    public void createUser(String username) throws UserExistsException {
        if (credentialsData.containsKey(username)) {
            throw new UserExistsException("user exists");
        }
        credentialsData.put(username, new HashMap<String, String>());
        permissionData.put(username, new HashMap<Class<?>, Collection<Permission>>());
    }
View Full Code Here

Examples of org.openengsb.core.api.security.service.UserExistsException

    public void createUser(String username) throws UserExistsException {
        List<Entry> userStructure = userStructure(username);
        try {
            dao.store(userStructure);
        } catch (EntryAlreadyExistsException e) {
            throw new UserExistsException();
        } catch (MissingParentException e) {
            throw new LdapRuntimeException(e);
        }
    }
View Full Code Here

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

Examples of tigase.db.UserExistsException

      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

Examples of tigase.db.UserExistsException

   */
  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

Examples of tigase.db.UserExistsException

  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

Examples of tigase.db.UserExistsException

        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

Examples of tigase.db.UserExistsException

    } 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

Examples of tigase.db.UserExistsException

        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
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.