class FilterController implements Constants {

    @RequestMapping(path = "/v1/filters/application", method = RequestMethod.GET)
    public ResponseEntity<Object> getListOfApplications(@RequestParam(name = "ag", required = true) String assetGroup,
            @RequestParam(name = "domain", required = false) String domain) {
        if (Strings.isNullOrEmpty(assetGroup)) {
            return ResponseUtils.buildFailureResponse(new ServiceException(ASSET_MANDATORY));
        }
        ResponseData response = null;
        try {
            response = new ResponseData(filterService.getApplications(assetGroup, domain));
        } catch (ServiceException e) {
            return complianceService.formatException(e);
        }
        return ResponseUtils.buildSucessResponse(response);
    }

}