}
catch (NoSuchAuthorizationManagerException e) {
throw new ResourceException(Status.SERVER_ERROR_INTERNAL, "Unable to load 'default' realm", e);
}
ExternalRoleMappingResourceResponse result = new ExternalRoleMappingResourceResponse();
ExternalRoleMappingResource resource = new ExternalRoleMappingResource();
result.setData(resource);
resource.setDefaultRole(this.securityToRestModel(defaultRole));
resource.addMappedRole(this.securityToRestModel(role));
return result;
}