class AssetGroupExceptionController {

	@ApiOperation(httpMethod = "GET", value = "API to get all asset group exception details by exception name and datasource", response = Response.class,  produces = MediaType.APPLICATION_JSON_VALUE)
	@RequestMapping(path = "/list-by-name-and-datasource", method = RequestMethod.GET,  produces = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Object> getAllTargetTypesByExceptionNameAndDataSource(
		@ApiParam(value = "provide valid exception name", required = true) @RequestParam(defaultValue="", name = "exceptionName", required = true) String exceptionName,
		@ApiParam(value = "provide valid datasource", required = true) @RequestParam(defaultValue="", name = "dataSource", required = true) String dataSource) {
		try {
			return ResponseUtils.buildSucessResponse(assetGroupExceptionService.getAllTargetTypesByExceptionNameAndDataSource(exceptionName, dataSource));
		} catch (Exception exception) {
			log.error(UNEXPECTED_ERROR_OCCURRED, exception);
			return ResponseUtils.buildFailureResponse(new Exception(UNEXPECTED_ERROR_OCCURRED), exception.getMessage());
		}
	}

}