Advertisement
Guest User

Untitled

a guest
Jul 28th, 2015
321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.68 KB | None | 0 0
  1. package io.swagger.api;
  2.  
  3. import io.swagger.annotations.ApiParam;
  4. import io.swagger.api.factories.SessionsApiServiceFactory;
  5. import io.swagger.model.Session;
  6.  
  7. import javax.ws.rs.GET;
  8. import javax.ws.rs.Path;
  9. import javax.ws.rs.PathParam;
  10. import javax.ws.rs.Produces;
  11. import javax.ws.rs.QueryParam;
  12. import javax.ws.rs.core.Response;
  13. import java.io.File;
  14.  
  15. @Path("/sessions")
  16.  
  17.  
  18. @io.swagger.annotations.Api(value = "/sessions", description = "the sessions API")
  19. public class SessionsApi {
  20.  
  21. private final SessionsApiService delegate = SessionsApiServiceFactory.getSessionsApi();
  22.  
  23. @GET
  24. @Produces({"application/json"})
  25. @io.swagger.annotations.ApiOperation(value = "Returns the list of all recorded sessions.\n", notes = "Returns the list of all recorded sessions.\n", response = String.class, responseContainer = "List")
  26. @io.swagger.annotations.ApiResponses(value = {
  27. @io.swagger.annotations.ApiResponse(code = 200, message = "List of sessions")})
  28. public Response sessionsGet()
  29. throws NotFoundException {
  30. return delegate.sessionsGet();
  31. }
  32.  
  33. @GET
  34. @Path("/{sessionId}")
  35. @Produces({"application/json"})
  36. @io.swagger.annotations.ApiOperation(value = "Returns the details of the recorded session specified by session Id.\n", notes = "Returns the details of the recorded session specified by session Id.\n", response = Session.class)
  37. @io.swagger.annotations.ApiResponses(value = {
  38. @io.swagger.annotations.ApiResponse(code = 200, message = "Session Details.")})
  39. public Response sessionsSessionIdGet(@ApiParam(value = "Id of the session whose details are needed.", required = true) @PathParam("sessionId") String sessionId)
  40. throws NotFoundException {
  41. return delegate.sessionsSessionIdGet(sessionId);
  42. }
  43.  
  44. @GET
  45. @Path("/{sessionId}/clear")
  46. @io.swagger.annotations.ApiOperation(value = "Clears the specified session of all its scenarios.\n", notes = "Clears the specified session of all its scenarios.\n", response = Void.class)
  47. @io.swagger.annotations.ApiResponses(value = {
  48. @io.swagger.annotations.ApiResponse(code = 200, message = "Successfully cleared session.")})
  49.  
  50. public Response sessionsSessionIdClearGet(@ApiParam(value = "Id of the session whose scenarios has to be cleared.", required = true) @PathParam("sessionId") String sessionId)
  51. throws NotFoundException {
  52. return delegate.sessionsSessionIdClearGet(sessionId);
  53. }
  54.  
  55. @GET
  56. @Path("/{sessionId}/replayVerifySummary")
  57. @Produces({"text/plain"})
  58. @io.swagger.annotations.ApiOperation(value = "Summary of replay operation.\n", notes = "When replay and verification is enabled against the specified destination - the results are stored on the replay engine host. This API returns a short summary of the replay verification operation.\n", response = String.class)
  59. @io.swagger.annotations.ApiResponses(value = {
  60. @io.swagger.annotations.ApiResponse(code = 200, message = "Session name, Passed Scenario count and Failed Scenario count are returned.")})
  61.  
  62. public Response sessionsSessionIdReplayVerifySummaryGet(@ApiParam(value = "Id of the session whose replay summary is needed.", required = true) @PathParam("sessionId") String sessionId)
  63. throws NotFoundException {
  64. return delegate.sessionsSessionIdReplayVerifySummaryGet(sessionId);
  65. }
  66.  
  67. @GET
  68. @Path("/{sessionId}/testPlan")
  69. @Produces({"application/octet-stream"})
  70. @io.swagger.annotations.ApiOperation(value = "Produces a JMeter JMX test plan for the specified recorded session.\n", notes = "The recorded scenarios are exported as JMX test plan. This test plan can be used for replay. The JMX test plan will contain all the scenarios with assertions. \nThe parameters to this API allow filtering of the scenarios that get exported as part of the JMX file. You can export only scenarios which contain the specified header value in the scenario request.\n", response = File.class)
  71. @io.swagger.annotations.ApiResponses(value = {
  72. @io.swagger.annotations.ApiResponse(code = 200, message = "JMX test plan for the specified request.")})
  73.  
  74. public Response sessionsSessionIdTestPlanGet(@ApiParam(value = "Id of the session whose test plan is needed.", required = true) @PathParam("sessionId") String sessionId,
  75. @ApiParam(value = "name of the request header.") @QueryParam("header") String header,
  76. @ApiParam(value = "substring that must be contained in the specified header value.") @QueryParam("contains") String contains)
  77. throws NotFoundException {
  78. return delegate.sessionsSessionIdTestPlanGet(sessionId, header, contains);
  79. }
  80. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement