aboutsummaryrefslogtreecommitdiffstats
path: root/graph-inventory/aai-client/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'graph-inventory/aai-client/src/main/java')
-rw-r--r--graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/AAIDSLQueryClient.java3
-rw-r--r--graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventoryQueryClient.java7
2 files changed, 6 insertions, 4 deletions
diff --git a/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/AAIDSLQueryClient.java b/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/AAIDSLQueryClient.java
index 378db87d9b..8b8707e533 100644
--- a/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/AAIDSLQueryClient.java
+++ b/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/AAIDSLQueryClient.java
@@ -25,6 +25,7 @@ import org.onap.aaiclient.client.aai.entities.uri.AAIFluentTypeReverseLookup;
import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
import org.onap.aaiclient.client.graphinventory.GraphInventoryQueryClient;
import org.onap.aaiclient.client.graphinventory.entities.DSLQuery;
+import org.onap.aaiclient.client.graphinventory.entities.uri.Depth;
import org.onap.aaiclient.client.graphinventory.entities.uri.GraphInventoryUri;
import com.google.common.collect.ImmutableMap;
@@ -41,7 +42,7 @@ public class AAIDSLQueryClient
@Override
protected GraphInventoryUri getQueryUri() {
- return AAIUriFactory.createResourceUri(AAIObjectType.DSL);
+ return AAIUriFactory.createResourceUri(AAIObjectType.DSL).depth(Depth.ZERO);
}
diff --git a/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventoryQueryClient.java b/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventoryQueryClient.java
index a192e3828a..1438dbe51a 100644
--- a/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventoryQueryClient.java
+++ b/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventoryQueryClient.java
@@ -32,6 +32,7 @@ import org.onap.aaiclient.client.aai.entities.Results;
import org.onap.aaiclient.client.graphinventory.entities.GraphInventoryResultWrapper;
import org.onap.aaiclient.client.graphinventory.entities.Pathed;
import org.onap.aaiclient.client.graphinventory.entities.ResourceAndUrl;
+import org.onap.aaiclient.client.graphinventory.entities.uri.Depth;
import org.onap.aaiclient.client.graphinventory.entities.uri.GraphInventoryUri;
import com.fasterxml.jackson.annotation.JsonTypeInfo.Id;
import com.fasterxml.jackson.core.type.TypeReference;
@@ -39,7 +40,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
public abstract class GraphInventoryQueryClient<S, I, Wrapper extends GraphInventoryResultWrapper<?>, Type extends GraphInventoryObjectType> {
- private Optional<String> depth = Optional.empty();
+ private Optional<Depth> depth = Optional.empty();
private boolean nodesOnly = false;
private Optional<GraphInventorySubgraphType> subgraph = Optional.empty();
private GraphInventoryClient client;
@@ -108,7 +109,7 @@ public abstract class GraphInventoryQueryClient<S, I, Wrapper extends GraphInven
public abstract Type createType(String name, String uri);
- public S depth(String depth) {
+ public S depth(Depth depth) {
this.depth = Optional.of(depth);
return (S) this;
}
@@ -128,7 +129,7 @@ public abstract class GraphInventoryQueryClient<S, I, Wrapper extends GraphInven
protected GraphInventoryUri setupQueryParams(GraphInventoryUri uri) {
GraphInventoryUri clone = uri.clone();
if (this.depth.isPresent()) {
- clone.queryParam("depth", depth.get());
+ clone.queryParam("depth", depth.get().toString());
}
if (this.nodesOnly) {
clone.queryParam("nodesOnly", "");