summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/src/main/java/org/onap/so/client/aai/entities/uri/AAIResourceUri.java6
-rw-r--r--common/src/main/java/org/onap/so/client/aai/entities/uri/AAISimpleUri.java15
-rw-r--r--common/src/main/java/org/onap/so/client/aai/entities/uri/AAIUri.java10
-rw-r--r--common/src/main/java/org/onap/so/client/graphinventory/entities/uri/GraphInventoryResourceUri.java6
-rw-r--r--common/src/main/java/org/onap/so/client/graphinventory/entities/uri/GraphInventoryUri.java3
-rw-r--r--common/src/main/java/org/onap/so/client/graphinventory/entities/uri/SimpleUri.java17
6 files changed, 53 insertions, 4 deletions
diff --git a/common/src/main/java/org/onap/so/client/aai/entities/uri/AAIResourceUri.java b/common/src/main/java/org/onap/so/client/aai/entities/uri/AAIResourceUri.java
index 42fa1ad02a..8775a6a687 100644
--- a/common/src/main/java/org/onap/so/client/aai/entities/uri/AAIResourceUri.java
+++ b/common/src/main/java/org/onap/so/client/aai/entities/uri/AAIResourceUri.java
@@ -42,5 +42,11 @@ public interface AAIResourceUri extends AAIUri, GraphInventoryResourceUri {
@Override
public AAIResourceUri replaceQueryParam(String name, String... values);
@Override
+ public AAIResourceUri resultIndex(int index);
+ @Override
+ public AAIResourceUri resultSize(int size);
+ @Override
+ public AAIResourceUri limit(int size);
+ @Override
public AAIResourceUri clone();
}
diff --git a/common/src/main/java/org/onap/so/client/aai/entities/uri/AAISimpleUri.java b/common/src/main/java/org/onap/so/client/aai/entities/uri/AAISimpleUri.java
index 14671b2f85..8731ae719a 100644
--- a/common/src/main/java/org/onap/so/client/aai/entities/uri/AAISimpleUri.java
+++ b/common/src/main/java/org/onap/so/client/aai/entities/uri/AAISimpleUri.java
@@ -82,6 +82,21 @@ public class AAISimpleUri extends SimpleUri implements AAIResourceUri {
}
@Override
+ public AAISimpleUri resultIndex(int index) {
+ return (AAISimpleUri) super.resultIndex(index);
+ }
+
+ @Override
+ public AAISimpleUri resultSize(int size) {
+ return (AAISimpleUri) super.resultSize(size);
+ }
+
+ @Override
+ public AAISimpleUri limit(int size) {
+ return (AAISimpleUri) super.limit(size);
+ }
+
+ @Override
public AAISimpleUri clone() {
if (this.type != null) {
return new AAISimpleUri((AAIObjectType)this.type, this.internalURI.clone(), values);
diff --git a/common/src/main/java/org/onap/so/client/aai/entities/uri/AAIUri.java b/common/src/main/java/org/onap/so/client/aai/entities/uri/AAIUri.java
index eb336d9219..fb43cda7a4 100644
--- a/common/src/main/java/org/onap/so/client/aai/entities/uri/AAIUri.java
+++ b/common/src/main/java/org/onap/so/client/aai/entities/uri/AAIUri.java
@@ -20,11 +20,7 @@
package org.onap.so.client.aai.entities.uri;
-import java.net.URI;
-import java.util.Map;
-
import org.onap.so.client.aai.AAIObjectType;
-import org.onap.so.client.graphinventory.GraphInventoryObjectType;
import org.onap.so.client.graphinventory.entities.uri.Depth;
import org.onap.so.client.graphinventory.entities.uri.GraphInventoryUri;
@@ -53,6 +49,12 @@ public interface AAIUri extends GraphInventoryUri {
@Override
public AAIUri replaceQueryParam(String name, String... values);
@Override
+ public AAIUri resultIndex(int index);
+ @Override
+ public AAIUri resultSize(int size);
+ @Override
+ public AAIUri limit(int size);
+ @Override
public AAIUri clone();
@Override
diff --git a/common/src/main/java/org/onap/so/client/graphinventory/entities/uri/GraphInventoryResourceUri.java b/common/src/main/java/org/onap/so/client/graphinventory/entities/uri/GraphInventoryResourceUri.java
index 08e7304978..2357d07fd4 100644
--- a/common/src/main/java/org/onap/so/client/graphinventory/entities/uri/GraphInventoryResourceUri.java
+++ b/common/src/main/java/org/onap/so/client/graphinventory/entities/uri/GraphInventoryResourceUri.java
@@ -40,5 +40,11 @@ public interface GraphInventoryResourceUri extends GraphInventoryUri {
@Override
public GraphInventoryResourceUri replaceQueryParam(String name, String... values);
@Override
+ public GraphInventoryResourceUri resultIndex(int index);
+ @Override
+ public GraphInventoryResourceUri resultSize(int size);
+ @Override
+ public GraphInventoryResourceUri limit(int size);
+ @Override
public GraphInventoryResourceUri clone();
}
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 8a25c23895..42c478eff7 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
@@ -47,6 +47,9 @@ public interface GraphInventoryUri {
public GraphInventoryUri nodesOnly(boolean nodesOnly);
public GraphInventoryUri queryParam(String name, String... values);
public GraphInventoryUri replaceQueryParam(String name, String... values);
+ public GraphInventoryUri resultIndex(int index);
+ public GraphInventoryUri resultSize(int size);
+ public GraphInventoryUri limit(int size);
public GraphInventoryUri clone();
/**
diff --git a/common/src/main/java/org/onap/so/client/graphinventory/entities/uri/SimpleUri.java b/common/src/main/java/org/onap/so/client/graphinventory/entities/uri/SimpleUri.java
index 9c86ec6348..975fa318e8 100644
--- a/common/src/main/java/org/onap/so/client/graphinventory/entities/uri/SimpleUri.java
+++ b/common/src/main/java/org/onap/so/client/graphinventory/entities/uri/SimpleUri.java
@@ -120,6 +120,23 @@ public class SimpleUri implements GraphInventoryResourceUri {
}
@Override
+ public SimpleUri resultIndex(int index) {
+ this.internalURI = internalURI.replaceQueryParam("resultIndex", index);
+ return this;
+ }
+
+ @Override
+ public SimpleUri resultSize(int size) {
+ this.internalURI = internalURI.replaceQueryParam("resultSize", size);
+ return this;
+ }
+
+ @Override
+ public SimpleUri limit(int size) {
+ return this.resultIndex(0).resultSize(size);
+ }
+
+ @Override
public URI build() {
return build(this.values);
}