summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Smokowski <ss835w@att.com>2019-02-15 14:23:49 +0000
committerGerrit Code Review <gerrit@onap.org>2019-02-15 14:23:49 +0000
commit2c46078b2731081fa79b4af0e22a39e6641010ee (patch)
treece5e9dcc5aa312a5a5600e8723b6a9116ce96a30
parentb7f55f47a964351e7dc46d05af7f53f7da1c9eba (diff)
parentf76219ff66e53df732cfee41771baa68d9a0a74c (diff)
Merge "query clients now set their expected object"
-rw-r--r--common/src/main/java/org/onap/so/client/aai/AAIDSLQueryClient.java3
-rw-r--r--common/src/main/java/org/onap/so/client/aai/AAIQueryClient.java3
-rw-r--r--common/src/main/java/org/onap/so/client/graphinventory/GraphInventoryQueryClient.java4
3 files changed, 6 insertions, 4 deletions
diff --git a/common/src/main/java/org/onap/so/client/aai/AAIDSLQueryClient.java b/common/src/main/java/org/onap/so/client/aai/AAIDSLQueryClient.java
index e9b58b469d..4cee4f3df7 100644
--- a/common/src/main/java/org/onap/so/client/aai/AAIDSLQueryClient.java
+++ b/common/src/main/java/org/onap/so/client/aai/AAIDSLQueryClient.java
@@ -22,9 +22,10 @@ package org.onap.so.client.aai;
import org.onap.so.client.aai.entities.uri.AAIUriFactory;
import org.onap.so.client.graphinventory.GraphInventoryQueryClient;
+import org.onap.so.client.graphinventory.entities.DSLQuery;
import org.onap.so.client.graphinventory.entities.uri.GraphInventoryUri;
-public class AAIDSLQueryClient extends GraphInventoryQueryClient<AAIDSLQueryClient> {
+public class AAIDSLQueryClient extends GraphInventoryQueryClient<AAIDSLQueryClient, DSLQuery> {
public AAIDSLQueryClient() {
super(new AAIClient());
diff --git a/common/src/main/java/org/onap/so/client/aai/AAIQueryClient.java b/common/src/main/java/org/onap/so/client/aai/AAIQueryClient.java
index c3523e94c2..66d5d1f5cb 100644
--- a/common/src/main/java/org/onap/so/client/aai/AAIQueryClient.java
+++ b/common/src/main/java/org/onap/so/client/aai/AAIQueryClient.java
@@ -20,11 +20,12 @@
package org.onap.so.client.aai;
+import org.onap.so.client.aai.entities.CustomQuery;
import org.onap.so.client.aai.entities.uri.AAIUriFactory;
import org.onap.so.client.graphinventory.GraphInventoryQueryClient;
import org.onap.so.client.graphinventory.entities.uri.GraphInventoryUri;
-public class AAIQueryClient extends GraphInventoryQueryClient<AAIQueryClient> {
+public class AAIQueryClient extends GraphInventoryQueryClient<AAIQueryClient, CustomQuery> {
public AAIQueryClient() {
super(new AAIClient());
diff --git a/common/src/main/java/org/onap/so/client/graphinventory/GraphInventoryQueryClient.java b/common/src/main/java/org/onap/so/client/graphinventory/GraphInventoryQueryClient.java
index aa4842fe2a..c4bf0f0beb 100644
--- a/common/src/main/java/org/onap/so/client/graphinventory/GraphInventoryQueryClient.java
+++ b/common/src/main/java/org/onap/so/client/graphinventory/GraphInventoryQueryClient.java
@@ -25,7 +25,7 @@ import java.util.Optional;
import org.onap.so.client.aai.entities.CustomQuery;
import org.onap.so.client.graphinventory.entities.uri.GraphInventoryUri;
-public abstract class GraphInventoryQueryClient<S> {
+public abstract class GraphInventoryQueryClient<S, I> {
private Optional<String> depth = Optional.empty();
private boolean nodesOnly = false;
@@ -38,7 +38,7 @@ public abstract class GraphInventoryQueryClient<S> {
protected abstract GraphInventoryUri getQueryUri();
- public String query(Format format, CustomQuery query) {
+ public String query(Format format, I query) {
return client.createClient(setupQueryParams(getQueryUri().queryParam("format", format.toString()))).put(query, String.class);
}