throws ResourceException
{
String sourceId = this.getSourceId(request);
String roleId = this.getRoleId(request);
AuthorizationManager source;
try {
source = getSecuritySystem().getAuthorizationManager(sourceId);
}
catch (NoSuchAuthorizationManagerException e) {
throw new ResourceException(Status.CLIENT_ERROR_BAD_REQUEST, "Invalid source id '" + sourceId + "'", e);
}
final Role role;
try {
role = source.getRole(roleId);
}
catch (NoSuchRoleException e) {
throw new ResourceException(Status.CLIENT_ERROR_NOT_FOUND, "Invalid role id '" + roleId + "' on realm '"
+ sourceId + "'", e);
}