class RuleController {

	@ApiOperation(httpMethod = "GET", value = "API to get rule by id", response = Response.class, produces = MediaType.APPLICATION_JSON_VALUE)
	@RequestMapping(path = "/details-by-id", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Object> getRulesById(
			@ApiParam(value = "provide valid rule id", required = true) @RequestParam(defaultValue = "", name = "ruleId", required = true) String ruleId) {
		try {
			return ResponseUtils.buildSucessResponse(ruleService.getByRuleId(ruleId));
		} catch (Exception exception) {
			log.error(UNEXPECTED_ERROR_OCCURRED, exception);
			return ResponseUtils.buildFailureResponse(new Exception(UNEXPECTED_ERROR_OCCURRED), exception.getMessage());
		}
	}

}