class ComplianceController implements Constants {

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

}