@Test public void getApplicationsTest() throws JAXBException { ApplicationRest applicationRest = prepareApplicationRestForGetApplicationsTest(); Response response = applicationRest.getApplications(); assertEquals(200, response.getStatus()); String xml = (String) response.getEntity(); Collection collection = ModelConverter.xmlCollectionToObject(xml); evaluateResutlsOfGetCollectionsOfApplications(collection); }
@GET @Produces(MediaType.APPLICATION_XML + ";qs=1") public Response getApplications() { logger.info("GET request to path: /applications in XML format"); List<Application> applications = applicationDAO.getAllWithOutDeployments(); String xml = XMLBuilder.getCollectionApplicationsXML(applications); return buildResponse(Status.OK, xml); }
ApplicationRest extends AbstractRest { @GET @Produces(MediaType.APPLICATION_XML + ";qs=1") public Response getApplications() { logger.info("GET request to path: /applications in XML format"); List<Application> applications = applicationDAO.getAllWithOutDeployments(); String xml = XMLBuilder.getCollectionApplicationsXML(applications); return buildResponse(Status.OK, xml); } }
ApplicationRest extends AbstractRest { @GET @Produces(MediaType.APPLICATION_XML + ";qs=1") public Response getApplications() { logger.info("GET request to path: /applications in XML format"); List<Application> applications = applicationDAO.getAllWithOutDeployments(); String xml = XMLBuilder.getCollectionApplicationsXML(applications); return buildResponse(Status.OK, xml); }  }
ApplicationRest extends AbstractRest { @GET @Produces(MediaType.APPLICATION_XML + ";qs=1") public Response getApplications() { logger.info("GET request to path: /applications in XML format"); List<Application> applications = applicationDAO.getAllWithOutDeployments(); String xml = XMLBuilder.getCollectionApplicationsXML(applications); return buildResponse(Status.OK, xml); }  @GET @Produces(MediaType.APPLICATION_XML + ";qs=1") Response getApplications(); @GET @Produces(MediaType.APPLICATION_JSON + ";qs=0.5") Response getApplicationsJSON(); @POST @Consumes(MediaType.APPLICATION_XML) @Produces(MediaType.APPLICATION_XML) Response postApplication(@QueryParam("negotiation") String negotiation, @QueryParam("schema") String schema, String payload); @POST @Consumes(MediaType.APPLICATION_XML) @Produces(MediaType.APPLICATION_JSON) Response postApplicationJSON(@QueryParam("negotiation") String negotiation, @QueryParam("schema") String schema, String payload); @GET @Path("{application_name}") @Produces(MediaType.APPLICATION_XML + ";qs=1") Response getApplication(@PathParam("application_name") String applicationName); @GET @Path("{application_name}") @Produces(MediaType.APPLICATION_JSON + ";qs=0.5") Response getApplicationJSON(@PathParam("application_name") String applicationName); @DELETE @Path("{application_name}") Response deleteApplication(@PathParam("application_name") String applicationName); }
ApplicationRest extends AbstractRest { @GET @Produces(MediaType.APPLICATION_XML + ";qs=1") public Response getApplications() { logger.info("GET request to path: /applications in XML format"); List<Application> applications = applicationDAO.getAllWithOutDeployments(); String xml = XMLBuilder.getCollectionApplicationsXML(applications); return buildResponse(Status.OK, xml); }  @GET @Produces(MediaType.APPLICATION_XML + ";qs=1") Response getApplications(); @GET @Produces(MediaType.APPLICATION_JSON + ";qs=0.5") Response getApplicationsJSON(); @POST @Consumes(MediaType.APPLICATION_XML) @Produces(MediaType.APPLICATION_XML) Response postApplication(@QueryParam("negotiation") String negotiation, @QueryParam("schema") String schema, String payload); @POST @Consumes(MediaType.APPLICATION_XML) @Produces(MediaType.APPLICATION_JSON) Response postApplicationJSON(@QueryParam("negotiation") String negotiation, @QueryParam("schema") String schema, String payload); @GET @Path("{application_name}") @Produces(MediaType.APPLICATION_XML + ";qs=1") Response getApplication(@PathParam("application_name") String applicationName); @GET @Path("{application_name}") @Produces(MediaType.APPLICATION_JSON + ";qs=0.5") Response getApplicationJSON(@PathParam("application_name") String applicationName); @DELETE @Path("{application_name}") Response deleteApplication(@PathParam("application_name") String applicationName);  }