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.ResourceDictionary;
\r
23 import javax.ws.rs.*;
\r
24 import javax.ws.rs.core.MediaType;
\r
25 import java.util.List;
\r
28 * ResourceDictionaryRest.java Purpose: Rest service controller for Artifact Handling
\r
30 * @author Brinda Santh
\r
35 @Produces({MediaType.APPLICATION_JSON})
\r
37 public interface ResourceDictionaryRest {
\r
40 * This is a getDataDictionaryByPath rest service
\r
43 * @return ResourceDictionary
\r
44 * @throws BluePrintException
\r
47 @Path("/dictionary/{name}")
\r
48 @Consumes({MediaType.APPLICATION_JSON})
\r
49 @Produces({MediaType.APPLICATION_JSON})
\r
50 @ApiOperation(value = "Provides Rest service to get Resource dictionary", response = ResourceDictionary.class)
\r
51 @ApiResponses(value = {@ApiResponse(code = 404, message = "Service not available"),
\r
52 @ApiResponse(code = 500, message = "Unexpected Runtime error")})
\r
53 ResourceDictionary getResourceDictionaryByName(@ApiParam(required = true) @PathParam("name") String name)
\r
54 throws BluePrintException;
\r
57 * This is a saveDataDictionary rest service
\r
59 * @param resourceMapping
\r
60 * @return ResourceDictionary
\r
61 * @throws BluePrintException
\r
65 @Path("/dictionary")
\r
66 @Consumes({MediaType.APPLICATION_JSON})
\r
67 @Produces({MediaType.APPLICATION_JSON})
\r
68 @ApiOperation(value = "Provides Rest service to Save Resource dictionary Type", response = ResourceDictionary.class)
\r
69 @ApiResponses(value = {@ApiResponse(code = 404, message = "Service not available"),
\r
70 @ApiResponse(code = 500, message = "Unexpected Runtime error")})
\r
71 ResourceDictionary saveResourceDictionary(@ApiParam(required = true) ResourceDictionary resourceMapping)
\r
72 throws BluePrintException;
\r
75 * This is a deleteDataDictionaryByName rest service
\r
78 * @throws BluePrintException
\r
81 @Path("/dictionary/{name}")
\r
82 @Consumes({MediaType.APPLICATION_JSON})
\r
83 @Produces({MediaType.APPLICATION_JSON})
\r
84 @ApiOperation(value = "Provides Rest service to delete ResourceDictionary Type")
\r
85 @ApiResponses(value = {@ApiResponse(code = 404, message = "Service not available"),
\r
86 @ApiResponse(code = 500, message = "Unexpected Runtime error")})
\r
87 void deleteResourceDictionaryByName(@ApiParam(required = true) @PathParam("name") String name)
\r
88 throws BluePrintException;
\r
91 * This is a searchResourceDictionaryByTags rest service
\r
94 * @return ResourceDictionary
\r
95 * @throws BluePrintException
\r
98 @Path("/dictionarysearch/{tags}")
\r
99 @Consumes({MediaType.APPLICATION_JSON})
\r
100 @Produces({MediaType.APPLICATION_JSON})
\r
101 @ApiOperation(value = "Provides Rest service to search Resource dictionary by tags",
\r
102 response = ResourceDictionary.class, responseContainer = "List")
\r
103 @ApiResponses(value = {@ApiResponse(code = 404, message = "Service not available"),
\r
104 @ApiResponse(code = 500, message = "Unexpected Runtime error")})
\r
105 List<ResourceDictionary> searchResourceDictionaryByTags(
\r
106 @ApiParam(required = true) @PathParam("tags") String tags) throws BluePrintException;
\r
109 * This is a searchResourceDictionaryByNames rest service
\r
112 * @return List<ResourceDictionary>
\r
113 * @throws BluePrintException
\r
116 @Path("/dictionarybynames")
\r
117 @Consumes({MediaType.APPLICATION_JSON})
\r
118 @Produces({MediaType.APPLICATION_JSON})
\r
119 @ApiOperation(value = "Provides Rest service to get ResourceDictionary Type by names",
\r
120 response = ResourceDictionary.class, responseContainer = "List")
\r
121 @ApiResponses(value = {@ApiResponse(code = 404, message = "Service not available"),
\r
122 @ApiResponse(code = 500, message = "Unexpected Runtime error")})
\r
123 List<ResourceDictionary> searchResourceDictionaryByNames(@ApiParam(required = true) List<String> names)
\r
124 throws BluePrintException;
\r