ad43746cac06b787e5c431b1a40d3f4dbea293b4
[vid.git] / vid-app-common / src / main / java / org / onap / vid / aai / AaiOverTLSClientInterface.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * VID
4  * ================================================================================
5  * Copyright (C) 2018 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.aai;
22
23 import io.joshworks.restclient.http.HttpResponse;
24 import org.onap.portalsdk.core.util.SystemProperties;
25 import org.onap.vid.aai.model.AaiNodeQueryResponse;
26 import org.onap.vid.aai.model.ResourceType;
27 import org.onap.vid.model.SubscriberList;
28
29 public interface AaiOverTLSClientInterface {
30
31     class URIS {
32
33         static final String SUBSCRIBERS = "business/customers?subscriber-type=INFRA&depth=%s";
34         static final String NODE_TYPE_BY_NAME = "search/nodes-query?search-node-type=%s&filter=%s:EQUALS:%s";
35     }
36
37     class HEADERS {
38         static final String TRANSACTION_ID_HEADER = "X-TransactionId";
39         static final String FROM_APP_ID_HEADER = "X-FromAppId";
40         static final String CONTENT_TYPE = "Content-Type";
41         static final String REQUEST_ID = SystemProperties.ECOMP_REQUEST_ID;
42         static final String ACCEPT = "Accept";
43     }
44
45     void setUseClientCert(boolean useClientCert);
46
47     HttpResponse<AaiNodeQueryResponse> searchNodeTypeByName(String name, ResourceType type);
48
49     HttpResponse<SubscriberList> getAllSubscribers();
50
51 }