Fixed exist method name

This commit is contained in:
Luca Frosini 2022-02-09 12:16:01 +01:00
parent cef2da3f8f
commit 82f4bdeb94
2 changed files with 8 additions and 8 deletions

View File

@ -56,13 +56,13 @@ public interface ResourceRegistryPublisher {
throws SchemaViolationException, AlreadyPresentException, ResourceRegistryException;
public <ERElem extends ERElement> boolean exists(ERElem er)
public <ERElem extends ERElement> boolean exist(ERElem er)
throws AvailableInAnotherContextException, ResourceRegistryException;
public <ERElem extends ERElement> boolean exists(Class<ERElem> clazz, UUID uuid)
public <ERElem extends ERElement> boolean exist(Class<ERElem> clazz, UUID uuid)
throws AvailableInAnotherContextException, ResourceRegistryException;
public boolean exists(String type, UUID uuid)
public boolean exist(String type, UUID uuid)
throws AvailableInAnotherContextException, ResourceRegistryException;

View File

@ -340,22 +340,22 @@ public class ResourceRegistryPublisherImpl implements ResourceRegistryPublisher
}
@Override
public <ERElem extends ERElement> boolean exists(ERElem er)
public <ERElem extends ERElement> 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 <ERElem extends ERElement> boolean exists(Class<ERElem> clazz, UUID uuid)
public <ERElem extends ERElement> boolean exist(Class<ERElem> 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);