diff options
author | Benjamin, Max (mb388a) <mb388a@us.att.com> | 2019-02-14 19:59:07 -0500 |
---|---|---|
committer | Benjamin, Max (mb388a) <mb388a@us.att.com> | 2019-02-14 19:59:27 -0500 |
commit | f76219ff66e53df732cfee41771baa68d9a0a74c (patch) | |
tree | 64d1fc9d8294492f319b424bf8d54d7059a76afe /common/src/main | |
parent | 1d69925fef5c972f045081db9b5e4795d96c6f84 (diff) |
query clients now set their expected object
unit test is using the wrong number of keys for aai uri
query clients now set their expected object for method
Change-Id: I622c76cee0e9d47be35a78156267bf1c22cbf404
Issue-ID: SO-1514
Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'common/src/main')
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); } |