From 9cb0a7c288ce3c4bfcf91debfe55ec62545bcdb8 Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Mon, 4 Jun 2018 13:31:13 +0000 Subject: [PATCH] Refs #11288: Made resource-registry more RESTful Task-Url: https://support.d4science.org/issues/11288 git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry-publisher@167867 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../publisher/ResourceRegistryPublisherImpl.java | 10 +++++----- .../resourceregistry/publisher/MultiContextTest.java | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) 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 b3e0d2f..2305adc 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/publisher/ResourceRegistryPublisherImpl.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/publisher/ResourceRegistryPublisherImpl.java @@ -116,7 +116,7 @@ public class ResourceRegistryPublisherImpl implements ResourceRegistryPublisher stringWriter.append(PATH_SEPARATOR); stringWriter.append(ERPath.ER_PATH_PART); stringWriter.append(PATH_SEPARATOR); - stringWriter.append(ERPath.FACET_PATH_PART); + stringWriter.append(ERPath.FACETS_PATH_PART); stringWriter.append(PATH_SEPARATOR); stringWriter.append(facetType); @@ -190,7 +190,7 @@ public class ResourceRegistryPublisherImpl implements ResourceRegistryPublisher stringWriter.append(PATH_SEPARATOR); stringWriter.append(ERPath.ER_PATH_PART); stringWriter.append(PATH_SEPARATOR); - stringWriter.append(ERPath.FACET_PATH_PART); + stringWriter.append(ERPath.FACETS_PATH_PART); stringWriter.append(PATH_SEPARATOR); stringWriter.append(uuid.toString()); @@ -223,7 +223,7 @@ public class ResourceRegistryPublisherImpl implements ResourceRegistryPublisher stringWriter.append(PATH_SEPARATOR); stringWriter.append(ERPath.ER_PATH_PART); stringWriter.append(PATH_SEPARATOR); - stringWriter.append(ERPath.FACET_PATH_PART); + stringWriter.append(ERPath.FACETS_PATH_PART); stringWriter.append(PATH_SEPARATOR); stringWriter.append(uuid.toString()); @@ -732,7 +732,7 @@ public class ResourceRegistryPublisherImpl implements ResourceRegistryPublisher stringWriter.append(PATH_SEPARATOR); stringWriter.append(ERPath.ADD_PATH_PART); stringWriter.append(PATH_SEPARATOR); - stringWriter.append(ERPath.FACET_PATH_PART); + stringWriter.append(ERPath.FACETS_PATH_PART); stringWriter.append(PATH_SEPARATOR); stringWriter.append(uuid.toString()); @@ -815,7 +815,7 @@ public class ResourceRegistryPublisherImpl implements ResourceRegistryPublisher stringWriter.append(PATH_SEPARATOR); stringWriter.append(ERPath.REMOVE_PATH_PART); stringWriter.append(PATH_SEPARATOR); - stringWriter.append(ERPath.FACET_PATH_PART); + stringWriter.append(ERPath.FACETS_PATH_PART); stringWriter.append(PATH_SEPARATOR); stringWriter.append(uuid.toString()); diff --git a/src/test/java/org/gcube/informationsystem/resourceregistry/publisher/MultiContextTest.java b/src/test/java/org/gcube/informationsystem/resourceregistry/publisher/MultiContextTest.java index 9df8281..6cf9dfb 100644 --- a/src/test/java/org/gcube/informationsystem/resourceregistry/publisher/MultiContextTest.java +++ b/src/test/java/org/gcube/informationsystem/resourceregistry/publisher/MultiContextTest.java @@ -43,10 +43,10 @@ import org.gcube.informationsystem.model.relation.IsIdentifiedBy; import org.gcube.informationsystem.model.relation.consistsof.HasPersistentMemory; import org.gcube.informationsystem.model.relation.consistsof.HasVolatileMemory; import org.gcube.informationsystem.model.relation.isrelatedto.Hosts; +import org.gcube.informationsystem.resourceregistry.api.exceptions.AvailableInAnotherContextException; +import org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException; import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException; import org.gcube.informationsystem.resourceregistry.api.exceptions.entity.resource.ResourceAvailableInAnotherContextException; -import org.gcube.informationsystem.resourceregistry.api.exceptions.er.ERAvailableInAnotherContextException; -import org.gcube.informationsystem.resourceregistry.api.exceptions.er.ERNotFoundException; import org.gcube.informationsystem.resourceregistry.client.ResourceRegistryClient; import org.gcube.informationsystem.resourceregistry.client.ResourceRegistryClientFactory; import org.junit.Assert; @@ -210,9 +210,9 @@ public class MultiContextTest extends ScopedTest { try { resourceRegistryClient.exists(EService.class, eServiceUUID); - } catch (ERNotFoundException e) { + } catch (NotFoundException e) { throw e; - } catch (ERAvailableInAnotherContextException e) { + } catch (AvailableInAnotherContextException e) { // Good } catch (ResourceRegistryException e) { throw e; @@ -221,9 +221,9 @@ public class MultiContextTest extends ScopedTest { try { resourceRegistryClient.exists(HostingNode.class, hostingNodeUUID); - } catch (ERNotFoundException e) { + } catch (NotFoundException e) { throw e; - } catch (ERAvailableInAnotherContextException e) { + } catch (AvailableInAnotherContextException e) { // Good } catch (ResourceRegistryException e) { throw e;