Package org.sonatype.security.authorization

Examples of org.sonatype.security.authorization.NoSuchRoleException


    for (Role role : this.listRoles()) {
      if (role.getRoleId().equals(roleId)) {
        return role;
      }
    }
    throw new NoSuchRoleException("Role '" + roleId + "' not found.");
  }
View Full Code Here


  {
    try {
      String roleName = this.ldapManager.getGroupName(roleId);

      if (roleName == null) {
        throw new NoSuchRoleException("Role: " + roleId + " was not found in LDAP.");
      }

      Role role = new Role();
      role.setName(roleId);
      role.setRoleId(roleId);
      role.setSource(this.getSource());

      return role;
    }
    catch (LdapDAOException e) {
      throw new NoSuchRoleException("Role: " + roleId + " was not found in LDAP.", e);
    }
    catch (NoSuchLdapGroupException e) {
      throw new NoSuchRoleException("Role: " + roleId + " was not found in LDAP.", e);
    }
  }
View Full Code Here

      throws NoSuchRoleException
  {
    boolean found = getConfiguration().removeRoleById(id);

    if (!found) {
      throw new NoSuchRoleException(id);
    }

    if (clean) {
      cleanRemovedRole(id);
    }
View Full Code Here

    if (role != null) {
      return role;
    }
    else {
      throw new NoSuchRoleException(id);
    }
  }
View Full Code Here

    for (Role role : this.listRoles()) {
      if (roleId.equals(role.getRoleId())) {
        return role;
      }
    }
    throw new NoSuchRoleException("Role: " + roleId + " could not be found.");
  }
View Full Code Here

TOP

Related Classes of org.sonatype.security.authorization.NoSuchRoleException

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.