class ComplianceController implements Constants {

    @RequestMapping(path = "/v1/kernelcompliancebyinstanceid", method = RequestMethod.GET)
    
    public ResponseEntity<Object> getKernelComplianceByInstanceId(@RequestParam("instanceId") String instanceId) {

        if (Strings.isNullOrEmpty(instanceId)) {
            return ResponseUtils.buildFailureResponse(new Exception("instanceId is mandatory"));
        }
        PolicyDescription output = null;
        try {
            output = new PolicyDescription(complianceService.getKernelComplianceByInstanceIdFromDb(instanceId));

        } catch (ServiceException e) {
           return complianceService.formatException(e);
        }
        return ResponseUtils.buildSucessResponse(output);
    }

}