コード例 #1
0
 @DELETE
 @Path("/{testSuiteID:[0-9][0-9]*}")
 @Produces(MediaType.APPLICATION_JSON)
 public Response deleteTestSuite(@PathParam("testSuiteID") long id) {
   TestSuite testSuiteToRemove = testSuiteManager.findById(id);
   jcrBean.removeTestSuite(testSuiteToRemove.getName());
   testSuiteManager.deleteTestSuite(testSuiteManager.findById(id));
   return Response.ok().build();
 }
コード例 #2
0
 @POST
 @Consumes(MediaType.APPLICATION_JSON)
 @Produces(MediaType.APPLICATION_JSON)
 public TestSuite createTestSuite(TestSuite testSuite) {
   TestSuite result = null;
   if (testSuiteManager.getTestSuite(testSuite.getName()) == null) {
     result = testSuiteManager.createTestSuite(testSuite);
   } else {
     result = testSuite;
   }
   return result;
 }
コード例 #3
0
 @GET
 @Path("/{testSuiteID:[0-9][0-9]*}")
 @Produces(MediaType.APPLICATION_JSON)
 public TestSuite getTestSuite(@PathParam("testSuiteID") long id) {
   return testSuiteManager.findById(id);
 }
コード例 #4
0
 @GET
 @Produces(MediaType.APPLICATION_JSON)
 public List<TestSuite> getAllTestSuites() {
   return testSuiteManager.getAllTestSuites();
 }