From 822925cc3c7a30c21d70ea4b3b0db3d380811d5f Mon Sep 17 00:00:00 2001 From: "Benjamin, Max" Date: Fri, 14 Jun 2019 09:42:00 -0400 Subject: use count format and limit one for exists use count format and limit one for exists Change-Id: If15ccf0a63bf6fd5e732eb150bfdbed22c5a3f1d Issue-ID: SO-2017 Signed-off-by: Benjamin, Max (mb388a) --- .../java/org/onap/so/client/graphinventory/Format.java | 3 ++- .../graphinventory/GraphInventoryResourcesClient.java | 18 +++--------------- .../graphinventory/entities/uri/GraphInventoryUri.java | 1 - 3 files changed, 5 insertions(+), 17 deletions(-) (limited to 'common/src/main/java') diff --git a/common/src/main/java/org/onap/so/client/graphinventory/Format.java b/common/src/main/java/org/onap/so/client/graphinventory/Format.java index c3cb4b9eaf..078b35aaf4 100644 --- a/common/src/main/java/org/onap/so/client/graphinventory/Format.java +++ b/common/src/main/java/org/onap/so/client/graphinventory/Format.java @@ -29,7 +29,8 @@ public enum Format { CONSOLE("console"), PATHED("pathed"), GRAPHSON("graphson"), - ID("id"); + ID("id"), + COUNT("count"); private final String name; diff --git a/common/src/main/java/org/onap/so/client/graphinventory/GraphInventoryResourcesClient.java b/common/src/main/java/org/onap/so/client/graphinventory/GraphInventoryResourcesClient.java index 2a76dab107..c7cdb2ff58 100644 --- a/common/src/main/java/org/onap/so/client/graphinventory/GraphInventoryResourcesClient.java +++ b/common/src/main/java/org/onap/so/client/graphinventory/GraphInventoryResourcesClient.java @@ -32,9 +32,7 @@ import org.onap.so.client.RestClient; import org.onap.so.client.RestProperties; import org.onap.so.client.graphinventory.entities.GraphInventoryEdgeLabel; import org.onap.so.client.graphinventory.entities.GraphInventoryResultWrapper; -import org.onap.so.client.graphinventory.entities.uri.Depth; import org.onap.so.client.graphinventory.entities.uri.GraphInventoryResourceUri; -import org.onap.so.client.graphinventory.entities.uri.GraphInventoryUri; public abstract class GraphInventoryResourcesClient { @@ -74,7 +72,9 @@ public abstract class GraphInventoryResourcesClient depth, boolean nodesOnly, GraphInventoryUri uri) { - GraphInventoryUri clone = uri.clone(); - if (depth.isPresent()) { - clone.depth(depth.get()); - } - if (nodesOnly) { - clone.nodesOnly(nodesOnly); - } - - return clone; - } - public T getRestProperties() { return client.getRestProperties(); } diff --git a/common/src/main/java/org/onap/so/client/graphinventory/entities/uri/GraphInventoryUri.java b/common/src/main/java/org/onap/so/client/graphinventory/entities/uri/GraphInventoryUri.java index d6d3e5eaa2..6b48ad44ef 100644 --- a/common/src/main/java/org/onap/so/client/graphinventory/entities/uri/GraphInventoryUri.java +++ b/common/src/main/java/org/onap/so/client/graphinventory/entities/uri/GraphInventoryUri.java @@ -22,7 +22,6 @@ package org.onap.so.client.graphinventory.entities.uri; import java.net.URI; import java.util.Map; -import org.onap.so.client.graphinventory.entities.uri.Depth; import org.onap.so.client.graphinventory.GraphInventoryObjectType; public interface GraphInventoryUri { -- cgit 1.2.3-korg