Examples of GroupNotFoundException


Examples of edu.ubb.warp.exception.GroupNotFoundException

      statement.setInt(1, groupID);
      ResultSet result = statement.executeQuery();
      if (result.next()) {
        group = getGroupFromResult(result);
      } else {
        throw new GroupNotFoundException();
      }
    } catch (SQLException e) {
      throw new DAOException();
    }
    return group;
View Full Code Here

Examples of edu.ubb.warp.exception.GroupNotFoundException

      statement.setString(1, groupName);
      ResultSet result = statement.executeQuery();
      if (result.next()) {
        group = getGroupFromResult(result);
      } else {
        throw new GroupNotFoundException();
      }
    } catch (SQLException e) {
      throw new DAOException();
    }
    return group;
View Full Code Here

Examples of org.apache.ace.useradmin.ui.editor.GroupNotFoundException

        if (username == null || "".equals(username) || password == null || "".equals(password) || groupname == null || "".equals(groupname)) {
            throw new IllegalArgumentException("Username, password and groupname cannot be null or \"\"");
        }
        Group group = (Group) m_useradmin.getRole(groupname);
        if (group == null) {
            throw new GroupNotFoundException(groupname);
        }
        Role newRole = m_useradmin.createRole(username, Role.USER);
        if (newRole == null) {
            throw new UserAlreadyExistsException(username);
        }
View Full Code Here

Examples of org.apache.ace.useradmin.ui.editor.GroupNotFoundException

        if (user == null) {
            throw new UserNotFoundException(oldUsername);
        }
        String group = getGroup(user).getName();
        if (group == null) {
            throw new GroupNotFoundException(null);
        }
        addUser(userDTO);
        removeUser(userDTO);
    }
View Full Code Here

Examples of org.apache.ace.useradmin.ui.editor.GroupNotFoundException

            throw new IllegalArgumentException("Username and group cannot be null or \"\" ");
        }
        User user = getUser(username);
        Group newGroup = (Group) m_useradmin.getRole(group);
        if (newGroup == null) {
            throw new GroupNotFoundException(group);
        }
        if (user == null) {
            throw new UserNotFoundException(username);
        }
        getGroup(user).removeMember(user);
View Full Code Here

Examples of org.apache.ace.useradmin.ui.editor.GroupNotFoundException

            throw new IllegalArgumentException("Username, password and groupname cannot be null or \"\"");
        }

        Group group = (Group) m_useradmin.getRole(groupname);
        if (group == null) {
            throw new GroupNotFoundException(groupname);
        }

        Role newRole = m_useradmin.createRole(username, Role.USER);
        if (newRole == null) {
            throw new UserAlreadyExistsException(username);
View Full Code Here

Examples of org.apache.ace.useradmin.ui.editor.GroupNotFoundException

            throw new UserNotFoundException(username);
        }

        Group oldGroup = (Group) m_useradmin.getRole(userDTO.getPreviousGroupname());
        if (oldGroup == null) {
            throw new GroupNotFoundException(group);
        }

        Group newGroup = (Group) m_useradmin.getRole(group);
        if (newGroup == null) {
            throw new GroupNotFoundException(group);
        }

        oldGroup.removeMember(user);
        newGroup.addMember(user);
    }
View Full Code Here

Examples of org.apache.ace.useradmin.ui.editor.GroupNotFoundException

        if (user == null) {
            throw new UserNotFoundException(oldUsername);
        }
        Group group = getGroup(user);
        if (group == null) {
            throw new GroupNotFoundException(null);
        }

        group.removeMember(user);
        m_useradmin.removeRole(user.getName());
View Full Code Here

Examples of org.ff4j.exception.GroupNotFoundException

        formData.add(POST_PARAMNAME_GROUPNAME, groupName);
        ClientResponse cRes = getStore().path(uid).path(OPERATION_REMOVEGROUP).post(ClientResponse.class, formData);
        if (Status.NOT_FOUND.getStatusCode() == cRes.getStatus()) {
            String errorMsg = cRes.getEntity(String.class);
            if (errorMsg.contains("group")) {
                throw new GroupNotFoundException(groupName);
            }
            throw new FeatureNotFoundException(uid);
        }
        if (Status.NO_CONTENT.getStatusCode() != cRes.getStatus()) {
            throw new FeatureAccessException("Cannot remove feature from group, an HTTP error " + cRes.getStatus() + " occured.");
View Full Code Here

Examples of org.ff4j.exception.GroupNotFoundException

        if (groupName == null || groupName.isEmpty()) {
            throw new IllegalArgumentException("Groupname cannot be null nor empty");
        }
        ClientResponse cRes = getGroups().path(groupName).path(OPERATION_ENABLE).post(ClientResponse.class);
        if (Status.NOT_FOUND.getStatusCode() == cRes.getStatus()) {
            throw new GroupNotFoundException(groupName);
        }
        if (Status.NO_CONTENT.getStatusCode() != cRes.getStatus()) {
            throw new FeatureAccessException("Cannot grant role on feature, an HTTP error " + cRes.getStatus() + " occured.");
        }
    }
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.