Define the AAI API in esr-server.
[aai/esr-server.git] / esr-mgr / src / main / java / org / onap / aai / esr / externalservice / aai / IExternalSystem.java
1 /**
2  * Copyright 2017 ZTE Corporation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 package org.onap.aai.esr.externalservice.aai;
17
18 import javax.ws.rs.Consumes;
19 import javax.ws.rs.DELETE;
20 import javax.ws.rs.GET;
21 import javax.ws.rs.HeaderParam;
22 import javax.ws.rs.PUT;
23 import javax.ws.rs.Path;
24 import javax.ws.rs.PathParam;
25 import javax.ws.rs.Produces;
26 import javax.ws.rs.QueryParam;
27 import javax.ws.rs.core.MediaType;
28
29 import org.onap.aai.esr.entity.aai.EsrEmsDetail;
30 import org.onap.aai.esr.entity.aai.EsrThirdpartySdncDetail;
31 import org.onap.aai.esr.entity.aai.EsrVnfmDetail;
32
33 public interface IExternalSystem {
34
35   @PUT
36   @Path("/esr-vnfm-list/esr-vnfm/{vnfm_id}")
37   @Consumes(MediaType.APPLICATION_JSON)
38   @Produces(MediaType.APPLICATION_JSON)
39   public void registerVNFM(@HeaderParam("X-TransactionId") String transactionId,
40       @HeaderParam("X-FromAppId") String fromApp,
41       @HeaderParam("Authorization") String authorization, @PathParam("vnfm_id") String vnfmId,
42       EsrVnfmDetail esrVnfmDetail) throws Exception;
43
44   @GET
45   @Path("/esr-vnfm-list/esr-vnfm/{vnfm_id}?depth=all")
46   @Consumes(MediaType.APPLICATION_JSON)
47   @Produces(MediaType.APPLICATION_JSON)
48   public String queryVNFMDetail(@HeaderParam("X-TransactionId") String transactionId,
49       @HeaderParam("X-FromAppId") String fromApp,
50       @HeaderParam("Authorization") String authorization, @PathParam("vnfm_id") String vnfmId)
51       throws Exception;
52
53   @GET
54   @Path("/esr-vnfm-list")
55   @Consumes(MediaType.APPLICATION_JSON)
56   @Produces(MediaType.APPLICATION_JSON)
57   public String queryVNFMList(@HeaderParam("X-TransactionId") String transactionId,
58       @HeaderParam("X-FromAppId") String fromApp,
59       @HeaderParam("Authorization") String authorization) throws Exception;
60
61   @DELETE
62   @Path("/esr-vnfm-list/esr-vnfm/{vnfm_id}")
63   @Consumes(MediaType.APPLICATION_JSON)
64   @Produces(MediaType.APPLICATION_JSON)
65   public void deleteVNFM(@HeaderParam("X-TransactionId") String transactionId,
66       @HeaderParam("X-FromAppId") String fromApp,
67       @HeaderParam("Authorization") String authorization,
68       @PathParam("vnfm_id") String vnfmId,
69       @QueryParam("resouce-version") String resourceVersion) throws Exception;
70
71   @PUT
72   @Path("/esr-ems-list/esr-ems/{ems_id}")
73   @Consumes(MediaType.APPLICATION_JSON)
74   @Produces(MediaType.APPLICATION_JSON)
75   public void registerEMS(@HeaderParam("X-TransactionId") String transactionId,
76       @HeaderParam("X-FromAppId") String fromApp,
77       @HeaderParam("Authorization") String authorization, @PathParam("ems_id") String emsId,
78       EsrEmsDetail esrEmsDetail) throws Exception;
79
80   @GET
81   @Path("/esr-ems-list/esr-ems/{ems_id}?depth=all")
82   @Consumes(MediaType.APPLICATION_JSON)
83   @Produces(MediaType.APPLICATION_JSON)
84   public String queryEMSDetail(@HeaderParam("X-TransactionId") String transactionId,
85       @HeaderParam("X-FromAppId") String fromApp,
86       @HeaderParam("Authorization") String authorization, @PathParam("ems_id") String emsId)
87       throws Exception;
88
89   @GET
90   @Path("/esr-ems-list")
91   @Consumes(MediaType.APPLICATION_JSON)
92   @Produces(MediaType.APPLICATION_JSON)
93   public String queryEMSList(@HeaderParam("X-TransactionId") String transactionId,
94       @HeaderParam("X-FromAppId") String fromApp,
95       @HeaderParam("Authorization") String authorization) throws Exception;
96
97   @DELETE
98   @Path("/esr-ems-list/esr-ems/{ems_id}")
99   @Consumes(MediaType.APPLICATION_JSON)
100   @Produces(MediaType.APPLICATION_JSON)
101   public void deleteEMS(@HeaderParam("X-TransactionId") String transactionId,
102       @HeaderParam("X-FromAppId") String fromApp,
103       @HeaderParam("Authorization") String authorization,
104       @PathParam("ems_id") String emsId,
105       @QueryParam("resouce-version") String resourceVersion) throws Exception;
106   
107   @PUT
108   @Path("/esr-thirdparty-sdnc-list/esr-thirdparty-sdnc/{thirdparty-sdnc-id}")
109   @Consumes(MediaType.APPLICATION_JSON)
110   @Produces(MediaType.APPLICATION_JSON)
111   public void registerThirdpartySdnc(@HeaderParam("X-TransactionId") String transactionId,
112       @HeaderParam("X-FromAppId") String fromApp,
113       @HeaderParam("Authorization") String authorization, @PathParam("thirdparty-sdnc-id") String thirdpartySdncId,
114       EsrThirdpartySdncDetail esrThirdpartySdncDetail) throws Exception;
115
116   @GET
117   @Path("/esr-thirdparty-sdnc-list/esr-thirdparty-sdnc/{thirdparty-sdnc-id}?depth=all")
118   @Consumes(MediaType.APPLICATION_JSON)
119   @Produces(MediaType.APPLICATION_JSON)
120   public String queryThirdpartySdncDetail(@HeaderParam("X-TransactionId") String transactionId,
121       @HeaderParam("X-FromAppId") String fromApp,
122       @HeaderParam("Authorization") String authorization, @PathParam("thirdparty-sdnc-id") String thirdpartySdncId)
123       throws Exception;
124
125   @GET
126   @Path("/esr-thirdparty-sdnc-list")
127   @Consumes(MediaType.APPLICATION_JSON)
128   @Produces(MediaType.APPLICATION_JSON)
129   public String queryThirdpartySdncList(@HeaderParam("X-TransactionId") String transactionId,
130       @HeaderParam("X-FromAppId") String fromApp,
131       @HeaderParam("Authorization") String authorization) throws Exception;
132
133   @DELETE
134   @Path("/esr-thirdparty-sdnc-list/esr-thirdparty-sdnc/{thirdparty-sdnc-id}")
135   @Consumes(MediaType.APPLICATION_JSON)
136   @Produces(MediaType.APPLICATION_JSON)
137   public void deleteThirdpartySdnc(@HeaderParam("X-TransactionId") String transactionId,
138       @HeaderParam("X-FromAppId") String fromApp,
139       @HeaderParam("Authorization") String authorization,
140       @PathParam("thirdparty-sdnc-id") String thirdpartySdncId,
141       @QueryParam("resouce-version") String resourceVersion) throws Exception;
142 }