diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/publisher/ResourceRegistryPublisherImpl.java b/src/main/java/org/gcube/informationsystem/resourceregistry/publisher/ResourceRegistryPublisherImpl.java index 3e0ee8b..8bbc8ec 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/publisher/ResourceRegistryPublisherImpl.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/publisher/ResourceRegistryPublisherImpl.java @@ -39,6 +39,7 @@ import org.gcube.informationsystem.resourceregistry.api.exceptions.relations.isr import org.gcube.informationsystem.resourceregistry.api.exceptions.relations.isrelatedto.IsRelatedToNotFoundException; import org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException; import org.gcube.informationsystem.resourceregistry.api.rest.AccessPath; +import org.gcube.informationsystem.resourceregistry.api.rest.ContextPath; import org.gcube.informationsystem.resourceregistry.api.rest.InstancePath; import org.gcube.informationsystem.resourceregistry.api.rest.SharingPath; import org.gcube.informationsystem.resourceregistry.api.rest.SharingPath.SharingOperation; @@ -72,7 +73,7 @@ public class ResourceRegistryPublisherImpl implements ResourceRegistryPublisher if (queryParams == null) { queryParams = new HashMap<>(); } - queryParams.put(AccessPath.HIERARCHICAL_MODE_PARAM, Boolean.toString(true)); + queryParams.put(AccessPath.HIERARCHICAL_MODE_QUERY_PARAMETER, Boolean.toString(true)); } return gxHTTPStringRequest.queryParams(queryParams); } @@ -83,7 +84,7 @@ public class ResourceRegistryPublisherImpl implements ResourceRegistryPublisher if (queryParams == null) { queryParams = new HashMap<>(); } - queryParams.put(AccessPath.INCLUDE_CONTEXTS_IN_HEADER_PARAM, Boolean.toString(true)); + queryParams.put(AccessPath.INCLUDE_CONTEXTS_IN_HEADER_QUERY_PARAMETER, Boolean.toString(true)); } return gxHTTPStringRequest.queryParams(queryParams); } @@ -192,7 +193,7 @@ public class ResourceRegistryPublisherImpl implements ResourceRegistryPublisher UUID uuid = contextCache.getUUIDByFullName(contextFullName); Context context = null; if (uuid == null) { - context = getContextFromServer(AccessPath.CURRENT_CONTEXT); + context = getContextFromServer(ContextPath.CURRENT_CONTEXT_PATH_PART); contextCache.cleanCache(); contextCache.refreshContextsIfNeeded(); Context c = contextCache.getContextByUUID(context.getHeader().getUUID()); @@ -237,7 +238,7 @@ public class ResourceRegistryPublisherImpl implements ResourceRegistryPublisher gxHTTPStringRequest.path(type); Map parameters = new HashMap<>(); - parameters.put(InstancePath.POLYMORPHIC_PARAM, polymorphic.toString()); + parameters.put(InstancePath.POLYMORPHIC_QUERY_PARAMETER, polymorphic.toString()); includeAdditionalQueryParameters(gxHTTPStringRequest, parameters); HttpURLConnection httpURLConnection = gxHTTPStringRequest.get(); @@ -781,7 +782,7 @@ public class ResourceRegistryPublisherImpl implements ResourceRegistryPublisher Map queryParams = new HashMap<>(); queryParams.put(SharingPath.OPERATION_QUERY_PARAMETER, SharingOperation.ADD.name()); - queryParams.put(SharingPath.DRY_RUN_QUERY_PARAMETER, dryRun.toString()); + queryParams.put(SharingPath.DRY_RUN_QUERY_QUERY_PARAMETER, dryRun.toString()); Boolean forceAddToContext = getCurrentContextUUID().compareTo(contextUUID)==0; queryParams.put(SharingPath.FORCE_ADD_TO_CONTEXT_QUERY_PARAMETER, forceAddToContext.toString()); @@ -851,7 +852,7 @@ public class ResourceRegistryPublisherImpl implements ResourceRegistryPublisher Map queryParams = new HashMap<>(); queryParams.put(SharingPath.OPERATION_QUERY_PARAMETER, SharingOperation.REMOVE.name()); - queryParams.put(SharingPath.DRY_RUN_QUERY_PARAMETER, dryRun.toString()); + queryParams.put(SharingPath.DRY_RUN_QUERY_QUERY_PARAMETER, dryRun.toString()); includeAdditionalQueryParameters(gxHTTPStringRequest, queryParams);