class DemandResponseController {

	@RequestMapping(value = "/", method = RequestMethod.POST)
	@ResponseBody
	public DemandResponseEventReadDto create(@Valid @RequestBody DemandResponseEventCreateDto event,
			HttpServletResponse response, BindingResult result) {

		if (result.hasErrors()) {
			response.setStatus(HttpStatus.BAD_REQUEST_400);
			return null;
		}

		DemandResponseEvent save = demandResponseEventService.create(event);

		response.setStatus(HttpStatus.CREATED_201);

		LOGGER.info("create DR event: " + save.toString());

		return dtoMapper.map(save, DemandResponseEventReadDto.class);

	}

}