4e3d08e0c33778cfb6051dbcf5f5d1731288137c
[portal.git] / ecomp-portal-BE-common / src / main / java / org / openecomp / portalapp / portal / scheduler / policy / PolicyRestInterfaceIfc.java
1 /*-
2  * ============LICENSE_START==========================================
3  * ONAP Portal
4  * ===================================================================
5  * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
6  * ===================================================================
7  *
8  * Unless otherwise specified, all software contained herein is licensed
9  * under the Apache License, Version 2.0 (the “License”);
10  * you may not use this software except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  *             http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  *
21  * Unless otherwise specified, all documentation contained herein is licensed
22  * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
23  * you may not use this documentation except in compliance with the License.
24  * You may obtain a copy of the License at
25  *
26  *             https://creativecommons.org/licenses/by/4.0/
27  *
28  * Unless required by applicable law or agreed to in writing, documentation
29  * distributed under the License is distributed on an "AS IS" BASIS,
30  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31  * See the License for the specific language governing permissions and
32  * limitations under the License.
33  *
34  * ============LICENSE_END============================================
35  *
36  * ECOMP is a trademark and service mark of AT&T Intellectual Property.
37  */
38 package org.openecomp.portalapp.portal.scheduler.policy;
39
40 import org.json.simple.JSONObject;
41 import org.openecomp.portalapp.portal.scheduler.policy.rest.RequestDetails;
42
43 public interface PolicyRestInterfaceIfc {
44         /**
45          * Inits the rest client.
46          */
47         public void initRestClient();
48
49         /**
50          * Gets the.
51          *
52          * @param <T>
53          *            the generic type
54          * @param t
55          *            the t
56          * @param sourceId
57          *            the source id
58          * @param path
59          *            the path
60          * @param restObject
61          *            the rest object
62          * @throws Exception
63          *             the exception
64          */
65         public <T> void Get(T t, String sourceId, String path, RestObject<T> restObject) throws Exception;
66
67         /**
68          * Delete.
69          *
70          * @param <T>
71          *            the generic type
72          * @param t
73          *            the t
74          * @param r
75          *            the r
76          * @param sourceID
77          *            the source ID
78          * @param path
79          *            the path
80          * @param restObject
81          *            the rest object
82          * @throws Exception
83          *             the exception
84          */
85         public <T> void Delete(T t, RequestDetails r, String sourceID, String path, RestObject<T> restObject)
86                         throws Exception;
87
88         /**
89          * Post.
90          *
91          * @param <T>
92          *            the generic type
93          * @param t
94          *            the t
95          * @param r
96          *            the r
97          * @param sourceID
98          *            the source ID
99          * @param path
100          *            the path
101          * @param restObject
102          *            the rest object
103          * @throws Exception
104          *             the exception
105          */
106         public <T> void Post(T t, JSONObject r, String sourceID, String path, RestObject<T> restObject) throws Exception;
107
108         /***
109          * Log request.
110          *
111          * @param r
112          *            the r
113          */
114         public void logRequest(RequestDetails r);
115
116 }