@PreAuthorize("hasRole('POLICY_READ')")
@RequestMapping(method = RequestMethod.GET, value = "/read/{id}")
public <T extends PolicyTO> T read(@PathVariable("id") final Long id) {
LOG.debug("Reading policy with id {}", id);
Policy policy = policyDAO.find(id);
if (policy == null) {
throw new NotFoundException("Policy " + id + " not found");
}
auditManager.audit(Category.policy, PolicySubCategory.read, Result.success,
"Successfully read policy (" + policy.getType() + "): " + policy.getId());
return binder.getPolicyTO(policy);
}