remove "Previous instantiotion" button from service popup.
[vid.git] / vid-app-common / src / main / java / org / onap / vid / client / SyncRestClientInterface.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * VID
4  * ================================================================================
5  * Copyright (C) 2018 - 2019 Nokia. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.onap.vid.client;
22
23 import io.joshworks.restclient.http.HttpResponse;
24 import io.joshworks.restclient.http.JsonNode;
25
26 import java.io.InputStream;
27 import java.util.Map;
28
29 public interface SyncRestClientInterface {
30     class HEADERS {
31         public static final String CONTENT_TYPE = "Content-Type";
32         public static final String AUTHORIZATION = "Authorization";
33         public static final String X_ECOMP_INSTANCE_ID = "X-ECOMP-InstanceID";
34     }
35
36     HttpResponse<JsonNode> post(String url, Map<String, String> headers, Object body);
37
38     <T> HttpResponse<T> post(String url, Map<String, String> headers, Object body, Class<T> aClass);
39
40     HttpResponse<JsonNode> get(String url, Map<String, String> headers, Map<String, String> routeParams);
41
42     <T> HttpResponse<T> get(String url, Map<String, String> headers, Map<String, String> routeParams, Class<T> aClass);
43
44     HttpResponse<InputStream> getStream(String url, Map<String, String> headers, Map<String, String> routeParams);
45
46     HttpResponse<JsonNode> put(String url, Map<String, String> headers, Object body);
47
48     <T> HttpResponse<T> put(String url, Map<String, String> headers, Object body, Class<T> aClass);
49
50     <T> HttpResponse<T> delete(String url, Map<String, String> headers, Object body, Class<T> aClass);
51
52     <T> HttpResponse<T> delete(String url, Map<String, String> headers, Class<T> aClass);
53
54     HttpResponse<JsonNode> delete(String url, Map<String, String> headers);
55
56     void destroy();
57
58 }