Implement support for v10 model entities.
[aai/model-loader.git] / src / main / java / org / openecomp / modelloader / service / ModelLoaderInterface.java
1 /**\r
2  * ============LICENSE_START=======================================================\r
3  * Model Loader\r
4  * ================================================================================\r
5  * Copyright © 2017 AT&T Intellectual Property.\r
6  * Copyright © 2017 Amdocs\r
7  * All rights reserved.\r
8  * ================================================================================\r
9  * Licensed under the Apache License, Version 2.0 (the "License");\r
10  * you may not use this file except in compliance with the License.\r
11  * You may obtain a copy of the License at\r
12  * http://www.apache.org/licenses/LICENSE-2.0\r
13  * Unless required by applicable law or agreed to in writing, software\r
14  * distributed under the License is distributed on an "AS IS" BASIS,\r
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
16  * See the License for the specific language governing permissions and\r
17  * limitations under the License.\r
18  * ============LICENSE_END=========================================================\r
19  *\r
20  * ECOMP and OpenECOMP are trademarks\r
21  * and service marks of AT&T Intellectual Property.\r
22  */\r
23 package org.openecomp.modelloader.service;\r
24 \r
25 import java.io.IOException;\r
26 \r
27 import javax.servlet.http.HttpServletRequest;\r
28 import javax.ws.rs.Consumes;\r
29 import javax.ws.rs.GET;\r
30 import javax.ws.rs.POST;\r
31 import javax.ws.rs.PUT;\r
32 import javax.ws.rs.Path;\r
33 import javax.ws.rs.PathParam;\r
34 import javax.ws.rs.Produces;\r
35 import javax.ws.rs.core.Context;\r
36 import javax.ws.rs.core.Response;\r
37 \r
38 public interface ModelLoaderInterface {\r
39 \r
40   @GET\r
41   @Path("/loadModel/{modelid}")\r
42   public Response loadModel(@PathParam("modelid") String modelid);\r
43 \r
44   @PUT\r
45   @Path("/saveModel/{modelid}/{modelname}")\r
46   public Response saveModel(@PathParam("modelid") String modelid,\r
47       @PathParam("modelname") String modelname);\r
48 \r
49   @POST\r
50   @Consumes("application/xml")\r
51   @Produces("application/xml")\r
52   @Path("/ingestModel/{modelid}")\r
53   public Response ingestModel(@PathParam("modelid") String modelid, @Context HttpServletRequest req,\r
54       String payload) throws IOException;\r
55 }\r