Restrict the interface to ERElement refs #21973
This commit is contained in:
parent
4b58c94bc5
commit
edc51232a5
|
@ -2,8 +2,11 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
||||||
|
|
||||||
# Changelog for Resource Registry Schema Client
|
# 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]
|
- Switched JSON management to gcube-jackson [#19116]
|
||||||
|
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -8,7 +8,7 @@
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>org.gcube.information-system</groupId>
|
<groupId>org.gcube.information-system</groupId>
|
||||||
<artifactId>resource-registry-schema-client</artifactId>
|
<artifactId>resource-registry-schema-client</artifactId>
|
||||||
<version>4.0.0</version>
|
<version>4.1.0-SNAPSHOT</version>
|
||||||
<name>Resource Registry Schema Client</name>
|
<name>Resource Registry Schema Client</name>
|
||||||
<description>Contains Non Idempotent API to manage Schemas in Resource Registry</description>
|
<description>Contains Non Idempotent API to manage Schemas in Resource Registry</description>
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ package org.gcube.informationsystem.resourceregistry.schema;
|
||||||
|
|
||||||
import java.util.List;
|
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.ResourceRegistryException;
|
||||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.schema.SchemaException;
|
import org.gcube.informationsystem.resourceregistry.api.exceptions.schema.SchemaException;
|
||||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.schema.SchemaNotFoundException;
|
import org.gcube.informationsystem.resourceregistry.api.exceptions.schema.SchemaNotFoundException;
|
||||||
|
@ -13,13 +13,13 @@ import org.gcube.informationsystem.types.reference.Type;
|
||||||
*/
|
*/
|
||||||
public interface ResourceRegistrySchemaClient {
|
public interface ResourceRegistrySchemaClient {
|
||||||
|
|
||||||
public <E extends Element> Type create(Class<E> clz)
|
public <ERElem extends ERElement> Type create(Class<ERElem> clz)
|
||||||
throws SchemaException, ResourceRegistryException;
|
throws SchemaException, ResourceRegistryException;
|
||||||
|
|
||||||
public String create(String typeDefinitition)
|
public String create(String typeDefinitition)
|
||||||
throws SchemaException, ResourceRegistryException;
|
throws SchemaException, ResourceRegistryException;
|
||||||
|
|
||||||
public <E extends Element> List<Type> read(Class<E> clz, Boolean polymorphic)
|
public <ERElem extends ERElement> List<Type> read(Class<ERElem> clz, Boolean polymorphic)
|
||||||
throws SchemaNotFoundException, ResourceRegistryException;
|
throws SchemaNotFoundException, ResourceRegistryException;
|
||||||
|
|
||||||
public String read(String typeName, Boolean polymorphic)
|
public String read(String typeName, Boolean polymorphic)
|
||||||
|
|
|
@ -7,7 +7,7 @@ import java.util.Map;
|
||||||
|
|
||||||
import org.gcube.common.gxhttp.reference.GXConnection;
|
import org.gcube.common.gxhttp.reference.GXConnection;
|
||||||
import org.gcube.common.gxhttp.request.GXHTTPStringRequest;
|
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.ResourceRegistryException;
|
||||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.context.ContextAlreadyPresentException;
|
import org.gcube.informationsystem.resourceregistry.api.exceptions.context.ContextAlreadyPresentException;
|
||||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.context.ContextNotFoundException;
|
import org.gcube.informationsystem.resourceregistry.api.exceptions.context.ContextNotFoundException;
|
||||||
|
@ -36,7 +36,7 @@ public class ResourceRegistrySchemaClientImpl implements ResourceRegistrySchemaC
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <E extends Element> Type create(Class<E> clz)
|
public <ERElem extends ERElement> Type create(Class<ERElem> clz)
|
||||||
throws SchemaException, ResourceRegistryException {
|
throws SchemaException, ResourceRegistryException {
|
||||||
try {
|
try {
|
||||||
String typeDefinition = TypeMapper.serializeType(clz);
|
String typeDefinition = TypeMapper.serializeType(clz);
|
||||||
|
@ -78,7 +78,7 @@ public class ResourceRegistrySchemaClientImpl implements ResourceRegistrySchemaC
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <ISM extends Element> List<Type> read(Class<ISM> clz, Boolean polymorphic)
|
public <ERElem extends ERElement> List<Type> read(Class<ERElem> clz, Boolean polymorphic)
|
||||||
throws SchemaNotFoundException, ResourceRegistryException {
|
throws SchemaNotFoundException, ResourceRegistryException {
|
||||||
try {
|
try {
|
||||||
String typeName = Utility.getTypeName(clz);
|
String typeName = Utility.getTypeName(clz);
|
||||||
|
|
Loading…
Reference in New Issue