class ComplianceController implements Constants {

    @RequestMapping(path = "/v1/policyViolationReason", method = RequestMethod.GET)
    public ResponseEntity<Object> policyViolationReason(@RequestParam("ag") String assetgroup,
            @RequestParam(name = "issueId") String issueId) {

        if (Strings.isNullOrEmpty(assetgroup) && Strings.isNullOrEmpty(issueId)) {
            return ResponseUtils.buildFailureResponse(new Exception("AssetGroup/IssueId is Mandatory"));
        }
        PolicyViolationDetails response = null;
        try {
            response = complianceService.getPolicyViolationDetailsByIssueId(assetgroup, issueId);
        } catch (ServiceException e) {
            return complianceService.formatException(e);
        }
        return ResponseUtils.buildSucessResponse(response);

    }

}