// Persist the role
Role persistentRole = roleReadService.saveOrUpdate(role);
// Provide a representation to the client
Representation representation = new AdminRoleRepresentation().get(persistentRole);
URI location = uriInfo.getAbsolutePathBuilder().path(persistentRole.getId().toString()).build();
return created(representation, location);
}