diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/publisher/ResourceRegistryPublisher.java b/src/main/java/org/gcube/informationsystem/resourceregistry/publisher/ResourceRegistryPublisher.java index a4d8aa7..7eda680 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/publisher/ResourceRegistryPublisher.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/publisher/ResourceRegistryPublisher.java @@ -56,13 +56,13 @@ public interface ResourceRegistryPublisher { throws SchemaViolationException, AlreadyPresentException, ResourceRegistryException; - public boolean exists(ERElem er) + public boolean exist(ERElem er) throws AvailableInAnotherContextException, ResourceRegistryException; - public boolean exists(Class clazz, UUID uuid) + public boolean exist(Class clazz, UUID uuid) throws AvailableInAnotherContextException, ResourceRegistryException; - public boolean exists(String type, UUID uuid) + public boolean exist(String type, UUID uuid) throws AvailableInAnotherContextException, ResourceRegistryException; 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 1297c62..36beb08 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/publisher/ResourceRegistryPublisherImpl.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/publisher/ResourceRegistryPublisherImpl.java @@ -340,22 +340,22 @@ public class ResourceRegistryPublisherImpl implements ResourceRegistryPublisher } @Override - public boolean exists(ERElem er) + public boolean exist(ERElem er) throws AvailableInAnotherContextException, ResourceRegistryException { String type = org.gcube.informationsystem.resourceregistry.api.utils.Utility.getTypeName(er); UUID uuid = er.getHeader().getUUID(); - return exists(type, uuid); + return exist(type, uuid); } @Override - public boolean exists(Class clazz, UUID uuid) + public boolean exist(Class clazz, UUID uuid) throws AvailableInAnotherContextException, ResourceRegistryException { String type = org.gcube.informationsystem.resourceregistry.api.utils.Utility.getTypeName(clazz); - return exists(type, uuid); + return exist(type, uuid); } @Override - public boolean exists(String type, UUID uuid) + public boolean exist(String type, UUID uuid) throws AvailableInAnotherContextException, ResourceRegistryException { try { logger.info("Going to check if {} with UUID {} exists", type, uuid);