class ComplianceController implements Constants {

    @RequestMapping(path = "/v1/resourcedetails", method = RequestMethod.GET)
    public ResponseEntity<Object> getResourceDetails(@RequestParam("ag") String assetGroup,
            @RequestParam("resourceId") String resourceId) {
        if (Strings.isNullOrEmpty(resourceId)) {
            return ResponseUtils.buildFailureResponse(new Exception("assetGroup/resourceId is mandatory"));
        }
        ResponseData response = null;
        try {
            response = new ResponseData(complianceService.getResourceDetails(assetGroup, resourceId));
        } catch (ServiceException e) {
           return complianceService.formatException(e);
        }
        return ResponseUtils.buildSucessResponse(response);
    }

}