class TaggingController implements Constants {

    @RequestMapping(path = "/v1/tagging/taggingByApplication", method = RequestMethod.GET)
    public ResponseEntity<Object> taggingByApplication(@RequestParam("ag") String assetGroup,
            @RequestParam(name = "targetType", required = false) String targetType) {
        if (Strings.isNullOrEmpty(assetGroup)) {
            return ResponseUtils.buildFailureResponse(new Exception(ASSET_MANDATORY));
        }
        TaggingResponse response = null;

        try {
            response = new TaggingResponse(taggingService.taggingByApplication(assetGroup, targetType));

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

}