added svcapi ui and camunda code
[it/otf.git] / otf-service-api / src / main / java / org / oran / otf / api / service / VirtualTestHeadService.java
diff --git a/otf-service-api/src/main/java/org/oran/otf/api/service/VirtualTestHeadService.java b/otf-service-api/src/main/java/org/oran/otf/api/service/VirtualTestHeadService.java
new file mode 100644 (file)
index 0000000..9c6ed6f
--- /dev/null
@@ -0,0 +1,55 @@
+/*  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.TestHead;\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
+\r
+import javax.ws.rs.*;\r
+import javax.ws.rs.core.HttpHeaders;\r
+import javax.ws.rs.core.MediaType;\r
+import javax.ws.rs.core.Response;\r
+\r
+\r
+@Api\r
+@Path("/virtualTestHead")\r
+@Tag(name = "Health Service", description = "Query the availability of the API")\r
+@Produces({MediaType.APPLICATION_JSON})\r
+public interface VirtualTestHeadService {\r
+\r
+    @PATCH\r
+    @Path("/v1/{testHeadName}")\r
+    @Produces({MediaType.APPLICATION_JSON})\r
+    @Operation(\r
+            summary = "Used to update fields in the virtual test head",\r
+            responses = {\r
+                    @ApiResponse(\r
+                            responseCode = "200",\r
+                            description = "The response will include the new vth object",\r
+                            content =\r
+                            @Content(\r
+                                    mediaType = "application/json",\r
+                                    schema = @Schema(implementation = OTFApiResponse.class)))\r
+            })\r
+    Response updateVirtualTestHead(@HeaderParam(HttpHeaders.AUTHORIZATION) String authorization, @PathParam("testHeadName") String testHeadName, TestHead newTestHead);\r
+}\r