--- /dev/null
+/* Copyright (c) 2019 AT&T Intellectual Property. #\r
+# #\r
+# Licensed under the Apache License, Version 2.0 (the "License"); #\r
+# you may not use this file except in compliance with the License. #\r
+# You may obtain a copy of the License at #\r
+# #\r
+# http://www.apache.org/licenses/LICENSE-2.0 #\r
+# #\r
+# Unless required by applicable law or agreed to in writing, software #\r
+# distributed under the License is distributed on an "AS IS" BASIS, #\r
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #\r
+# See the License for the specific language governing permissions and #\r
+# limitations under the License. #\r
+##############################################################################*/\r
+\r
+\r
+package org.oran.otf.api.service;\r
+\r
+import org.oran.otf.common.model.TestExecution;\r
+import org.oran.otf.common.model.local.OTFApiResponse;\r
+import io.swagger.annotations.Api;\r
+import io.swagger.v3.oas.annotations.Operation;\r
+import io.swagger.v3.oas.annotations.media.Content;\r
+import io.swagger.v3.oas.annotations.media.Schema;\r
+import io.swagger.v3.oas.annotations.responses.ApiResponse;\r
+import io.swagger.v3.oas.annotations.tags.Tag;\r
+import javax.ws.rs.GET;\r
+import javax.ws.rs.HeaderParam;\r
+import javax.ws.rs.Path;\r
+import javax.ws.rs.PathParam;\r
+import javax.ws.rs.Produces;\r
+import javax.ws.rs.core.MediaType;\r
+import javax.ws.rs.core.Response;\r
+\r
+import org.springframework.stereotype.Component;\r
+\r
+@Component\r
+@Api\r
+@Path("/testExecution")\r
+@Tag(name = "Test Services", description = "")\r
+@Produces(MediaType.APPLICATION_JSON)\r
+public interface TestExecutionService {\r
+ @GET\r
+ @Path("v1/status/executionId/{executionId}")\r
+ @Produces({MediaType.APPLICATION_JSON})\r
+ @Operation(\r
+ description = "Respond with a test execution object if it exists",\r
+ summary = "Find test execution log by processInstanceId",\r
+ responses = {\r
+ @ApiResponse(\r
+ responseCode = "200",\r
+ description = "The created Test Instance object is returned when it is created",\r
+ content = {\r
+ @Content(\r
+ mediaType = "application/json",\r
+ schema = @Schema(implementation = TestExecution.class))\r
+ })\r
+ })\r
+ Response getExecutionStatus(\r
+ @HeaderParam("Authorization") String authorization,\r
+ @PathParam("executionId") String executionId);\r
+\r
+ @GET\r
+ @Path("v1/executionId/{executionId}")\r
+ @Produces({MediaType.APPLICATION_JSON})\r
+ @Operation(\r
+ description =\r
+ "Respond with a test execution object, and state of the process instance if it exists.",\r
+ summary = "Find test execution log by executionId",\r
+ responses = {\r
+ @ApiResponse(\r
+ responseCode = "200",\r
+ description = "The created Test Instance object is returned when it is created",\r
+ content = {\r
+ @Content(\r
+ mediaType = "application/json",\r
+ schema = @Schema(implementation = TestExecution.class))\r
+ }),\r
+ @ApiResponse(\r
+ responseCode = "404",\r
+ description =\r
+ "No process instance was found with the executionId used to query the service",\r
+ content = {\r
+ @Content(\r
+ mediaType = "application/json",\r
+ schema = @Schema(implementation = OTFApiResponse.class))\r
+ })\r
+ })\r
+ Response getExecution(\r
+ @HeaderParam("Authorization") String authorization,\r
+ @PathParam("executionId") String executionId);\r
+}\r