class UserController {

	@ApiOperation(httpMethod = "GET", value = "API to get user details by email id", response = Response.class,  produces = MediaType.APPLICATION_JSON_VALUE)
	@PreAuthorize("@securityService.hasPermission(authentication, 'ROLE_ADMIN')")
	@RequestMapping(path = "/list", method = RequestMethod.GET,  produces = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Object> getUserByEmailId(
		@ApiParam(value = "provide valid user email id", required = true) @RequestParam(name = "emailId", required = true) String emailId) {
		try {
			return ResponseUtils.buildSucessResponse(userService.getUserByEmailId(emailId));
		} catch (Exception exception) {
			log.error(UNEXPECTED_ERROR_OCCURRED, exception);
			return ResponseUtils.buildFailureResponse(new Exception(UNEXPECTED_ERROR_OCCURRED), exception.getMessage());
		}
	}

}