class ComplianceController implements Constants {

    @RequestMapping(path = "/v1/overallcompliance", method = RequestMethod.GET)
    
    public ResponseEntity<Object> getOverallCompliance(@RequestParam("ag") String assetGroup,
            @RequestParam(name = "domain") String domain) {
        if (Strings.isNullOrEmpty(assetGroup) || Strings.isNullOrEmpty(domain)) {
            return ResponseUtils.buildFailureResponse(new Exception(ASSET_GROUP_DOMAIN));
        }
        DitributionDTO distribution = null;
        try {
            distribution = new DitributionDTO(complianceService.getOverallComplianceByDomain(assetGroup, domain));
        } catch (ServiceException e) {
           return complianceService.formatException(e);
        }
        return ResponseUtils.buildSucessResponse(distribution);
    }

}