class DomainController {

	@ApiOperation(httpMethod = "POST", value = "API to update domain", response = Response.class, consumes = MediaType.APPLICATION_JSON_VALUE)
	@RequestMapping(path = "/update", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Object> updateDomain(@AuthenticationPrincipal Principal user,
			@ApiParam(value = "provide valid domain details", required = true) @RequestBody(required = true) CreateUpdateDomain createUpdateDomainDetails) {
		try {
			return ResponseUtils.buildSucessResponse(domainService.updateDomain(createUpdateDomainDetails, user.getName()));
		} catch (Exception exception) {
			log.error(UNEXPECTED_ERROR_OCCURRED, exception);
			return ResponseUtils.buildFailureResponse(new Exception(UNEXPECTED_ERROR_OCCURRED), exception.getMessage());
		}
	}

}