diff --git a/CHANGELOG.md b/CHANGELOG.md index 339c25d..4f69b33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,11 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm # Changelog for Resource Registry Schema Client +## [v4.1.0-SNAPSHOT] -## [v4.0.0] [r5.0.0] - +- Restrict the interface to accept ERElement classes and not all the Element classes [#21973] + +## [v4.0.0] [r5.0.0] - Switched JSON management to gcube-jackson [#19116] diff --git a/pom.xml b/pom.xml index 1b5d6b8..28a95cc 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ org.gcube.information-system resource-registry-schema-client - 4.0.0 + 4.1.0-SNAPSHOT Resource Registry Schema Client Contains Non Idempotent API to manage Schemas in Resource Registry diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/schema/ResourceRegistrySchemaClient.java b/src/main/java/org/gcube/informationsystem/resourceregistry/schema/ResourceRegistrySchemaClient.java index 8d7133e..8b634f7 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/schema/ResourceRegistrySchemaClient.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/schema/ResourceRegistrySchemaClient.java @@ -2,7 +2,7 @@ package org.gcube.informationsystem.resourceregistry.schema; import java.util.List; -import org.gcube.informationsystem.base.reference.Element; +import org.gcube.informationsystem.model.reference.ERElement; import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException; import org.gcube.informationsystem.resourceregistry.api.exceptions.schema.SchemaException; import org.gcube.informationsystem.resourceregistry.api.exceptions.schema.SchemaNotFoundException; @@ -13,13 +13,13 @@ import org.gcube.informationsystem.types.reference.Type; */ public interface ResourceRegistrySchemaClient { - public Type create(Class clz) + public Type create(Class clz) throws SchemaException, ResourceRegistryException; public String create(String typeDefinitition) throws SchemaException, ResourceRegistryException; - public List read(Class clz, Boolean polymorphic) + public List read(Class clz, Boolean polymorphic) throws SchemaNotFoundException, ResourceRegistryException; public String read(String typeName, Boolean polymorphic) diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/schema/ResourceRegistrySchemaClientImpl.java b/src/main/java/org/gcube/informationsystem/resourceregistry/schema/ResourceRegistrySchemaClientImpl.java index 3f31595..d4baf0b 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/schema/ResourceRegistrySchemaClientImpl.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/schema/ResourceRegistrySchemaClientImpl.java @@ -7,7 +7,7 @@ import java.util.Map; import org.gcube.common.gxhttp.reference.GXConnection; import org.gcube.common.gxhttp.request.GXHTTPStringRequest; -import org.gcube.informationsystem.base.reference.Element; +import org.gcube.informationsystem.model.reference.ERElement; import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException; import org.gcube.informationsystem.resourceregistry.api.exceptions.context.ContextAlreadyPresentException; import org.gcube.informationsystem.resourceregistry.api.exceptions.context.ContextNotFoundException; @@ -36,7 +36,7 @@ public class ResourceRegistrySchemaClientImpl implements ResourceRegistrySchemaC } @Override - public Type create(Class clz) + public Type create(Class clz) throws SchemaException, ResourceRegistryException { try { String typeDefinition = TypeMapper.serializeType(clz); @@ -78,7 +78,7 @@ public class ResourceRegistrySchemaClientImpl implements ResourceRegistrySchemaC @Override - public List read(Class clz, Boolean polymorphic) + public List read(Class clz, Boolean polymorphic) throws SchemaNotFoundException, ResourceRegistryException { try { String typeName = Utility.getTypeName(clz);