class PolicyController {

	@ApiOperation(httpMethod = "POST", value = "API to create new policy", response = Response.class, produces = MediaType.APPLICATION_JSON_VALUE)
	//@PreAuthorize("@securityService.hasPermission(authentication)")
	@RequestMapping(path = "/create", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Object> createPolicies(
			@ApiParam(value = "provide valid policy details", required = true) @RequestBody(required = true) CreatePolicyDetails policyDetails) {
		try {
			return ResponseUtils.buildSucessResponse(policyService.createPolicies(policyDetails));
		} catch (Exception exception) {
			log.error(UNEXPECTED_ERROR_OCCURRED, exception);
			return ResponseUtils.buildFailureResponse(new Exception(UNEXPECTED_ERROR_OCCURRED), exception.getMessage());
		}
	}

}