2 * Copyright © 2017-2018 AT&T Intellectual Property.
\r
4 * Licensed under the Apache License, Version 2.0 (the "License");
\r
5 * you may not use this file except in compliance with the License.
\r
6 * You may obtain a copy of the License at
\r
8 * http://www.apache.org/licenses/LICENSE-2.0
\r
10 * Unless required by applicable law or agreed to in writing, software
\r
11 * distributed under the License is distributed on an "AS IS" BASIS,
\r
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
13 * See the License for the specific language governing permissions and
\r
14 * limitations under the License.
\r
17 package org.onap.ccsdk.apps.controllerblueprints.service.rs;
\r
19 import io.swagger.annotations.*;
\r
20 import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException;
\r
21 import org.onap.ccsdk.apps.controllerblueprints.service.domain.ModelType;
\r
23 import javax.ws.rs.*;
\r
24 import javax.ws.rs.core.MediaType;
\r
25 import java.util.List;
\r
28 * ModelTypeRest.java Purpose: Rest service controller for Artifact Handling
\r
30 * @author Brinda Santh
\r
35 @Produces({MediaType.APPLICATION_JSON})
\r
36 public interface ModelTypeRest {
\r
39 * This is a getModelTypeByName rest service
\r
43 * @throws BluePrintException
\r
46 @Path("/modeltype/{name}")
\r
47 @Consumes({MediaType.APPLICATION_JSON})
\r
48 @Produces({MediaType.APPLICATION_JSON})
\r
49 @ApiOperation(value = "Provides Rest service to get Model Type by id", response = ModelType.class)
\r
50 @ApiResponses(value = {@ApiResponse(code = 404, message = "Service not available"),
\r
51 @ApiResponse(code = 500, message = "Unexpected Runtime error")})
\r
52 ModelType getModelTypeByName(@ApiParam(required = true) @PathParam("name") String name)
\r
53 throws BluePrintException;
\r
56 * This is a saveModelType rest service
\r
60 * @throws BluePrintException
\r
65 @Consumes({MediaType.APPLICATION_JSON})
\r
66 @Produces({MediaType.APPLICATION_JSON})
\r
67 @ApiOperation(value = "Provides Rest service to Save Model Type", response = ModelType.class)
\r
68 @ApiResponses(value = {@ApiResponse(code = 404, message = "Service not available"),
\r
69 @ApiResponse(code = 500, message = "Unexpected Runtime error")})
\r
70 ModelType saveModelType(@ApiParam(required = true) ModelType modelType) throws BluePrintException;
\r
73 * This is a deleteModelType rest service
\r
76 * @throws BluePrintException
\r
79 @Path("/modeltype/{name}")
\r
80 @Consumes({MediaType.APPLICATION_JSON})
\r
81 @Produces({MediaType.APPLICATION_JSON})
\r
82 @ApiOperation(value = "Provides Rest service to delete Model Type")
\r
83 @ApiResponses(value = {@ApiResponse(code = 404, message = "Service not available"),
\r
84 @ApiResponse(code = 500, message = "Unexpected Runtime error")})
\r
85 void deleteModelTypeByName(@ApiParam(required = true) @PathParam("name") String name)
\r
86 throws BluePrintException;
\r
89 * This is a searchModelType rest service
\r
92 * @return List<ModelType>
\r
93 * @throws BluePrintException
\r
96 @Path("/modeltypesearch/{tags}")
\r
97 @Consumes({MediaType.APPLICATION_JSON})
\r
98 @Produces({MediaType.APPLICATION_JSON})
\r
99 @ApiOperation(value = "Provides Rest service to get Model Type by tags", response = ModelType.class,
\r
100 responseContainer = "List")
\r
101 @ApiResponses(value = {@ApiResponse(code = 404, message = "Service not available"),
\r
102 @ApiResponse(code = 500, message = "Unexpected Runtime error")})
\r
103 List<ModelType> searchModelTypes(@ApiParam(required = true) @PathParam("tags") String tags)
\r
104 throws BluePrintException;
\r
107 * This is a getModelTypeByDefinitionType rest service
\r
109 * @param definitionType
\r
110 * @return List<ModelType>
\r
111 * @throws BluePrintException
\r
114 @Path("/modeltypebydefinition/{definitionType}")
\r
115 @Consumes({MediaType.APPLICATION_JSON})
\r
116 @Produces({MediaType.APPLICATION_JSON})
\r
117 @ApiOperation(value = "Provides Rest service to get Model Type by tags", response = ModelType.class,
\r
118 responseContainer = "List")
\r
119 @ApiResponses(value = {@ApiResponse(code = 404, message = "Service not available"),
\r
120 @ApiResponse(code = 500, message = "Unexpected Runtime error")})
\r
121 List<ModelType> getModelTypeByDefinitionType(
\r
122 @ApiParam(required = true) @PathParam("definitionType") String definitionType)
\r
123 throws BluePrintException;
\r