@Test public void testPostRead() throws Exception { String dataConnectorReadUrl = environment.getProperty("ref_postgres_data_connector_read_url"); String analyticReadDataRequestJSON = IOUtils.toString(getClass().getClassLoader().getResourceAsStream("analytic-read-data-request.json")); ResponseEntity<String> response = postRequestWithJsonPayload(dataConnectorReadUrl, analyticReadDataRequestJSON); assertEquals(HttpStatus.OK, response.getStatusCode()); String expectedAnalyticReadDataResponseString = IOUtils.toString(getClass().getClassLoader().getResourceAsStream("expected-analytic-read-data-response.json")); String actualAnalyticReadDataResponseString = response.getBody(); JSONAssert.assertEquals(expectedAnalyticReadDataResponseString, actualAnalyticReadDataResponseString, JSONCompareMode.LENIENT); }
@POST @Consumes("application/json") @Produces("application/json") @Path("/read") public Response postRead(AnalyticReadDataRequest analyticReadDataRequest, @Context HttpHeaders httpHeaders, @Context UriInfo uriInfo) { AnalyticReadDataResponse analyticReadDataResponse = customDataResourceManager.getAnalyticReadDataResponse(analyticReadDataRequest); return Response.ok().entity(analyticReadDataResponse).build(); }
ApiV1AnalyticsCustomdataResource { @POST @Consumes("application/json") @Produces("application/json") @Path("/read") public Response postRead(AnalyticReadDataRequest analyticReadDataRequest, @Context HttpHeaders httpHeaders, @Context UriInfo uriInfo) { AnalyticReadDataResponse analyticReadDataResponse = customDataResourceManager.getAnalyticReadDataResponse(analyticReadDataRequest); return Response.ok().entity(analyticReadDataResponse).build(); } }
ApiV1AnalyticsCustomdataResource { @POST @Consumes("application/json") @Produces("application/json") @Path("/read") public Response postRead(AnalyticReadDataRequest analyticReadDataRequest, @Context HttpHeaders httpHeaders, @Context UriInfo uriInfo) { AnalyticReadDataResponse analyticReadDataResponse = customDataResourceManager.getAnalyticReadDataResponse(analyticReadDataRequest); return Response.ok().entity(analyticReadDataResponse).build(); }  }
ApiV1AnalyticsCustomdataResource { @POST @Consumes("application/json") @Produces("application/json") @Path("/read") public Response postRead(AnalyticReadDataRequest analyticReadDataRequest, @Context HttpHeaders httpHeaders, @Context UriInfo uriInfo) { AnalyticReadDataResponse analyticReadDataResponse = customDataResourceManager.getAnalyticReadDataResponse(analyticReadDataRequest); return Response.ok().entity(analyticReadDataResponse).build(); }  @POST @Consumes("application/json") @Produces("application/json") @Path("/read") Response postRead(AnalyticReadDataRequest analyticReadDataRequest, @Context HttpHeaders httpHeaders, @Context UriInfo uriInfo); @POST @Consumes("application/json") @Produces("application/json") @Path("/write") Response postWrite(AnalyticWriteDataRequest analyticWriteDataRequest, @Context HttpHeaders httpHeaders, @Context UriInfo uriInfo); @GET @Path("/healthcheck") Response healthcheck(@Context HttpHeaders httpHeaders, @Context UriInfo uriInfo); }
ApiV1AnalyticsCustomdataResource { @POST @Consumes("application/json") @Produces("application/json") @Path("/read") public Response postRead(AnalyticReadDataRequest analyticReadDataRequest, @Context HttpHeaders httpHeaders, @Context UriInfo uriInfo) { AnalyticReadDataResponse analyticReadDataResponse = customDataResourceManager.getAnalyticReadDataResponse(analyticReadDataRequest); return Response.ok().entity(analyticReadDataResponse).build(); }  @POST @Consumes("application/json") @Produces("application/json") @Path("/read") Response postRead(AnalyticReadDataRequest analyticReadDataRequest, @Context HttpHeaders httpHeaders, @Context UriInfo uriInfo); @POST @Consumes("application/json") @Produces("application/json") @Path("/write") Response postWrite(AnalyticWriteDataRequest analyticWriteDataRequest, @Context HttpHeaders httpHeaders, @Context UriInfo uriInfo); @GET @Path("/healthcheck") Response healthcheck(@Context HttpHeaders httpHeaders, @Context UriInfo uriInfo);  }