class DatasourceController {

	@ApiOperation(httpMethod = "GET", value = "API to get all datasource details", response = Response.class,  produces = MediaType.APPLICATION_JSON_VALUE)
	//@PreAuthorize("@securityService.hasPermission(authentication)")
	
	@RequestMapping(path = "/list", method = RequestMethod.GET,  produces = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Object> getAllDatasourceDetails() {
		try {
			return ResponseUtils.buildSucessResponse(datasourceService.getAllDatasourceDetails());
		} catch (Exception exception) {
			log.error(UNEXPECTED_ERROR_OCCURRED, exception);
			return ResponseUtils.buildFailureResponse(new Exception(UNEXPECTED_ERROR_OCCURRED), exception.getMessage());
		}
	}

}