Get subscribers rewritten to new rest client
[vid.git] / vid-app-common / src / main / java / org / onap / vid / aai / AaiOverTLSClient.java
index 58bf3f3..4f98bd3 100644 (file)
@@ -39,6 +39,7 @@ import org.onap.vid.aai.model.AaiNodeQueryResponse;
 import org.onap.vid.aai.model.ResourceType;
 import org.onap.vid.aai.util.AAIProperties;
 import org.onap.vid.client.SyncRestClientInterface;
+import org.onap.vid.model.SubscriberList;
 
 public class AaiOverTLSClient implements AaiOverTLSClientInterface {
 
@@ -69,6 +70,12 @@ public class AaiOverTLSClient implements AaiOverTLSClientInterface {
         return syncRestClient.get(uri, getRequestHeaders(), Collections.emptyMap(), AaiNodeQueryResponse.class);
     }
 
+    @Override
+    public HttpResponse<SubscriberList> getAllSubscribers() {
+        val uri = urlBase + String.format(URIS.SUBSCRIBERS, 0);
+        return syncRestClient.get(uri, getRequestHeaders(), Collections.emptyMap(), SubscriberList.class);
+    }
+
     private Map<String, String> getRequestHeaders() {
         val result = HashMap.of(
             TRANSACTION_ID_HEADER, propertySupplier.getRandomUUID(),