From e75102d4627029ae9542b900a029db546274e9d0 Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Wed, 10 May 2023 17:34:40 +0200 Subject: [PATCH] Removed unneeded query parameter management --- .../ResourceRegistryContextClientImpl.java | 23 ------------------- 1 file changed, 23 deletions(-) diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/contexts/ResourceRegistryContextClientImpl.java b/src/main/java/org/gcube/informationsystem/resourceregistry/contexts/ResourceRegistryContextClientImpl.java index 34802aa..b4a3440 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/contexts/ResourceRegistryContextClientImpl.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/contexts/ResourceRegistryContextClientImpl.java @@ -13,7 +13,6 @@ import org.gcube.common.context.ContextUtility; import org.gcube.common.gxhttp.reference.GXConnection; import org.gcube.common.gxhttp.request.GXHTTPStringRequest; import org.gcube.common.http.GXHTTPUtility; -import org.gcube.informationsystem.base.reference.IdentifiableElement; import org.gcube.informationsystem.contexts.reference.entities.Context; import org.gcube.informationsystem.model.reference.properties.Metadata; import org.gcube.informationsystem.resourceregistry.api.contexts.ContextCache; @@ -49,12 +48,6 @@ public class ResourceRegistryContextClientImpl implements ResourceRegistryContex */ protected boolean includeMeta; - /** - * Track if the client must request to include {@link Metadata} in all - * {@link IdentifiableElement} or just in the root instance - */ - protected boolean allMeta; - protected ContextCache contextCache; public boolean includeMeta() { @@ -65,17 +58,8 @@ public class ResourceRegistryContextClientImpl implements ResourceRegistryContex this.includeMeta = includeMeta; } - public boolean allMeta() { - return allMeta; - } - - public void setAllMeta(boolean allMeta) { - this.allMeta = allMeta; - } - private void addOptionalQueryParameters(Map queryParams) throws UnsupportedEncodingException { addIncludeMeta(queryParams); - addIncludeAllMeta(queryParams); } private GXHTTPStringRequest includeAdditionalQueryParameters(GXHTTPStringRequest gxHTTPStringRequest) throws UnsupportedEncodingException{ @@ -97,12 +81,6 @@ public class ResourceRegistryContextClientImpl implements ResourceRegistryContex } } - private void addIncludeAllMeta(Map queryParams) throws UnsupportedEncodingException{ - if(allMeta) { - queryParams.put(AccessPath.INCLUDE_META_IN_ALL_INSTANCES_QUERY_PARAMETER, Boolean.toString(allMeta)); - } - } - protected ContextCacheRenewal contextCacheRenewal = new ContextCacheRenewal() { @Override @@ -134,7 +112,6 @@ public class ResourceRegistryContextClientImpl implements ResourceRegistryContex this.address = address; this.headers = new HashMap<>(); this.includeMeta = false; - this.allMeta = false; if(sharedContextCache) { contextCache = ContextCache.getInstance(); }else {