class DomainController {

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

}