Class ResourceRegistryPublisherImpl
- java.lang.Object
-
- org.gcube.informationsystem.resourceregistry.api.request.BaseRequestInfo
-
- org.gcube.informationsystem.resourceregistry.publisher.ResourceRegistryPublisherImpl
-
- All Implemented Interfaces:
org.gcube.informationsystem.resourceregistry.api.request.RequestInfo,ResourceRegistryPublisher
public class ResourceRegistryPublisherImpl extends org.gcube.informationsystem.resourceregistry.api.request.BaseRequestInfo implements ResourceRegistryPublisher
Implementation of the ResourceRegistryPublisher interface. Provides concrete implementation for all Resource Registry operations including CRUD operations for Resources, Facets, and Relations, as well as context management functionality.- Author:
- Luca Frosini (ISTI - CNR)
-
-
Field Summary
Fields Modifier and Type Field Description protected StringaddressThe base address of the Resource Registry serviceprotected org.gcube.informationsystem.resourceregistry.api.contexts.ContextCachecontextCacheCache for context information to improve performanceprotected org.gcube.informationsystem.resourceregistry.api.contexts.ContextCacheRenewalcontextCacheRenewalContext cache renewal strategy for refreshing cached context informationprotected Map<String,String>headersHTTP headers to be included in requests
-
Constructor Summary
Constructors Constructor Description ResourceRegistryPublisherImpl(String address)Creates a new ResourceRegistryPublisherImpl instance with a shared context cache.ResourceRegistryPublisherImpl(String address, boolean sharedContextCache)Creates a new ResourceRegistryPublisherImpl instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description <F extends org.gcube.informationsystem.model.reference.entities.Facet>
List<org.gcube.informationsystem.model.reference.ERElement>addFacetToContext(F facet, UUID contextUUID, Boolean dryRun)Adds a Facet instance to a specific context using a provided Facet object.List<org.gcube.informationsystem.model.reference.ERElement>addFacetToContext(String facetType, UUID facetUUID, UUID contextUUID, Boolean dryRun)Adds a Facet instance to a specific context using type name and UUID.<F extends org.gcube.informationsystem.model.reference.entities.Facet>
List<org.gcube.informationsystem.model.reference.ERElement>addFacetToCurrentContext(F facet, Boolean dryRun)Adds a Facet instance to the current context using a provided Facet object.List<org.gcube.informationsystem.model.reference.ERElement>addFacetToCurrentContext(String facetType, UUID facetUUID, Boolean dryRun)Adds a Facet instance to the current context using type name and UUID.voidaddHeader(String name, boolean value)Adds a custom HTTP header to be included in requests.voidaddHeader(String name, String value)Adds a custom HTTP header to be included in requests.List<org.gcube.informationsystem.model.reference.ERElement>addResourceToContext(String resourceType, UUID resourceUUID, UUID contextUUID, Boolean dryRun)Adds a Resource instance to a specific context.<R extends org.gcube.informationsystem.model.reference.entities.Resource>
List<org.gcube.informationsystem.model.reference.ERElement>addResourceToContext(R resource, UUID contextUUID, Boolean dryRun)Adds a Resource instance to a specific context using a provided Resource object.List<org.gcube.informationsystem.model.reference.ERElement>addResourceToCurrentContext(String resourceType, UUID resourceUUID, Boolean dryRun)Adds a Resource instance to the current context.<R extends org.gcube.informationsystem.model.reference.entities.Resource>
List<org.gcube.informationsystem.model.reference.ERElement>addResourceToCurrentContext(R resource, Boolean dryRun)Adds a Resource instance to the current context using a provided Resource object.List<org.gcube.informationsystem.model.reference.ERElement>addToContext(String type, UUID instanceUUID, UUID contextUUID, Boolean dryRun)Adds an Information System element instance to a specific context.List<org.gcube.informationsystem.model.reference.ERElement>addToContext(String type, UUID instanceUUID, UUID contextUUID, org.gcube.informationsystem.resourceregistry.api.rest.PropagationMode propagationMode, Boolean dryRun)Adds an instance to a specific context, exposing propagation-mode control.List<org.gcube.informationsystem.model.reference.ERElement>addToContext(String type, UUID instanceUUID, UUID contextUUID, org.gcube.informationsystem.resourceregistry.api.rest.PropagationMode propagationMode, Boolean hierarchical, Boolean bypassHierarchyCheck, Boolean dryRun)Adds an instance to a specific context through the canonical Add to Context endpoint, exposing every parameter of the operation.List<org.gcube.informationsystem.model.reference.ERElement>addToContext(org.gcube.informationsystem.model.reference.ERElement er, UUID contextUUID, Boolean dryRun)Adds an Information System element instance to a specific context using a provided instance object.List<org.gcube.informationsystem.model.reference.ERElement>addToContext(org.gcube.informationsystem.model.reference.ERElement er, UUID contextUUID, org.gcube.informationsystem.resourceregistry.api.rest.PropagationMode propagationMode, Boolean dryRun)Adds an instance to a specific context using a provided instance object, exposing propagation-mode control.List<org.gcube.informationsystem.model.reference.ERElement>addToCurrentContext(String type, UUID instanceUUID, Boolean dryRun)Adds an Information System element instance to the current context.List<org.gcube.informationsystem.model.reference.ERElement>addToCurrentContext(String type, UUID instanceUUID, org.gcube.informationsystem.resourceregistry.api.rest.PropagationMode propagationMode, Boolean dryRun)Adds an instance to the current context, exposing propagation-mode control.List<org.gcube.informationsystem.model.reference.ERElement>addToCurrentContext(org.gcube.informationsystem.model.reference.ERElement er, Boolean dryRun)Adds an Information System element instance to the current context using a provided instance object.List<org.gcube.informationsystem.model.reference.ERElement>addToCurrentContext(org.gcube.informationsystem.model.reference.ERElement er, org.gcube.informationsystem.resourceregistry.api.rest.PropagationMode propagationMode, Boolean dryRun)Adds an instance to the current context using a provided instance object, exposing propagation-mode control.<ERElem extends org.gcube.informationsystem.model.reference.ERElement>
ERElemcreate(ERElem er)Creates a new instance of an Information System element in the Resource Registry, usingCreatePolicy.IDEMPOTENT: every missingid, oferand of the nested instances it creates, is generated and set oner.<ERElem extends org.gcube.informationsystem.model.reference.ERElement>
ERElemcreate(ERElem er, CreatePolicy createPolicy)Creates a new instance of an Information System element in the Resource Registry.Stringcreate(String json)Creates a new instance of an Information System element from JSON representation, usingCreatePolicy.IDEMPOTENT.protected Stringcreate(String type, String json, UUID uuid)Creates a new instance of the specified type in the Resource Registry.Stringcreate(String type, String json, CreatePolicy createPolicy)Creates a new instance of the given type from JSON representation.<C extends org.gcube.informationsystem.model.reference.relations.ConsistsOf<? extends org.gcube.informationsystem.model.reference.entities.Resource,? extends org.gcube.informationsystem.model.reference.entities.Facet>>
CcreateConsistsOf(C consistsOf)Creates a new ConsistsOf relation instance in the Resource Registry.StringcreateConsistsOf(String consistsOf)Creates a new ConsistsOf relation instance from JSON representation.<F extends org.gcube.informationsystem.model.reference.entities.Facet>
FcreateFacet(F facet)Creates a new Facet instance in the Resource Registry.StringcreateFacet(String facet)Creates a new Facet instance from JSON representation.<I extends org.gcube.informationsystem.model.reference.relations.IsRelatedTo<? extends org.gcube.informationsystem.model.reference.entities.Resource,? extends org.gcube.informationsystem.model.reference.entities.Resource>>
IcreateIsRelatedTo(I isRelatedTo)Creates a new IsRelatedTo relation instance in the Resource Registry.StringcreateIsRelatedTo(String isRelatedTo)Creates a new IsRelatedTo relation instance from JSON representation.StringcreateResource(String resource)Creates a new Resource instance from JSON representation.<R extends org.gcube.informationsystem.model.reference.entities.Resource>
RcreateResource(R resource)Creates a new Resource instance in the Resource Registry.<ERElem extends org.gcube.informationsystem.model.reference.ERElement>
booleandelete(ERElem er)Deletes an Information System element instance from the Resource Registry.booleandelete(String type, UUID uuid)Deletes an Information System element instance from the Resource Registry using type name and UUID.List<org.gcube.informationsystem.model.reference.ERElement>delete(String type, UUID uuid, org.gcube.informationsystem.resourceregistry.api.rest.PropagationMode propagationMode, Boolean dryRun)Removes an instance from the current context, exposing propagation and dry-run control.List<org.gcube.informationsystem.model.reference.ERElement>delete(org.gcube.informationsystem.model.reference.ERElement er, org.gcube.informationsystem.resourceregistry.api.rest.PropagationMode propagationMode, Boolean dryRun)Removes an instance from the current context, using a provided instance object and exposing propagation and dry-run control.<C extends org.gcube.informationsystem.model.reference.relations.ConsistsOf<? extends org.gcube.informationsystem.model.reference.entities.Resource,? extends org.gcube.informationsystem.model.reference.entities.Facet>>
booleandeleteConsistsOf(C consistsOf)Deletes a ConsistsOf relation instance from the Resource Registry.booleandeleteConsistsOf(String consistsOfType, UUID uuid)Deletes a ConsistsOf relation instance from the Resource Registry using type name and UUID.<F extends org.gcube.informationsystem.model.reference.entities.Facet>
booleandeleteFacet(F facet)Deletes a Facet instance from the Resource Registry.booleandeleteFacet(String facetType, UUID uuid)Deletes a Facet instance from the Resource Registry using type name and UUID.<I extends org.gcube.informationsystem.model.reference.relations.IsRelatedTo<? extends org.gcube.informationsystem.model.reference.entities.Resource,? extends org.gcube.informationsystem.model.reference.entities.Resource>>
booleandeleteIsRelatedTo(I isRelatedTo)Deletes an IsRelatedTo relation instance from the Resource Registry.booleandeleteIsRelatedTo(String isRelatedToType, UUID uuid)Deletes an IsRelatedTo relation instance from the Resource Registry by its type and UUID.booleandeleteResource(String resourceType, UUID uuid)Deletes a Resource instance from the Resource Registry using type name and UUID.<R extends org.gcube.informationsystem.model.reference.entities.Resource>
booleandeleteResource(R resource)Deletes a Resource instance from the Resource Registry.<ERElem extends org.gcube.informationsystem.model.reference.ERElement>
booleanexist(ERElem er)Checks if an Information System element instance exists in the Resource Registry.<ERElem extends org.gcube.informationsystem.model.reference.ERElement>
booleanexist(Class<ERElem> clazz, UUID uuid)Checks if an Information System element instance exists in the Resource Registry using class and UUID.booleanexist(String type, UUID uuid)Checks if an Information System element instance exists in the Resource Registry using type name and UUID.List<org.gcube.informationsystem.contexts.reference.entities.Context>getAllContextFromServer()It reads all the contexts from server.protected List<org.gcube.informationsystem.contexts.reference.entities.Context>getAllContextFromServer(boolean includeMeta, Integer offset, Integer limit)Retrieves all contexts from the Resource Registry server.List<org.gcube.informationsystem.contexts.reference.entities.Context>getAllContexts()Retrieves all available contexts using internal cache.org.gcube.informationsystem.contexts.reference.entities.ContextgetContext(UUID uuid)Retrieves a specific context by its UUID using internal cache.org.gcube.informationsystem.resourceregistry.api.contexts.ContextCachegetContextCache()Gets the context cache used for context-related operations.protected org.gcube.informationsystem.contexts.reference.entities.ContextgetContextFromServer(String uuid)Retrieves a specific context from the Resource Registry server.org.gcube.informationsystem.contexts.reference.entities.ContextgetContextFromServer(UUID uuid)It reads the context from server.org.gcube.informationsystem.contexts.reference.entities.ContextgetCurrentContext()Retrieves the current context associated with the publisher's authorization token using internal cache.<ERElem extends org.gcube.informationsystem.model.reference.ERElement>
Map<UUID,String>getElementContexts(ERElem er)Retrieves the list of contexts where a specific Information System element is present in the Resource Registry.Map<UUID,String>getElementContexts(String type, UUID instanceUUID)Retrieves the list of contexts where a specific Information System element is present in the Resource Registry.<F extends org.gcube.informationsystem.model.reference.entities.Facet>
Map<UUID,String>getFacetContexts(F facet)Retrieves the list of contexts where a specific Facet is present in the Resource Registry.Map<UUID,String>getFacetContexts(String facetType, UUID facetUUID)Retrieves the list of contexts where a specific Facet is present in the Resource Registry.protected org.gcube.common.gxhttp.request.GXRequestgetGXRequest()Creates and configures a new HTTP request with authorization headers and custom headers.Map<UUID,String>getResourceContexts(String resourceType, UUID resourceUUID)Retrieves the list of contexts where a specific Resource is present in the Resource Registry.<R extends org.gcube.informationsystem.model.reference.entities.Resource>
Map<UUID,String>getResourceContexts(R resource)Retrieves the list of contexts where a specific Resource is present in the Resource Registry.booleanisHierarchicalMode()<ERElem extends org.gcube.informationsystem.model.reference.ERElement>
List<ERElem>list(Class<ERElem> clazz, Boolean polymorphic)Retrieves all instances of the specified type from the Resource Registry.Stringlist(String type, Boolean polymorphic)Retrieves all instances of the specified type from the Resource Registry as JSON string.<ERElem extends org.gcube.informationsystem.model.reference.ERElement>
ERElemmergeUpdate(ERElem er)Applies a partial (merge-patch) update to an existing instance, using the type and JSON embedded iner.StringmergeUpdate(String json)Applies a partial (merge-patch) update to an existing instance, using its JSON representation.StringmergeUpdate(String type, String json)Applies a partial (merge-patch) update to an existing instance, using an explicit type name and its JSON representation.StringmergeUpdate(String type, String json, UUID uuid)Applies a partial (merge-patch) update to an existing instance, using an explicit type name, JSON representation, and UUID.Stringquery(String jsonQuery, Boolean polymorphic)Executes a JSON structural query against the instances collection.<ERElem extends org.gcube.informationsystem.model.reference.ERElement>
ERElemread(ERElem er)Reads an existing instance from the Resource Registry using a provided instance object.<ERElem extends org.gcube.informationsystem.model.reference.ERElement>
ERElemread(Class<ERElem> clazz, UUID uuid)Reads an existing instance from the Resource Registry by its type class and UUID.Stringread(String type, UUID uuid)Reads an existing instance from the Resource Registry by its type name and UUID.<C extends org.gcube.informationsystem.model.reference.relations.ConsistsOf<? extends org.gcube.informationsystem.model.reference.entities.Resource,? extends org.gcube.informationsystem.model.reference.entities.Facet>>
CreadConsistsOf(C consistsOf)Reads a ConsistsOf relation instance from the Resource Registry using a provided instance object.StringreadConsistsOf(String consistsOfType, UUID uuid)Reads a ConsistsOf relation instance from the Resource Registry by its type and UUID.<F extends org.gcube.informationsystem.model.reference.entities.Facet>
FreadFacet(F facet)Reads a Facet instance from the Resource Registry using a provided instance object.StringreadFacet(String facetType, UUID uuid)Reads a Facet instance from the Resource Registry by its type and UUID.<I extends org.gcube.informationsystem.model.reference.relations.IsRelatedTo<? extends org.gcube.informationsystem.model.reference.entities.Resource,? extends org.gcube.informationsystem.model.reference.entities.Resource>>
IreadIsRelatedTo(I isRelatedTo)Reads an IsRelatedTo relation instance from the Resource Registry by its UUID.StringreadIsRelatedTo(String isRelatedToType, UUID uuid)Reads an IsRelatedTo relation instance from the Resource Registry by its type and UUID.StringreadResource(String resourceType, UUID uuid)Reads a Resource instance from the Resource Registry by its type and UUID.<R extends org.gcube.informationsystem.model.reference.entities.Resource>
RreadResource(R resource)Reads a Resource instance from the Resource Registry using a provided instance object.<F extends org.gcube.informationsystem.model.reference.entities.Facet>
List<org.gcube.informationsystem.model.reference.ERElement>removeFacetFromContext(F facet, Boolean dryRun)Removes a Facet instance from the caller's current context, using a provided Facet object.<F extends org.gcube.informationsystem.model.reference.entities.Facet>
List<org.gcube.informationsystem.model.reference.ERElement>removeFacetFromContext(F facet, UUID contextUUID, Boolean dryRun)Deprecated.List<org.gcube.informationsystem.model.reference.ERElement>removeFacetFromContext(String facetType, UUID facetUUID, Boolean dryRun)Removes a Facet instance from the caller's current context.List<org.gcube.informationsystem.model.reference.ERElement>removeFacetFromContext(String facetType, UUID facetUUID, UUID contextUUID, Boolean dryRun)Deprecated.<F extends org.gcube.informationsystem.model.reference.entities.Facet>
List<org.gcube.informationsystem.model.reference.ERElement>removeFacetFromCurrentContext(F facet, Boolean dryRun)Alias ofResourceRegistryPublisher.removeFacetFromContext(Facet, Boolean)— removal already targets the caller's current context; kept for naming symmetry withaddFacetToCurrentContext.List<org.gcube.informationsystem.model.reference.ERElement>removeFacetFromCurrentContext(String facetType, UUID facetUUID, Boolean dryRun)Alias ofResourceRegistryPublisher.removeFacetFromContext(String, UUID, Boolean)— removal already targets the caller's current context; kept for naming symmetry withaddFacetToCurrentContext.List<org.gcube.informationsystem.model.reference.ERElement>removeFromContext(String type, UUID instanceUUID, Boolean dryRun)Removes an Information System element instance from the caller's current context.List<org.gcube.informationsystem.model.reference.ERElement>removeFromContext(String type, UUID instanceUUID, UUID contextUUID, Boolean dryRun)Deprecated.List<org.gcube.informationsystem.model.reference.ERElement>removeFromContext(String type, UUID instanceUUID, org.gcube.informationsystem.resourceregistry.api.rest.PropagationMode propagationMode, Boolean dryRun)Removes an Information System element instance from the caller's current context, controlling how the removal propagates to related elements.List<org.gcube.informationsystem.model.reference.ERElement>removeFromContext(org.gcube.informationsystem.model.reference.ERElement er, Boolean dryRun)Removes an Information System element instance from the caller's current context, using a provided instance object.List<org.gcube.informationsystem.model.reference.ERElement>removeFromContext(org.gcube.informationsystem.model.reference.ERElement er, UUID contextUUID, Boolean dryRun)Deprecated.List<org.gcube.informationsystem.model.reference.ERElement>removeFromContext(org.gcube.informationsystem.model.reference.ERElement er, org.gcube.informationsystem.resourceregistry.api.rest.PropagationMode propagationMode, Boolean dryRun)Removes an Information System element instance from the caller's current context, using a provided instance object and controlling how the removal propagates to related elements.List<org.gcube.informationsystem.model.reference.ERElement>removeFromCurrentContext(String type, UUID instanceUUID, Boolean dryRun)Alias ofResourceRegistryPublisher.removeFromContext(String, UUID, Boolean)— removal already targets the caller's current context; kept for naming symmetry withResourceRegistryPublisher.addToCurrentContext(String, UUID, Boolean).List<org.gcube.informationsystem.model.reference.ERElement>removeFromCurrentContext(String type, UUID instanceUUID, org.gcube.informationsystem.resourceregistry.api.rest.PropagationMode propagationMode, Boolean dryRun)Alias ofResourceRegistryPublisher.removeFromContext(String, UUID, PropagationMode, Boolean)— removal already targets the caller's current context; kept for naming symmetry with theaddToCurrentContextfamily.List<org.gcube.informationsystem.model.reference.ERElement>removeFromCurrentContext(org.gcube.informationsystem.model.reference.ERElement er, Boolean dryRun)Alias ofResourceRegistryPublisher.removeFromContext(ERElement, Boolean)— removal already targets the caller's current context; kept for naming symmetry with theaddToCurrentContextfamily.List<org.gcube.informationsystem.model.reference.ERElement>removeFromCurrentContext(org.gcube.informationsystem.model.reference.ERElement er, org.gcube.informationsystem.resourceregistry.api.rest.PropagationMode propagationMode, Boolean dryRun)Alias ofResourceRegistryPublisher.removeFromContext(ERElement, PropagationMode, Boolean)— removal already targets the caller's current context; kept for naming symmetry with theaddToCurrentContextfamily.List<org.gcube.informationsystem.model.reference.ERElement>removeResourceFromContext(String resourceType, UUID resourceUUID, Boolean dryRun)Removes a Resource instance from the caller's current context.List<org.gcube.informationsystem.model.reference.ERElement>removeResourceFromContext(String resourceType, UUID resourceUUID, UUID contextUUID, Boolean dryRun)Deprecated.<R extends org.gcube.informationsystem.model.reference.entities.Resource>
List<org.gcube.informationsystem.model.reference.ERElement>removeResourceFromContext(R resource, Boolean dryRun)Removes a Resource instance from the caller's current context, using a provided Resource object.<R extends org.gcube.informationsystem.model.reference.entities.Resource>
List<org.gcube.informationsystem.model.reference.ERElement>removeResourceFromContext(R resource, UUID contextUUID, Boolean dryRun)Deprecated.List<org.gcube.informationsystem.model.reference.ERElement>removeResourceFromCurrentContext(String resourceType, UUID resourceUUID, Boolean dryRun)Alias ofResourceRegistryPublisher.removeResourceFromContext(String, UUID, Boolean)— removal already targets the caller's current context; kept for naming symmetry withaddResourceToCurrentContext.<R extends org.gcube.informationsystem.model.reference.entities.Resource>
List<org.gcube.informationsystem.model.reference.ERElement>removeResourceFromCurrentContext(R resource, Boolean dryRun)Alias ofResourceRegistryPublisher.removeResourceFromContext(Resource, Boolean)— removal already targets the caller's current context; kept for naming symmetry withaddResourceToCurrentContext.voidsetHierarchicalMode(boolean hierarchicalMode)<ERElem extends org.gcube.informationsystem.model.reference.ERElement>
ERElemupdate(ERElem er)Updates an existing instance in the Resource Registry using the instance object.Stringupdate(String json)Updates an existing instance in the Resource Registry using JSON representation.Stringupdate(String type, String json)Updates an existing instance in the Resource Registry using type name and JSON representation.Stringupdate(String type, String json, UUID uuid)Updates an existing instance in the Resource Registry using type name, JSON representation, and explicit UUID.<C extends org.gcube.informationsystem.model.reference.relations.ConsistsOf<? extends org.gcube.informationsystem.model.reference.entities.Resource,? extends org.gcube.informationsystem.model.reference.entities.Facet>>
CupdateConsistsOf(C consistsOf)Updates an existing ConsistsOf relation instance in the Resource Registry.StringupdateConsistsOf(String consistsOf)Updates an existing ConsistsOf relation instance in the Resource Registry using JSON representation.<F extends org.gcube.informationsystem.model.reference.entities.Facet>
FupdateFacet(F facet)Updates an existing Facet instance in the Resource Registry.StringupdateFacet(String facet)Updates an existing Facet instance in the Resource Registry using JSON representation.<I extends org.gcube.informationsystem.model.reference.relations.IsRelatedTo<? extends org.gcube.informationsystem.model.reference.entities.Resource,? extends org.gcube.informationsystem.model.reference.entities.Resource>>
IupdateIsRelatedTo(I isRelatedTo)Updates an existing IsRelatedTo relation instance in the Resource Registry.StringupdateIsRelatedTo(String isRelatedTo)Updates an existing IsRelatedTo relation instance from JSON representation.StringupdateResource(String resource)Updates an existing Resource instance in the Resource Registry using JSON representation.<R extends org.gcube.informationsystem.model.reference.entities.Resource>
RupdateResource(R resource)Updates an existing Resource instance in the Resource Registry.-
Methods inherited from class org.gcube.informationsystem.resourceregistry.api.request.BaseRequestInfo
allMeta, getContextsPolicy, getLimit, getMembershipScope, getOffset, includeMeta, setAllMeta, setContextsPolicy, setIncludeMeta, setLimit, setMembershipScope, setOffset
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.gcube.informationsystem.resourceregistry.api.request.RequestInfo
allMeta, getContextsPolicy, getLimit, getMembershipScope, getOffset, includeMeta, serverResponses, setAllMeta, setContextsPolicy, setIncludeMeta, setLimit, setMembershipScope, setOffset
-
Methods inherited from interface org.gcube.informationsystem.resourceregistry.publisher.ResourceRegistryPublisher
getInstanceContexts, getInstances, getInstances, jsonQuery
-
-
-
-
Field Detail
-
address
protected final String address
The base address of the Resource Registry service
-
contextCache
protected org.gcube.informationsystem.resourceregistry.api.contexts.ContextCache contextCache
Cache for context information to improve performance
-
contextCacheRenewal
protected org.gcube.informationsystem.resourceregistry.api.contexts.ContextCacheRenewal contextCacheRenewal
Context cache renewal strategy for refreshing cached context information
-
-
Constructor Detail
-
ResourceRegistryPublisherImpl
public ResourceRegistryPublisherImpl(String address)
Creates a new ResourceRegistryPublisherImpl instance with a shared context cache.- Parameters:
address- The base address of the Resource Registry service
-
ResourceRegistryPublisherImpl
public ResourceRegistryPublisherImpl(String address, boolean sharedContextCache)
Creates a new ResourceRegistryPublisherImpl instance.- Parameters:
address- The base address of the Resource Registry servicesharedContextCache- Whether to use a shared context cache instance or create a new one
-
-
Method Detail
-
isHierarchicalMode
public boolean isHierarchicalMode()
- Specified by:
isHierarchicalModein interfaceorg.gcube.informationsystem.resourceregistry.api.request.RequestInfo- Overrides:
isHierarchicalModein classorg.gcube.informationsystem.resourceregistry.api.request.BaseRequestInfo
-
setHierarchicalMode
public void setHierarchicalMode(boolean hierarchicalMode)
- Specified by:
setHierarchicalModein interfaceorg.gcube.informationsystem.resourceregistry.api.request.RequestInfo- Overrides:
setHierarchicalModein classorg.gcube.informationsystem.resourceregistry.api.request.BaseRequestInfo
-
addHeader
public void addHeader(String name, String value)
Adds a custom HTTP header to be included in requests.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
addHeaderin interfaceResourceRegistryPublisher- Parameters:
name- Header namevalue- Header value
-
addHeader
public void addHeader(String name, boolean value)
Adds a custom HTTP header to be included in requests.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
addHeaderin interfaceResourceRegistryPublisher- Parameters:
name- Header namevalue- boolean value
-
getGXRequest
protected org.gcube.common.gxhttp.request.GXRequest getGXRequest()
Creates and configures a new HTTP request with authorization headers and custom headers.- Returns:
- A configured GXRequest instance ready for use
-
getAllContextFromServer
public List<org.gcube.informationsystem.contexts.reference.entities.Context> getAllContextFromServer() throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
It reads all the contexts from server. The cache used for contexts is bypassed and not updated.- Returns:
- All Contexts read from server
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- if there is an error communicating with the server
-
getAllContextFromServer
protected List<org.gcube.informationsystem.contexts.reference.entities.Context> getAllContextFromServer(boolean includeMeta, Integer offset, Integer limit) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Retrieves all contexts from the Resource Registry server.- Parameters:
includeMeta- Whether to include metadata in the responseoffset- The offset for paginationlimit- The limit for pagination- Returns:
- List of all contexts from the server
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the operation
-
getAllContexts
public List<org.gcube.informationsystem.contexts.reference.entities.Context> getAllContexts() throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Retrieves all available contexts using internal cache.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
getAllContextsin interfaceResourceRegistryPublisher- Returns:
- List of all contexts accessible to the current user (from cache)
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If fails to retrieve contexts from cache or server
-
getContextCache
public org.gcube.informationsystem.resourceregistry.api.contexts.ContextCache getContextCache()
Gets the context cache used for context-related operations.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
getContextCachein interfaceResourceRegistryPublisher- Returns:
- The context cache instance
-
getContextFromServer
public org.gcube.informationsystem.contexts.reference.entities.Context getContextFromServer(UUID uuid) throws org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
It reads the context from server. The cache used for contexts is bypassed and not updated.- Parameters:
uuid- the UUID of the context to read- Returns:
- the Contexts read from server
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- if the context is not foundorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- if there is an error communicating with the server
-
getContextFromServer
protected org.gcube.informationsystem.contexts.reference.entities.Context getContextFromServer(String uuid) throws org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Retrieves a specific context from the Resource Registry server.- Parameters:
uuid- The UUID of the context to retrieve- Returns:
- The context with the specified UUID
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- If the context with the specified UUID is not foundorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the operation
-
getContext
public org.gcube.informationsystem.contexts.reference.entities.Context getContext(UUID uuid) throws org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Retrieves a specific context by its UUID using internal cache.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
getContextin interfaceResourceRegistryPublisher- Parameters:
uuid- The UUID of the context to retrieve- Returns:
- The context with the specified UUID (from cache)
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- If the context is not found or not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during context retrieval
-
getCurrentContext
public org.gcube.informationsystem.contexts.reference.entities.Context getCurrentContext() throws org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionRetrieves the current context associated with the publisher's authorization token using internal cache.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
getCurrentContextin interfaceResourceRegistryPublisher- Returns:
- The current context associated with the authorization token (from cache)
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- If the current context cannot be determined or accessedorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during context retrieval
-
list
public <ERElem extends org.gcube.informationsystem.model.reference.ERElement> List<ERElem> list(Class<ERElem> clazz, Boolean polymorphic) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Retrieves all instances of the specified type from the Resource Registry.Invocation-specific options and immutable response metadata are available through
Implementation Details: Type Resolution:RequestInfo.serverResponses().- Uses
TypeUtility.getTypeName(Class)to derive the type name from the class - Delegates to
list(String, Boolean)for the actual REST API call - Unmarshals the JSON response back to typed objects using
ElementMapper.unmarshalList(String).
- Builds request to
GET /instances/{type-name}endpoint - Automatically includes offset and limit parameters from base configuration
- Sets polymorphic query parameter based on the provided boolean value
- Uses application/json content type for the response.
- Receives JSON array from server
- Unmarshals JSON to List of typed objects using
ElementMapper - Returns strongly-typed list for type-safe usage.
ResourceRegistryExceptions propagated directly from server- JSON marshalling/unmarshalling errors are wrapped in
RuntimeException;.
- Specified by:
listin interfaceResourceRegistryPublisher- Type Parameters:
ERElem- The specific type of Information System element to retrieve- Parameters:
clazz- The class representing the type of instances to retrievepolymorphic- Whether to include instances of subtypes (true) or only exact type instances (false)- Returns:
- List of instances of the specified type accessible in the current context
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during instance retrieval or if the type is invalid
- Uses
-
list
public String list(String type, Boolean polymorphic) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Retrieves all instances of the specified type from the Resource Registry as JSON string.Invocation-specific options and immutable response metadata are available through
Implementation Details: REST API Call:RequestInfo.serverResponses().- Makes HTTP GET request to
/instances/{type-name}endpoint - Sets Accept header to application/json for JSON response
- Includes type name as path parameter.
- Automatically includes offset and limit from base configuration (if set)
- Adds polymorphic parameter based on the provided boolean value
- Additional query parameters from base class configuration are included.
- Returns raw JSON string response from server
- Response contains JSON array of instances matching the criteria
- Server filters results based on current context and user authorization.
- Uses
GXRequestfor HTTP communication - Includes authorization headers automatically via base request configuration
- Response processed via
HTTPUtility.getResponse(Class, GXResponse)for proper error handling.
ResourceRegistryExceptions propagated directly from server- Other exceptions wrapped in
RuntimeException - HTTP errors converted to appropriate Resource Registry exceptions.
- Specified by:
listin interfaceResourceRegistryPublisher- Parameters:
type- The name of the Information System type whose instances to retrievepolymorphic- Whether to include instances of subtypes (true) or only exact type instances (false)- Returns:
- JSON array string containing the instances of the specified type accessible in the current context
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during instance retrieval or if the type is invalid
- Makes HTTP GET request to
-
query
public String query(String jsonQuery, Boolean polymorphic) throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Executes a JSON structural query against the instances collection.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().Issues
POST /instances/querywith theX-HTTP-Method-Override: QUERYheader, the RFC 10008QUERYnetwork-compatibility fallback, since this client's HTTP layer cannot send a nativeQUERYrequest.- Specified by:
queryin interfaceResourceRegistryPublisher- Parameters:
jsonQuery- JSON object describing the structure to search forpolymorphic- Whether to match subtypes of the query's root type and include nested instances- Returns:
- JSON string containing the array of matching instances
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryException- If the query syntax or structure is invalidorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during query execution
-
create
protected String create(String type, String json, UUID uuid) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.AlreadyPresentException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Creates a new instance of the specified type in the Resource Registry.- Parameters:
type- The type of the instance to createjson- The JSON representation of the instanceuuid- The UUID for the new instance- Returns:
- The JSON representation of the created instance
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the instance violates schema constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.AlreadyPresentException- If an instance with the same UUID already existsorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during creation
-
create
public String create(String type, String json, CreatePolicy createPolicy) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.AlreadyPresentException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Creates a new instance of the given type from JSON representation.CreatePolicy.IDEMPOTENTusesPUT: repeating the exact same call converges on the same graph state. Only theidof the root instance is generated when missing; the rest ofjsonis sent as it is, so theidof every nested Facet/ConsistsOf/IsRelatedTo must already be set.CreatePolicy.NON_IDEMPOTENTusesPOST: two identical calls always create two distinct instances, but everyidis optional — supplied, it is honored and validated against the usual UUID-reuse rules; omitted, the server always generates a fresh one.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
createin interfaceResourceRegistryPublisher- Parameters:
type- the concrete type name of the instance to createjson- JSON representation of the instance to createcreatePolicy- selects thePUT(idempotent) orPOST(non-idempotent) contract- Returns:
- JSON representation of the created instance
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the JSON violates Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.AlreadyPresentException- If a suppliedid, root or nested, already identifies an existing element of the same typeorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during instance creation or JSON parsing
-
create
public <ERElem extends org.gcube.informationsystem.model.reference.ERElement> ERElem create(ERElem er) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.AlreadyPresentException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionCreates a new instance of an Information System element in the Resource Registry, usingCreatePolicy.IDEMPOTENT: every missingid, oferand of the nested instances it creates, is generated and set oner.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
createin interfaceResourceRegistryPublisher- Type Parameters:
ERElem- The specific type of Information System element to create- Parameters:
er- The instance to create in the Resource Registry- Returns:
- The created instance with server-generated metadata and UUID
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the instance violates Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.AlreadyPresentException- If an instance with the same UUID already existsorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during instance creation
-
create
public <ERElem extends org.gcube.informationsystem.model.reference.ERElement> ERElem create(ERElem er, CreatePolicy createPolicy) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.AlreadyPresentException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionCreates a new instance of an Information System element in the Resource Registry.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
createin interfaceResourceRegistryPublisher- Type Parameters:
ERElem- The specific type of Information System element to create- Parameters:
er- The instance to create in the Resource RegistrycreatePolicy-CreatePolicy.IDEMPOTENTgenerates every missingid, oferand of the nested instances it creates, and sets it oner;CreatePolicy.NON_IDEMPOTENThonors anyidpresent and lets the server generate the rest- Returns:
- The created instance with server-generated metadata and UUID
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the instance violates Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.AlreadyPresentException- If a suppliedid, root or nested, already identifies an existing element of the same typeorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during instance creation
-
create
public String create(String json) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.AlreadyPresentException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Creates a new instance of an Information System element from JSON representation, usingCreatePolicy.IDEMPOTENT. Only theidof the root instance is generated when missing; the rest ofjsonis sent as it is.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
createin interfaceResourceRegistryPublisher- Parameters:
json- JSON representation of the instance to create- Returns:
- JSON representation of the created instance with server-generated metadata and UUID
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the JSON violates Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.AlreadyPresentException- If an instance with the same UUID already existsorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during instance creation or JSON parsing
-
exist
public <ERElem extends org.gcube.informationsystem.model.reference.ERElement> boolean exist(ERElem er) throws org.gcube.informationsystem.resourceregistry.api.exceptions.instances.AvailableInAnotherContextException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionChecks if an Information System element instance exists in the Resource Registry.Invocation-specific options and immutable response metadata are available through
Implementation Details: Type and UUID Extraction:RequestInfo.serverResponses().- Extracts the type name from the instance using
Element.getTypeName() - Retrieves the UUID from the instance using
IdentifiableElement.getID() - Delegates to
exist(String, UUID)for the actual implementation.
- The instance must have a valid UUID set, otherwise the check will fail
- The instance's type must be a valid Information System model type.
- Specified by:
existin interfaceResourceRegistryPublisher- Type Parameters:
ERElem- The specific type of Information System element to check- Parameters:
er- The instance to check for existence (must have a valid UUID)- Returns:
- true if the instance exists and is accessible in the current context, false if not found
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.instances.AvailableInAnotherContextException- If the instance exists but is not accessible in the current contextorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the existence check
- Extracts the type name from the instance using
-
exist
public <ERElem extends org.gcube.informationsystem.model.reference.ERElement> boolean exist(Class<ERElem> clazz, UUID uuid) throws org.gcube.informationsystem.resourceregistry.api.exceptions.instances.AvailableInAnotherContextException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Checks if an Information System element instance exists in the Resource Registry using class and UUID.Invocation-specific options and immutable response metadata are available through
Implementation Details: Type Resolution:RequestInfo.serverResponses().- Derives the type name from the provided class using
TypeUtility.getTypeName(Class) - Ensures type-safe operation by resolving the exact type name from the class
- Delegates to
exist(String, UUID)for the actual implementation.
- The class must be a valid Information System model type
- Type name resolution is performed using the TypeUtility for consistency.
- Specified by:
existin interfaceResourceRegistryPublisher- Type Parameters:
ERElem- The specific type of Information System element to check- Parameters:
clazz- The class representing the type of instance to checkuuid- The UUID of the instance to check for existence- Returns:
- true if the instance exists and is accessible in the current context, false if not found
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.instances.AvailableInAnotherContextException- If the instance exists but is not accessible in the current contextorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the existence check
- Derives the type name from the provided class using
-
exist
public boolean exist(String type, UUID uuid) throws org.gcube.informationsystem.resourceregistry.api.exceptions.instances.AvailableInAnotherContextException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Checks if an Information System element instance exists in the Resource Registry using type name and UUID.Invocation-specific options and immutable response metadata are available through
Implementation Details: Request Configuration:RequestInfo.serverResponses().- Makes HTTP HEAD request to the instances endpoint
- Includes hierarchical mode parameter if enabled via client configuration.
- Successful response indicates the instance exists and is accessible
- NotFoundException is caught and converted to false return value
- Other exceptions are propagated according to the interface contract.
- Uses automatic authorization headers via the base request configuration
- User permissions are validated server-side.
- Logs info-level message when starting the existence check
- Logs debug-level message when instance is confirmed to exist
- Uses type and UUID in log messages for traceability.
- Specified by:
existin interfaceResourceRegistryPublisher- Parameters:
type- The name of the Information System type to checkuuid- The UUID of the instance to check for existence- Returns:
- true if the instance exists and is accessible in the current context, false if not found
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.instances.AvailableInAnotherContextException- If the instance exists but is not accessible in the current contextorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the existence check
-
read
public <ERElem extends org.gcube.informationsystem.model.reference.ERElement> ERElem read(ERElem er) throws org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.AvailableInAnotherContextException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionReads an existing instance from the Resource Registry using a provided instance object.Invocation-specific options and immutable response metadata are available through
Implementation Details: Type and UUID Extraction:RequestInfo.serverResponses().- Extracts the type name from the instance using
Element.getTypeName() - Retrieves the UUID from the instance using
IdentifiableElement.getID() - Delegates to
read(String, UUID)for the actual REST API call.
- Receives JSON response from the delegated method
- Unmarshals the JSON back to the original object type using
ElementMapper.unmarshal(Class, String) - Performs type casting to return the strongly-typed instance
- Returns the complete instance with all properties and server metadata.
- Uses @SuppressWarnings("unchecked") for the type casting from
ERElementtoResourceRegistryPublisherImpl - Type safety is ensured by the fact that the JSON contains the same type as the input instance
- The returned object will be of the same type as the provided instance.
ResourceRegistryExceptions from the delegated method are propagated directly- JSON unmarshalling errors are wrapped in
RuntimeException - Server-side errors (404, 403, etc.) are handled by the underlying
read(String, UUID)method.
- Specified by:
readin interfaceResourceRegistryPublisher- Type Parameters:
ERElem- The specific type of Entity or Relation to read- Parameters:
er- Instance object containing at least the UUID in the header- Returns:
- The complete instance from the Resource Registry
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException- If no instance is found with the specified UUIDorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.AvailableInAnotherContextException- If the instance exists but is not accessible in the current contextorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during instance retrieval
- Extracts the type name from the instance using
-
read
public <ERElem extends org.gcube.informationsystem.model.reference.ERElement> ERElem read(Class<ERElem> clazz, UUID uuid) throws org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.AvailableInAnotherContextException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Reads an existing instance from the Resource Registry by its type class and UUID.Invocation-specific options and immutable response metadata are available through
Implementation Details: Type Resolution:RequestInfo.serverResponses().- Derives the type name from the provided class using
TypeUtility.getTypeName(Class) - Ensures type-safe operation by resolving the exact type name from the class
- Delegates to
read(String, UUID)for the actual REST API call.
- Receives JSON response from the delegated method
- Unmarshals the JSON to the specified class type using
ElementMapper.unmarshal(Class, String) - Performs type casting to return the strongly-typed instance
- Returns the complete instance with all properties and server metadata.
- Uses @SuppressWarnings("unchecked") for the type casting from
ERElementtoResourceRegistryPublisherImpl - Type safety is ensured by using the class parameter for type resolution
- The returned object will be of exactly the specified class type.
- The class must be a valid Information System model type
- Type name resolution is performed using the TypeUtility for consistency with other methods.
ResourceRegistryExceptions from the delegated method are propagated directly- JSON unmarshalling errors are wrapped in
RuntimeException.
- Specified by:
readin interfaceResourceRegistryPublisher- Type Parameters:
ERElem- The specific type of Entity or Relation to read- Parameters:
clazz- The class of the Entity or Relation type to readuuid- The unique identifier of the instance to read- Returns:
- The complete instance from the Resource Registry
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException- If no instance is found with the specified UUID and typeorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.AvailableInAnotherContextException- If the instance exists but is not accessible in the current contextorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during instance retrieval
- Derives the type name from the provided class using
-
read
public String read(String type, UUID uuid) throws org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.AvailableInAnotherContextException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Reads an existing instance from the Resource Registry by its type name and UUID.Invocation-specific options and immutable response metadata are available through
Implementation Details: REST API Call:RequestInfo.serverResponses().- Makes HTTP GET request to
/instances/{type-name}/{uuid}endpoint - Sets Accept header to application/json with UTF-8 charset for JSON response
- Includes type name and UUID as path parameters.
- Uses
GXRequestfor HTTP communication - Includes authorization headers automatically via base request configuration
- Automatically includes additional query parameters from client configuration:
hierarchicalMode: Whether to search in parent contextscontextsPolicy: Where the response carries the contexts membership mapmembershipScope: The Context boundary of the memberships listed by every contexts mapincludeMeta: Whether to include metadata in responseallMeta: Whether to include metadata for all nested instances.
- Additional query parameters are included
- Parameters are based on the current client configuration state
- Supports hierarchical context navigation when enabled.
- Returns raw JSON string response from server
- Response contains complete instance with all properties and metadata
- Server filters results based on current context and user authorization
- Response processed via
HTTPUtility.getResponse(Class, GXResponse)for proper error handling.
- Logs trace-level message when starting the read operation with type and UUID
- Logs debug-level message with the complete JSON response when successful
- Uses structured logging for better traceability and debugging.
ResourceRegistryExceptions propagated directly from server- Other exceptions wrapped in
RuntimeException.
- Specified by:
readin interfaceResourceRegistryPublisher- Parameters:
type- The exact type name of the Entity or Relation to readuuid- The unique identifier of the instance to read- Returns:
- JSON representation of the complete instance from the Resource Registry
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException- If no instance is found with the specified UUID and typeorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.AvailableInAnotherContextException- If the instance exists but is not accessible in the current contextorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during instance retrieval
- Makes HTTP GET request to
-
update
public <ERElem extends org.gcube.informationsystem.model.reference.ERElement> ERElem update(ERElem er) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionUpdates an existing instance in the Resource Registry using the instance object.Invocation-specific options and immutable response metadata are available through
Implementation Details: Instance Validation:RequestInfo.serverResponses().- The instance must have a valid UUID set, as updates require identification of the existing instance
- The instance's type must match an existing instance in the Resource Registry.
- Uses
ElementMapper.marshal(Element)to convert the instance to JSON representation - Type name is extracted from the instance using
TypeUtility.getTypeName(Class)method - UUID is extracted from the instance using
IdentifiableElement.getID()method - Delegates to the internal
update(String, String, UUID)method for the actual REST call.
- Makes HTTP PUT request to
/instances/{type-name}/{uuid}endpoint - Sets Accept and Content-Type headers to application/json with UTF-8 charset
- Includes query parameters for metadata and context information based on client configuration.
- Receives JSON response from server containing the updated instance with metadata
- Unmarshals the JSON response back to the original object type using
ElementMapper - Returns the typed instance with server-updated properties (e.g., modification timestamp, metadata).
ResourceRegistryExceptions from server are propagated directly- JSON marshalling/unmarshalling errors are wrapped in
RuntimeException - HTTP communication errors are handled by the underlying HTTP utility.
contextsPolicy: Where the response carries the contexts membership mapmembershipScope: The Context boundary of the memberships listed by every contexts mapincludeMeta: Whether to include metadata in the responseallMeta: Whether to include metadata for all nested instances.
- Specified by:
updatein interfaceResourceRegistryPublisher- Type Parameters:
ERElem- The generic type extending ERElement (Entity or Relation)- Parameters:
er- The instance object to update with new values- Returns:
- The updated instance object with current data from the Resource Registry
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the updated instance violates type schema constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException- If the instance to update does not existorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during instance update
-
update
public String update(String json) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Updates an existing instance in the Resource Registry using JSON representation.Invocation-specific options and immutable response metadata are available through
Implementation Details: JSON Processing:RequestInfo.serverResponses().- Uses Jackson
ObjectMapperto parse the input JSON string into aJsonNode - Extracts the type name from the JSON using
TypeUtility.getTypeName(JsonNode) - The JSON must contain the @class property indicating the instance type.
- The JSON must contain a valid UUID for the instance to be updated
- UUID is used to identify the existing instance in the Resource Registry
- Delegates to
update(String type, String json)for further processing.
- Type name must be present in the JSON as @class property
- Uses
TypeUtilityto extract the type name from the JSON structure - Type name is used as path parameter in the REST API call.
- Extracts type name from JSON structure
- Delegates to
update(String, String)method which handles UUID extraction and REST call - Returns the raw JSON string response from the server.
ResourceRegistryExceptions from server are propagated directly- JSON parsing errors are wrapped in
RuntimeException - Missing @class property or invalid JSON structure cause exceptions.
- Specified by:
updatein interfaceResourceRegistryPublisher- Parameters:
json- JSON representation of the instance to update- Returns:
- JSON string containing the updated instance with current data from the Resource Registry
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the updated instance violates type schema constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException- If the instance to update does not existorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during instance update
- Uses Jackson
-
update
public String update(String type, String json) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Updates an existing instance in the Resource Registry using type name and JSON representation.Invocation-specific options and immutable response metadata are available through
Implementation Details: UUID Extraction:RequestInfo.serverResponses().- Uses
UUIDUtility.getUUID(String)to extract the UUID from the JSON - The JSON must contain a valid UUID field for instance identification
- Delegates to
update(String, String, UUID)for the actual REST call.
- The JSON must be well-formed and contain all required fields for the update
- Type parameter ensures type-safe operation by providing explicit type information
- UUID must match an existing instance in the Resource Registry.
- Extracts UUID from the provided JSON
- Delegates to the final update method with type, JSON, and UUID parameters
- Returns the raw JSON response from the server.
ResourceRegistryExceptions from server are propagated directly- JSON parsing errors are wrapped in
RuntimeException - Missing or invalid UUID in JSON causes exceptions.
- Specified by:
updatein interfaceResourceRegistryPublisher- Parameters:
type- The name of the Information System type (e.g., "EService", "ContactFacet")json- JSON representation of the instance to update- Returns:
- JSON string containing the updated instance with current data from the Resource Registry
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the updated instance violates type schema constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException- If the instance to update or the specified type does not existorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during instance update
- Uses
-
update
public String update(String type, String json, UUID uuid) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Updates an existing instance in the Resource Registry using type name, JSON representation, and explicit UUID.Invocation-specific options and immutable response metadata are available through
Implementation Details: REST API Implementation:RequestInfo.serverResponses().- Makes HTTP PUT request to
/instances/{type-name}/{uuid}endpoint - Sets Accept and Content-Type headers to application/json with UTF-8 charset
- Includes type name and UUID as path parameters
- Sends the JSON string as request body.
- Uses
GXRequestfor HTTP communication - Includes authorization headers automatically via base request configuration
- Automatically includes additional query parameters from client configuration:
contextsPolicy: Where the response carries the contexts membership mapmembershipScope: The Context boundary of the memberships listed by every contexts mapincludeMeta: Whether to include metadata in responseallMeta: Whether to include metadata for all nested instances.
- Performs a full replacement of the existing instance with the provided JSON (PUT semantics)
- The UUID must match an existing instance in the current context
- For Resource instances, any ConsistsOf topology omitted from the payload is removed rather
than preserved; use
mergeUpdate(String, String, UUID)to change a subset of fields without affecting the rest.
- Returns raw JSON string response from server
- Response contains the updated instance with all properties and server metadata
- Server updates modification timestamps and other metadata automatically
- Response processed via
HTTPUtility.getResponse(Class, GXResponse)for proper error handling.
- Logs trace-level message when starting the update operation with type and JSON
- Logs trace-level message with the UUID when the update is successful
- Uses structured logging for better traceability and debugging.
ResourceRegistryExceptions propagated directly from server- HTTP 404 errors converted to
NotFoundExceptionif instance doesn't exist - HTTP 403 errors and context accessibility issues converted to appropriate exceptions
- Other exceptions wrapped in
RuntimeException.
- Specified by:
updatein interfaceResourceRegistryPublisher- Parameters:
type- The name of the Information System type (e.g., "EService", "ContactFacet")json- JSON representation of the instance to update (UUID in JSON is ignored)uuid- The unique identifier of the instance to update- Returns:
- JSON string containing the updated instance with current data from the Resource Registry
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the updated instance violates type schema constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException- If the instance with the specified UUID or the specified type does not existorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during instance update
- Makes HTTP PUT request to
-
mergeUpdate
public <ERElem extends org.gcube.informationsystem.model.reference.ERElement> ERElem mergeUpdate(ERElem er) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionApplies a partial (merge-patch) update to an existing instance, using the type and JSON embedded iner.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
mergeUpdatein interfaceResourceRegistryPublisher- Type Parameters:
ERElem- The generic type extending ERElement (Entity or Relation)- Parameters:
er- The instance object carrying the partial changes to apply- Returns:
- The merge-updated instance object with current data from the Resource Registry
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the merge-updated instance violates type schema constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException- If the instance to update does not existorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the merge update
-
mergeUpdate
public String mergeUpdate(String json) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Applies a partial (merge-patch) update to an existing instance, using its JSON representation.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
mergeUpdatein interfaceResourceRegistryPublisher- Parameters:
json- JSON merge-patch payload; must include the "id" and "type" of the target instance- Returns:
- JSON string containing the merge-updated instance
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the merge-updated instance violates type schema constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException- If the instance to update does not existorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the merge update
-
mergeUpdate
public String mergeUpdate(String type, String json) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Applies a partial (merge-patch) update to an existing instance, using an explicit type name and its JSON representation.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
mergeUpdatein interfaceResourceRegistryPublisher- Parameters:
type- The name of the Information System type (e.g., "EService", "ContactFacet")json- JSON merge-patch payload; must include the "id" of the target instance- Returns:
- JSON string containing the merge-updated instance
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the merge-updated instance violates type schema constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException- If the instance to update or the specified type does not existorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the merge update
-
mergeUpdate
public String mergeUpdate(String type, String json, UUID uuid) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Applies a partial (merge-patch) update to an existing instance, using an explicit type name, JSON representation, and UUID.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().Issues
PATCH /instances/{type}/{uuid}withContent-Type: application/merge-patch+json; the server validates exact path/body identity.- Specified by:
mergeUpdatein interfaceResourceRegistryPublisher- Parameters:
type- The name of the Information System type (e.g., "EService", "ContactFacet")json- JSON merge-patch payload whose top-level type and id match the explicit argumentsuuid- The unique identifier of the instance to merge-update- Returns:
- JSON string containing the merge-updated instance
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the merge-updated instance violates type schema constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException- If the instance with the specified UUID or the specified type does not existorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the merge update
-
delete
public <ERElem extends org.gcube.informationsystem.model.reference.ERElement> boolean delete(ERElem er) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionDeletes an Information System element instance from the Resource Registry.Invocation-specific options and immutable response metadata are available through
Implementation Details: Instance Identification:RequestInfo.serverResponses().- Extracts the type name from the instance using
Element.getTypeName() - Retrieves the UUID from the instance using
IdentifiableElement.getID() - Delegates to
delete(String, UUID)for the actual REST API call.
- The instance must have a valid UUID set for identification of the target instance
- The instance's type must match an existing instance in the Resource Registry
- Both type and UUID are required for the deletion operation.
- For Resources: Deletion automatically removes all associated ConsistsOf relations
- For Facets: Deletion is only allowed if no ConsistsOf relations reference the Facet
- For Relations: Deletion removes the relation without affecting source or target instances.
ResourceRegistryExceptions from server are propagated directly- Missing UUID or invalid instance structure cause exceptions
- Referential integrity violations result in appropriate server exceptions.
- Specified by:
deletein interfaceResourceRegistryPublisher- Type Parameters:
ERElem- The specific type of Information System element to delete- Parameters:
er- The instance to delete (must contain a valid UUID in the header)- Returns:
- true if the instance was successfully deleted, false otherwise
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If deleting the instance would violate Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException- If the instance does not exist or is not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the delete operation
- Extracts the type name from the instance using
-
delete
public boolean delete(String type, UUID uuid) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Deletes an Information System element instance from the Resource Registry using type name and UUID.Invocation-specific options and immutable response metadata are available through
Implementation Details: REST API Call:RequestInfo.serverResponses().- Makes HTTP DELETE request to
/instances/{type-name}/{uuid}endpoint - Sets Accept header to application/json for consistent communication
- Includes type name and UUID as path parameters.
- Uses
GXRequestfor HTTP communication - Includes authorization headers automatically via base request configuration
- No query parameters required for basic deletion operation
- No request body is sent with DELETE requests.
- Performs permanent removal of the instance from the Resource Registry
- The instance must exist in the current context to be deleted
- Referential integrity constraints are enforced by the server
- Cascading deletion rules apply based on the instance type (Resource, Facet, or Relation).
- Resources: All associated ConsistsOf relations are automatically deleted
- Facets: Deletion fails if any ConsistsOf relations reference the Facet
- Relations: Only the relation itself is deleted, source and target instances remain.
- Server response is processed but content is not returned to caller
- Always returns
truewhen deletion is successful - Exceptions are thrown for error conditions rather than returning
false - Response processed via
HTTPUtility.getResponse(Class, GXResponse)for proper error handling.
- Logs trace-level message when starting the delete operation with type and UUID
- Logs info-level message indicating successful or failed deletion
- Uses structured logging for better traceability and debugging.
ResourceRegistryExceptions propagated directly from server- HTTP 404 errors converted to
NotFoundExceptionif instance doesn't exist - HTTP 403 errors for insufficient permissions or context restrictions
- Referential integrity violations result in
SchemaViolationException - Other exceptions wrapped in
RuntimeException.
- Specified by:
deletein interfaceResourceRegistryPublisher- Parameters:
type- The exact type name of the ERElement to deleteuuid- The UUID of the instance to delete- Returns:
- true if the instance was successfully deleted, false otherwise
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If deleting the instance would violate Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException- If the instance does not exist or is not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the delete operation
- Makes HTTP DELETE request to
-
delete
public List<org.gcube.informationsystem.model.reference.ERElement> delete(String type, UUID uuid, org.gcube.informationsystem.resourceregistry.api.rest.PropagationMode propagationMode, Boolean dryRun) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Removes an instance from the current context, exposing propagation and dry-run control.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().Issues
DELETE /instances/{type}/{uuid}withpropagationModeanddryRunas explicit query parameters.- Specified by:
deletein interfaceResourceRegistryPublisher- Parameters:
type- The exact type name of the ERElement to removeuuid- The UUID of the instance to removepropagationMode- How removal propagates (shalloworsurgical);deepis corrected toshallow, andnulluses the server defaultdryRun- Whether to simulate the removal (true) or apply actual changes (false)- Returns:
- List of all elements affected by this operation (including the instance itself and any related elements)
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If removal would violate Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException- If the instance does not exist or is not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the delete operation
-
delete
public List<org.gcube.informationsystem.model.reference.ERElement> delete(org.gcube.informationsystem.model.reference.ERElement er, org.gcube.informationsystem.resourceregistry.api.rest.PropagationMode propagationMode, Boolean dryRun) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Removes an instance from the current context, using a provided instance object and exposing propagation and dry-run control.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
deletein interfaceResourceRegistryPublisher- Parameters:
er- The instance to remove (must contain a valid UUID in the header)propagationMode- How removal propagates (shalloworsurgical);deepis corrected toshallow, andnulluses the server defaultdryRun- Whether to simulate the removal (true) or apply actual changes (false)- Returns:
- List of all elements affected by this operation (including the instance itself and any related elements)
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If removal would violate Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException- If the instance does not exist or is not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the delete operation
-
createFacet
public <F extends org.gcube.informationsystem.model.reference.entities.Facet> F createFacet(F facet) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetAlreadyPresentException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionCreates a new Facet instance in the Resource Registry.Invocation-specific options and immutable response metadata are available through
This method is a type-safe wrapper that delegates toRequestInfo.serverResponses().create(ERElement)for implementation details.- Specified by:
createFacetin interfaceResourceRegistryPublisher- Type Parameters:
F- The specific type of Facet to create- Parameters:
facet- The Facet instance to create in the Resource Registry- Returns:
- The created Facet with server-generated metadata and UUID
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the facet violates Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetAlreadyPresentException- If a facet with the same UUID already existsorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during facet creation
-
createFacet
public String createFacet(String facet) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetAlreadyPresentException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Creates a new Facet instance from JSON representation.Invocation-specific options and immutable response metadata are available through
This method is a type-safe wrapper that delegates toRequestInfo.serverResponses().create(String)for implementation details.- Specified by:
createFacetin interfaceResourceRegistryPublisher- Parameters:
facet- JSON representation of the Facet to create- Returns:
- JSON representation of the created Facet with server-generated metadata and UUID
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the JSON violates Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetAlreadyPresentException- If a facet with the same UUID already existsorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during facet creation or JSON parsing
-
readFacet
public <F extends org.gcube.informationsystem.model.reference.entities.Facet> F readFacet(F facet) throws org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetAvailableInAnotherContextException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionReads a Facet instance from the Resource Registry using a provided instance object.Invocation-specific options and immutable response metadata are available through
This method is a type-safe wrapper that delegates toRequestInfo.serverResponses().read(ERElement)for implementation details.- Specified by:
readFacetin interfaceResourceRegistryPublisher- Type Parameters:
F- The specific type of Facet to read- Parameters:
facet- Instance object containing at least the UUID in the header- Returns:
- The complete Facet instance from the Resource Registry
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException- If no Facet is found with the specified UUIDorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetAvailableInAnotherContextException- If the Facet exists but is not accessible in the current contextorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during Facet retrieval
-
readFacet
public String readFacet(String facetType, UUID uuid) throws org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetAvailableInAnotherContextException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Reads a Facet instance from the Resource Registry by its type and UUID.Invocation-specific options and immutable response metadata are available through
This method is a type-safe wrapper that delegates toRequestInfo.serverResponses().read(String, UUID)for implementation details.- Specified by:
readFacetin interfaceResourceRegistryPublisher- Parameters:
facetType- The exact type name of the Facet to readuuid- The unique identifier of the Facet to read- Returns:
- JSON representation of the complete Facet instance from the Resource Registry
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException- If no Facet is found with the specified UUID and typeorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetAvailableInAnotherContextException- If the Facet exists but is not accessible in the current contextorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during Facet retrieval
-
updateFacet
public <F extends org.gcube.informationsystem.model.reference.entities.Facet> F updateFacet(F facet) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionUpdates an existing Facet instance in the Resource Registry.Invocation-specific options and immutable response metadata are available through
This method is a type-safe wrapper that delegates toRequestInfo.serverResponses().update(ERElement)for implementation details.- Specified by:
updateFacetin interfaceResourceRegistryPublisher- Type Parameters:
F- The specific type of Facet to update- Parameters:
facet- The Facet instance with updated values (must contain valid UUID)- Returns:
- The updated Facet object with current data from the Resource Registry
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the updated Facet violates type schema constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException- If the Facet to update does not existorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during Facet update
-
updateFacet
public String updateFacet(String facet) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Updates an existing Facet instance in the Resource Registry using JSON representation.Invocation-specific options and immutable response metadata are available through
This method is a type-safe wrapper that delegates toRequestInfo.serverResponses().update(String)for implementation details.- Specified by:
updateFacetin interfaceResourceRegistryPublisher- Parameters:
facet- JSON representation of the Facet to update- Returns:
- JSON string containing the updated Facet with current data from the Resource Registry
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the updated Facet violates type schema constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException- If the Facet to update does not existorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during Facet update
-
deleteFacet
public <F extends org.gcube.informationsystem.model.reference.entities.Facet> boolean deleteFacet(F facet) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionDeletes a Facet instance from the Resource Registry.Invocation-specific options and immutable response metadata are available through
This method is a type-safe wrapper that delegates toRequestInfo.serverResponses().delete(ERElement)for implementation details.- Specified by:
deleteFacetin interfaceResourceRegistryPublisher- Type Parameters:
F- The specific type of Facet to delete- Parameters:
facet- The Facet instance to delete (must contain a valid UUID in the header)- Returns:
- true if the Facet was successfully deleted, false otherwise
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If deleting the Facet would violate Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException- If the Facet does not exist or is not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the delete operation
-
deleteFacet
public boolean deleteFacet(String facetType, UUID uuid) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Deletes a Facet instance from the Resource Registry using type name and UUID.Invocation-specific options and immutable response metadata are available through
This method is a type-safe wrapper that delegates toRequestInfo.serverResponses().delete(String, UUID)for implementation details.- Specified by:
deleteFacetin interfaceResourceRegistryPublisher- Parameters:
facetType- The exact type name of the Facet to deleteuuid- The UUID of the Facet instance to delete- Returns:
- true if the Facet was successfully deleted, false otherwise
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If deleting the Facet would violate Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException- If the Facet does not exist or is not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the delete operation
-
createResource
public <R extends org.gcube.informationsystem.model.reference.entities.Resource> R createResource(R resource) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceAlreadyPresentException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionCreates a new Resource instance in the Resource Registry.Invocation-specific options and immutable response metadata are available through
This method is a type-safe wrapper that delegates toRequestInfo.serverResponses().create(ERElement)for implementation details.- Specified by:
createResourcein interfaceResourceRegistryPublisher- Type Parameters:
R- The specific type of Resource to create- Parameters:
resource- The Resource instance to create in the Resource Registry- Returns:
- The created Resource with server-generated metadata and UUID
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the resource violates Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceAlreadyPresentException- If a resource with the same UUID already existsorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during resource creation
-
createResource
public String createResource(String resource) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceAlreadyPresentException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Creates a new Resource instance from JSON representation.Invocation-specific options and immutable response metadata are available through
This method is a type-safe wrapper that delegates toRequestInfo.serverResponses().create(String)for implementation details.- Specified by:
createResourcein interfaceResourceRegistryPublisher- Parameters:
resource- JSON representation of the Resource to create- Returns:
- JSON representation of the created Resource with server-generated metadata and UUID
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the JSON violates Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceAlreadyPresentException- If a resource with the same UUID already existsorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during resource creation or JSON parsing
-
readResource
public <R extends org.gcube.informationsystem.model.reference.entities.Resource> R readResource(R resource) throws org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceAvailableInAnotherContextException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionReads a Resource instance from the Resource Registry using a provided instance object.Invocation-specific options and immutable response metadata are available through
This method is a type-safe wrapper that delegates toRequestInfo.serverResponses().read(ERElement)for implementation details.- Specified by:
readResourcein interfaceResourceRegistryPublisher- Type Parameters:
R- The specific type of Resource to read- Parameters:
resource- Instance object containing at least the UUID in the header- Returns:
- The complete Resource instance from the Resource Registry
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException- If no Resource is found with the specified UUIDorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceAvailableInAnotherContextException- If the Resource exists but is not accessible in the current contextorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during Resource retrieval
-
readResource
public String readResource(String resourceType, UUID uuid) throws org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceAvailableInAnotherContextException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Reads a Resource instance from the Resource Registry by its type and UUID.Invocation-specific options and immutable response metadata are available through
This method is a type-safe wrapper that delegates toRequestInfo.serverResponses().read(String, UUID)for implementation details.- Specified by:
readResourcein interfaceResourceRegistryPublisher- Parameters:
resourceType- The exact type name of the Resource to readuuid- The unique identifier of the Resource to read- Returns:
- JSON representation of the complete Resource instance from the Resource Registry
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException- If no Resource is found with the specified UUID and typeorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceAvailableInAnotherContextException- If the Resource exists but is not accessible in the current contextorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during Resource retrieval
-
updateResource
public <R extends org.gcube.informationsystem.model.reference.entities.Resource> R updateResource(R resource) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionUpdates an existing Resource instance in the Resource Registry.Invocation-specific options and immutable response metadata are available through
This method is a type-safe wrapper that delegates toRequestInfo.serverResponses().update(ERElement)for implementation details.- Specified by:
updateResourcein interfaceResourceRegistryPublisher- Type Parameters:
R- The specific type of Resource to update- Parameters:
resource- The Resource instance with updated values (must contain valid UUID)- Returns:
- The updated Resource object with current data from the Resource Registry
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the updated Resource violates type schema constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException- If the Resource to update does not existorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during Resource update
-
updateResource
public String updateResource(String resource) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Updates an existing Resource instance in the Resource Registry using JSON representation.Invocation-specific options and immutable response metadata are available through
This method is a type-safe wrapper that delegates toRequestInfo.serverResponses().update(String)for implementation details.- Specified by:
updateResourcein interfaceResourceRegistryPublisher- Parameters:
resource- JSON representation of the Resource to update- Returns:
- JSON string containing the updated Resource with current data from the Resource Registry
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the updated Resource violates type schema constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException- If the Resource to update does not existorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during Resource update
-
deleteResource
public <R extends org.gcube.informationsystem.model.reference.entities.Resource> boolean deleteResource(R resource) throws org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionDeletes a Resource instance from the Resource Registry.Invocation-specific options and immutable response metadata are available through
This method is a type-safe wrapper that delegates toRequestInfo.serverResponses().delete(ERElement)for implementation details.- Specified by:
deleteResourcein interfaceResourceRegistryPublisher- Type Parameters:
R- The specific type of Resource to delete- Parameters:
resource- The Resource instance to delete (must contain a valid UUID in the header)- Returns:
- true if the Resource was successfully deleted, false otherwise
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException- If the Resource does not exist or is not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the delete operation
-
deleteResource
public boolean deleteResource(String resourceType, UUID uuid) throws org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Deletes a Resource instance from the Resource Registry using type name and UUID.Invocation-specific options and immutable response metadata are available through
This method is a type-safe wrapper that delegates toRequestInfo.serverResponses().delete(String, UUID)for implementation details.- Specified by:
deleteResourcein interfaceResourceRegistryPublisher- Parameters:
resourceType- The exact type name of the Resource to deleteuuid- The UUID of the Resource instance to delete- Returns:
- true if the Resource was successfully deleted, false otherwise
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException- If the Resource does not exist or is not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the delete operation
-
createConsistsOf
public <C extends org.gcube.informationsystem.model.reference.relations.ConsistsOf<? extends org.gcube.informationsystem.model.reference.entities.Resource,? extends org.gcube.informationsystem.model.reference.entities.Facet>> C createConsistsOf(C consistsOf) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.consistsof.ConsistsOfAlreadyPresentException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionCreates a new ConsistsOf relation instance in the Resource Registry.Invocation-specific options and immutable response metadata are available through
This method is a type-safe wrapper that delegates toRequestInfo.serverResponses().create(ERElement)for implementation details.- Specified by:
createConsistsOfin interfaceResourceRegistryPublisher- Type Parameters:
C- The specific type of ConsistsOf relation to create- Parameters:
consistsOf- The ConsistsOf relation instance to create in the Resource Registry- Returns:
- The created ConsistsOf relation with server-generated metadata and UUID
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the relation violates Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.consistsof.ConsistsOfAlreadyPresentException- If a relation with the same UUID already existsorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException- If the source Resource or target Facet does not existorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during relation creation
-
createConsistsOf
public String createConsistsOf(String consistsOf) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.consistsof.ConsistsOfAlreadyPresentException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Creates a new ConsistsOf relation instance from JSON representation.Invocation-specific options and immutable response metadata are available through
This method is a type-safe wrapper that delegates toRequestInfo.serverResponses().create(String)for implementation details.- Specified by:
createConsistsOfin interfaceResourceRegistryPublisher- Parameters:
consistsOf- JSON representation of the ConsistsOf relation to create- Returns:
- JSON representation of the created ConsistsOf relation with server-generated metadata and UUID
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the JSON violates Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.consistsof.ConsistsOfAlreadyPresentException- If a relation with the same UUID already existsorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException- If the source Resource or target Facet does not existorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during relation creation or JSON parsing
-
readConsistsOf
public <C extends org.gcube.informationsystem.model.reference.relations.ConsistsOf<? extends org.gcube.informationsystem.model.reference.entities.Resource,? extends org.gcube.informationsystem.model.reference.entities.Facet>> C readConsistsOf(C consistsOf) throws org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.consistsof.ConsistsOfNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.consistsof.ConsistsOfAvailableInAnotherContextException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionReads a ConsistsOf relation instance from the Resource Registry using a provided instance object.Invocation-specific options and immutable response metadata are available through
This method is a type-safe wrapper that delegates toRequestInfo.serverResponses().read(ERElement)for implementation details.- Specified by:
readConsistsOfin interfaceResourceRegistryPublisher- Type Parameters:
C- The specific type of ConsistsOf relation to read- Parameters:
consistsOf- Instance object containing at least the UUID in the header- Returns:
- The complete ConsistsOf relation instance from the Resource Registry
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.consistsof.ConsistsOfNotFoundException- If no ConsistsOf relation is found with the specified UUIDorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.consistsof.ConsistsOfAvailableInAnotherContextException- If the relation exists but is not accessible in the current contextorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during relation retrieval
-
readConsistsOf
public String readConsistsOf(String consistsOfType, UUID uuid) throws org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.consistsof.ConsistsOfNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.consistsof.ConsistsOfAvailableInAnotherContextException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Reads a ConsistsOf relation instance from the Resource Registry by its type and UUID.Invocation-specific options and immutable response metadata are available through
This method is a type-safe wrapper that delegates toRequestInfo.serverResponses().read(String, UUID)for implementation details.- Specified by:
readConsistsOfin interfaceResourceRegistryPublisher- Parameters:
consistsOfType- The exact type name of the ConsistsOf relation to readuuid- The unique identifier of the ConsistsOf relation to read- Returns:
- JSON representation of the complete ConsistsOf relation instance from the Resource Registry
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.consistsof.ConsistsOfNotFoundException- If no ConsistsOf relation is found with the specified UUID and typeorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.consistsof.ConsistsOfAvailableInAnotherContextException- If the relation exists but is not accessible in the current contextorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during relation retrieval
-
updateConsistsOf
public <C extends org.gcube.informationsystem.model.reference.relations.ConsistsOf<? extends org.gcube.informationsystem.model.reference.entities.Resource,? extends org.gcube.informationsystem.model.reference.entities.Facet>> C updateConsistsOf(C consistsOf) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.consistsof.ConsistsOfNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionUpdates an existing ConsistsOf relation instance in the Resource Registry.Invocation-specific options and immutable response metadata are available through
This method is a type-safe wrapper that delegates toRequestInfo.serverResponses().update(ERElement)for implementation details.- Specified by:
updateConsistsOfin interfaceResourceRegistryPublisher- Type Parameters:
C- The specific type of ConsistsOf relation to update- Parameters:
consistsOf- The ConsistsOf relation instance with updated values (must contain valid UUID)- Returns:
- The updated ConsistsOf relation object with current data from the Resource Registry
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the updated ConsistsOf relation violates type schema constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.consistsof.ConsistsOfNotFoundException- If the ConsistsOf relation to update does not existorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during ConsistsOf relation update
-
updateConsistsOf
public String updateConsistsOf(String consistsOf) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.consistsof.ConsistsOfNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Updates an existing ConsistsOf relation instance in the Resource Registry using JSON representation.Invocation-specific options and immutable response metadata are available through
This method is a type-safe wrapper that delegates toRequestInfo.serverResponses().update(String)for implementation details.- Specified by:
updateConsistsOfin interfaceResourceRegistryPublisher- Parameters:
consistsOf- JSON representation of the ConsistsOf relation to update- Returns:
- JSON string containing the updated ConsistsOf relation with current data from the Resource Registry
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the updated ConsistsOf relation violates type schema constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.consistsof.ConsistsOfNotFoundException- If the ConsistsOf relation to update does not existorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during ConsistsOf relation update
-
deleteConsistsOf
public <C extends org.gcube.informationsystem.model.reference.relations.ConsistsOf<? extends org.gcube.informationsystem.model.reference.entities.Resource,? extends org.gcube.informationsystem.model.reference.entities.Facet>> boolean deleteConsistsOf(C consistsOf) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.consistsof.ConsistsOfNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionDeletes a ConsistsOf relation instance from the Resource Registry.Invocation-specific options and immutable response metadata are available through
This method is a type-safe wrapper that delegates toRequestInfo.serverResponses().delete(ERElement)for implementation details.- Specified by:
deleteConsistsOfin interfaceResourceRegistryPublisher- Type Parameters:
C- The specific type of ConsistsOf relation to delete- Parameters:
consistsOf- The ConsistsOf relation instance to delete (must contain a valid UUID in the header)- Returns:
- true if the ConsistsOf relation was successfully deleted, false otherwise
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If deleting the ConsistsOf relation would violate Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.consistsof.ConsistsOfNotFoundException- If the ConsistsOf relation does not exist or is not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the delete operation
-
deleteConsistsOf
public boolean deleteConsistsOf(String consistsOfType, UUID uuid) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.consistsof.ConsistsOfNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Deletes a ConsistsOf relation instance from the Resource Registry using type name and UUID.Invocation-specific options and immutable response metadata are available through
This method is a type-safe wrapper that delegates toRequestInfo.serverResponses().delete(String, UUID)for implementation details.- Specified by:
deleteConsistsOfin interfaceResourceRegistryPublisher- Parameters:
consistsOfType- The exact type name of the ConsistsOf relation to deleteuuid- The UUID of the ConsistsOf relation instance to delete- Returns:
- true if the ConsistsOf relation was successfully deleted, false otherwise
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If deleting the ConsistsOf relation would violate Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.consistsof.ConsistsOfNotFoundException- If the ConsistsOf relation does not exist or is not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the delete operation
-
createIsRelatedTo
public <I extends org.gcube.informationsystem.model.reference.relations.IsRelatedTo<? extends org.gcube.informationsystem.model.reference.entities.Resource,? extends org.gcube.informationsystem.model.reference.entities.Resource>> I createIsRelatedTo(I isRelatedTo) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.isrelatedto.IsRelatedToAlreadyPresentException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionCreates a new IsRelatedTo relation instance in the Resource Registry.Invocation-specific options and immutable response metadata are available through
This method is a type-safe wrapper that delegates toRequestInfo.serverResponses().create(ERElement)for implementation details.- Specified by:
createIsRelatedToin interfaceResourceRegistryPublisher- Type Parameters:
I- The specific type of IsRelatedTo relation to create- Parameters:
isRelatedTo- The IsRelatedTo relation instance to create in the Resource Registry- Returns:
- The created IsRelatedTo relation with server-generated metadata and UUID
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the relation violates Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.isrelatedto.IsRelatedToAlreadyPresentException- If a relation with the same UUID already existsorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException- If the source or target Resource does not existorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during relation creation
-
createIsRelatedTo
public String createIsRelatedTo(String isRelatedTo) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.isrelatedto.IsRelatedToAlreadyPresentException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Creates a new IsRelatedTo relation instance from JSON representation.Invocation-specific options and immutable response metadata are available through
This method is a type-safe wrapper that delegates toRequestInfo.serverResponses().create(String)for implementation details.- Specified by:
createIsRelatedToin interfaceResourceRegistryPublisher- Parameters:
isRelatedTo- JSON representation of the IsRelatedTo relation to create- Returns:
- JSON representation of the created IsRelatedTo relation with server-generated metadata and UUID
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the JSON violates Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.isrelatedto.IsRelatedToAlreadyPresentException- If a relation with the same UUID already existsorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException- If the source or target Resource does not existorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during relation creation or JSON parsing
-
readIsRelatedTo
public <I extends org.gcube.informationsystem.model.reference.relations.IsRelatedTo<? extends org.gcube.informationsystem.model.reference.entities.Resource,? extends org.gcube.informationsystem.model.reference.entities.Resource>> I readIsRelatedTo(I isRelatedTo) throws org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.isrelatedto.IsRelatedToNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.isrelatedto.IsRelatedToAvailableInAnotherContextException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionReads an IsRelatedTo relation instance from the Resource Registry by its UUID.Invocation-specific options and immutable response metadata are available through
This method is a type-safe wrapper that delegates toRequestInfo.serverResponses().read(ERElement)for implementation details.- Specified by:
readIsRelatedToin interfaceResourceRegistryPublisher- Type Parameters:
I- The specific type of IsRelatedTo relation to read- Parameters:
isRelatedTo- Instance object containing at least the UUID in the header- Returns:
- The complete IsRelatedTo relation instance from the Resource Registry
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.isrelatedto.IsRelatedToNotFoundException- If no IsRelatedTo relation is found with the specified UUIDorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.isrelatedto.IsRelatedToAvailableInAnotherContextException- If the IsRelatedTo relation is not accessible in the current contextorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during relation retrieval
-
readIsRelatedTo
public String readIsRelatedTo(String isRelatedToType, UUID uuid) throws org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.isrelatedto.IsRelatedToNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.isrelatedto.IsRelatedToAvailableInAnotherContextException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Reads an IsRelatedTo relation instance from the Resource Registry by its type and UUID.Invocation-specific options and immutable response metadata are available through
This method is a type-safe wrapper that delegates toRequestInfo.serverResponses().read(String, UUID)for implementation details.- Specified by:
readIsRelatedToin interfaceResourceRegistryPublisher- Parameters:
isRelatedToType- The exact type name of the IsRelatedTo relation to readuuid- The unique identifier of the IsRelatedTo relation to read- Returns:
- JSON representation of the complete IsRelatedTo relation instance from the Resource Registry
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.isrelatedto.IsRelatedToNotFoundException- If no relation is found with the specified UUID and typeorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.isrelatedto.IsRelatedToAvailableInAnotherContextException- If the relation exists but is not accessible in the current contextorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during relation retrieval
-
updateIsRelatedTo
public <I extends org.gcube.informationsystem.model.reference.relations.IsRelatedTo<? extends org.gcube.informationsystem.model.reference.entities.Resource,? extends org.gcube.informationsystem.model.reference.entities.Resource>> I updateIsRelatedTo(I isRelatedTo) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.isrelatedto.IsRelatedToNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionUpdates an existing IsRelatedTo relation instance in the Resource Registry.Invocation-specific options and immutable response metadata are available through
This method is a type-safe wrapper that delegates toRequestInfo.serverResponses().update(ERElement)for implementation details.- Specified by:
updateIsRelatedToin interfaceResourceRegistryPublisher- Type Parameters:
I- The specific type of IsRelatedTo relation to update- Parameters:
isRelatedTo- The IsRelatedTo relation instance with updated values- Returns:
- The updated IsRelatedTo relation with current server metadata
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the updated relation violates Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.isrelatedto.IsRelatedToNotFoundException- If no relation is found with the specified UUIDorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during relation update
-
updateIsRelatedTo
public String updateIsRelatedTo(String isRelatedTo) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.isrelatedto.IsRelatedToNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Updates an existing IsRelatedTo relation instance from JSON representation.Invocation-specific options and immutable response metadata are available through
This method is a type-safe wrapper that delegates toRequestInfo.serverResponses().update(String)for implementation details.- Specified by:
updateIsRelatedToin interfaceResourceRegistryPublisher- Parameters:
isRelatedTo- JSON representation of the IsRelatedTo relation with updated values- Returns:
- JSON representation of the updated IsRelatedTo relation with current server metadata
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the JSON violates Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.isrelatedto.IsRelatedToNotFoundException- If no relation is found with the specified UUIDorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during relation update or JSON parsing
-
deleteIsRelatedTo
public <I extends org.gcube.informationsystem.model.reference.relations.IsRelatedTo<? extends org.gcube.informationsystem.model.reference.entities.Resource,? extends org.gcube.informationsystem.model.reference.entities.Resource>> boolean deleteIsRelatedTo(I isRelatedTo) throws org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.isrelatedto.IsRelatedToNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionDeletes an IsRelatedTo relation instance from the Resource Registry.Invocation-specific options and immutable response metadata are available through
This method is a type-safe wrapper that delegates toRequestInfo.serverResponses().delete(ERElement)for implementation details.- Specified by:
deleteIsRelatedToin interfaceResourceRegistryPublisher- Type Parameters:
I- The specific type of IsRelatedTo relation to delete- Parameters:
isRelatedTo- Instance object containing at least the UUID in the header- Returns:
trueif the IsRelatedTo relation was successfully deleted,falseotherwise- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.isrelatedto.IsRelatedToNotFoundException- If no relation is found with the specified UUIDorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during relation deletion
-
deleteIsRelatedTo
public boolean deleteIsRelatedTo(String isRelatedToType, UUID uuid) throws org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.isrelatedto.IsRelatedToNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Deletes an IsRelatedTo relation instance from the Resource Registry by its type and UUID.Invocation-specific options and immutable response metadata are available through
This method is a type-safe wrapper that delegates toRequestInfo.serverResponses().delete(String, UUID)for implementation details.- Specified by:
deleteIsRelatedToin interfaceResourceRegistryPublisher- Parameters:
isRelatedToType- The exact type name of the IsRelatedTo relation to deleteuuid- The unique identifier of the IsRelatedTo relation to delete- Returns:
trueif the IsRelatedTo relation was successfully deleted,falseotherwise- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.isrelatedto.IsRelatedToNotFoundException- If no relation is found with the specified UUID and typeorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during relation deletion
-
addToContext
public List<org.gcube.informationsystem.model.reference.ERElement> addToContext(String type, UUID instanceUUID, UUID contextUUID, Boolean dryRun) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Adds an Information System element instance to a specific context.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
addToContextin interfaceResourceRegistryPublisher- Parameters:
type- The exact type name of the Information System element to addinstanceUUID- The UUID of the instance to add to the contextcontextUUID- The UUID of the target context where the instance should be addeddryRun- Whether to perform a dry-run (true) or apply actual changes (false)- Returns:
- List of all elements affected by this operation (including the instance itself and any related elements)
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the operation violates Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException- If the instance or context is not found or not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- If the target context does not exist or is not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the add operation
-
addToContext
public List<org.gcube.informationsystem.model.reference.ERElement> addToContext(String type, UUID instanceUUID, UUID contextUUID, org.gcube.informationsystem.resourceregistry.api.rest.PropagationMode propagationMode, Boolean dryRun) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Adds an instance to a specific context, exposing propagation-mode control.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
addToContextin interfaceResourceRegistryPublisher- Parameters:
type- The exact type name of the Information System element to addinstanceUUID- The UUID of the instance to add to the contextcontextUUID- The UUID of the target context where the instance should be addedpropagationMode- How the add avalanche propagates to related elements, ornullfor the server default (shallow)dryRun- Whether to perform a dry-run (true) or apply actual changes (false)- Returns:
- List of all elements affected by this operation (including the instance itself and any related elements)
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the operation violates Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException- If the instance or context is not found or not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- If the target context does not exist or is not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the add operation
-
addToContext
public List<org.gcube.informationsystem.model.reference.ERElement> addToContext(String type, UUID instanceUUID, UUID contextUUID, org.gcube.informationsystem.resourceregistry.api.rest.PropagationMode propagationMode, Boolean hierarchical, Boolean bypassHierarchyCheck, Boolean dryRun) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Adds an instance to a specific context through the canonical Add to Context endpoint, exposing every parameter of the operation. Ordinary and privileged callers use this same method: every other Add to Context method of this interface delegates to it.propagationMode=surgical,hierarchical=trueandbypassHierarchyCheck=trueare reserved to IS-Manager, Infrastructure-Manager and IS-Admin: the server rejects them for any other role. Anullargument is not sent, so that the server default applies.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().Issues
PUT /instances/{type}/{uuid}/contexts/{context-uuid}withpropagationMode,hierarchical,bypassHierarchyCheckanddryRunas explicit query parameters; anullargument is not sent.- Specified by:
addToContextin interfaceResourceRegistryPublisher- Parameters:
type- The exact type name of the Information System element to addinstanceUUID- The UUID of the instance to add to the contextcontextUUID- The UUID of the target context where the instance should be addedpropagationMode- How the add avalanche propagates to related elements, ornullfor the server default (shallow)hierarchical- Whether the instance is added to the target context and to its whole subtree, ornullfor the server default (false)bypassHierarchyCheck- Whether the target context may be any live context instead of only the token context subtree and its siblings, ornullfor the server default (false)dryRun- Whether to perform a dry-run (true) or apply actual changes (false)- Returns:
- List of all elements affected by this operation (including the instance itself and any related elements)
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the operation violates Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException- If the instance or context is not found or not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- If the target context does not exist or is not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the add operation
-
addToContext
public List<org.gcube.informationsystem.model.reference.ERElement> addToContext(org.gcube.informationsystem.model.reference.ERElement er, UUID contextUUID, Boolean dryRun) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Adds an Information System element instance to a specific context using a provided instance object.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
addToContextin interfaceResourceRegistryPublisher- Parameters:
er- The instance to add to the context (must contain a valid UUID in the header)contextUUID- The UUID of the target context where the instance should be addeddryRun- Whether to perform a dry-run (true) or apply actual changes (false)- Returns:
- List of all elements affected by this operation (including the instance itself and any related elements)
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the operation violates Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException- If the instance or context is not found or not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- If the target context does not exist or is not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the add operation
-
addToContext
public List<org.gcube.informationsystem.model.reference.ERElement> addToContext(org.gcube.informationsystem.model.reference.ERElement er, UUID contextUUID, org.gcube.informationsystem.resourceregistry.api.rest.PropagationMode propagationMode, Boolean dryRun) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Adds an instance to a specific context using a provided instance object, exposing propagation-mode control.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
addToContextin interfaceResourceRegistryPublisher- Parameters:
er- The instance to add to the context (must contain a valid UUID in the header)contextUUID- The UUID of the target context where the instance should be addedpropagationMode- How the add avalanche propagates to related elements, ornullfor the server default (shallow)dryRun- Whether to perform a dry-run (true) or apply actual changes (false)- Returns:
- List of all elements affected by this operation (including the instance itself and any related elements)
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the operation violates Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException- If the instance or context is not found or not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- If the target context does not exist or is not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the add operation
-
addToCurrentContext
public List<org.gcube.informationsystem.model.reference.ERElement> addToCurrentContext(String type, UUID instanceUUID, Boolean dryRun) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Adds an Information System element instance to the current context.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
addToCurrentContextin interfaceResourceRegistryPublisher- Parameters:
type- The exact type name of the Information System element to addinstanceUUID- The UUID of the instance to add to the current contextdryRun- Whether to perform a dry-run (true) or apply actual changes (false)- Returns:
- List of all elements affected by this operation (including the instance itself and any related elements)
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the operation violates Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException- If the instance is not found or not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- If the current context cannot be determined or accessedorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the add operation
-
addToCurrentContext
public List<org.gcube.informationsystem.model.reference.ERElement> addToCurrentContext(String type, UUID instanceUUID, org.gcube.informationsystem.resourceregistry.api.rest.PropagationMode propagationMode, Boolean dryRun) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Adds an instance to the current context, exposing propagation-mode control.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
addToCurrentContextin interfaceResourceRegistryPublisher- Parameters:
type- The exact type name of the Information System element to addinstanceUUID- The UUID of the instance to add to the current contextpropagationMode- How the add avalanche propagates to related elements, ornullfor the server default (shallow)dryRun- Whether to perform a dry-run (true) or apply actual changes (false)- Returns:
- List of all elements affected by this operation (including the instance itself and any related elements)
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the operation violates Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException- If the instance is not found or not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- If the current context cannot be determined or accessedorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the add operation
-
addToCurrentContext
public List<org.gcube.informationsystem.model.reference.ERElement> addToCurrentContext(org.gcube.informationsystem.model.reference.ERElement er, Boolean dryRun) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Adds an Information System element instance to the current context using a provided instance object.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
addToCurrentContextin interfaceResourceRegistryPublisher- Parameters:
er- The instance to add to the current context (must contain a valid UUID in the header)dryRun- Whether to perform a dry-run (true) or apply actual changes (false)- Returns:
- List of all elements affected by this operation (including the instance itself and any related elements)
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the operation violates Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException- If the instance is not found or not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- If the current context cannot be determined or accessedorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the add operation
-
addToCurrentContext
public List<org.gcube.informationsystem.model.reference.ERElement> addToCurrentContext(org.gcube.informationsystem.model.reference.ERElement er, org.gcube.informationsystem.resourceregistry.api.rest.PropagationMode propagationMode, Boolean dryRun) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Adds an instance to the current context using a provided instance object, exposing propagation-mode control.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
addToCurrentContextin interfaceResourceRegistryPublisher- Parameters:
er- The instance to add to the current context (must contain a valid UUID in the header)propagationMode- How the add avalanche propagates to related elements, ornullfor the server default (shallow)dryRun- Whether to perform a dry-run (true) or apply actual changes (false)- Returns:
- List of all elements affected by this operation (including the instance itself and any related elements)
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the operation violates Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException- If the instance is not found or not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- If the current context cannot be determined or accessedorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the add operation
-
removeFromContext
public List<org.gcube.informationsystem.model.reference.ERElement> removeFromContext(String type, UUID instanceUUID, Boolean dryRun) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Removes an Information System element instance from the caller's current context.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
removeFromContextin interfaceResourceRegistryPublisher- Parameters:
type- The exact type name of the Information System element to removeinstanceUUID- The UUID of the instance to remove from the current contextdryRun- Whether to perform a dry-run (true) or apply actual changes (false)- Returns:
- List of all elements affected by this operation (including the instance itself and any related elements)
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the operation violates Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException- If the instance is not found or not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- If the current context does not exist or is not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the remove operation
-
removeFromContext
public List<org.gcube.informationsystem.model.reference.ERElement> removeFromContext(String type, UUID instanceUUID, org.gcube.informationsystem.resourceregistry.api.rest.PropagationMode propagationMode, Boolean dryRun) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Removes an Information System element instance from the caller's current context, controlling how the removal propagates to related elements.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
removeFromContextin interfaceResourceRegistryPublisher- Parameters:
type- The exact type name of the Information System element to removeinstanceUUID- The UUID of the instance to remove from the current contextpropagationMode- How removal propagates (shalloworsurgical);deepis corrected toshallow, andnulluses the server defaultdryRun- Whether to perform a dry-run (true) or apply actual changes (false)- Returns:
- List of all elements affected by this operation (including the instance itself and any related elements)
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the operation violates Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException- If the instance is not found or not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- If the current context does not exist or is not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the remove operation
-
removeFromContext
public List<org.gcube.informationsystem.model.reference.ERElement> removeFromContext(org.gcube.informationsystem.model.reference.ERElement er, Boolean dryRun) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Removes an Information System element instance from the caller's current context, using a provided instance object.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
removeFromContextin interfaceResourceRegistryPublisher- Parameters:
er- The instance to remove from the current context (must contain a valid UUID in the header)dryRun- Whether to perform a dry-run (true) or apply actual changes (false)- Returns:
- List of all elements affected by this operation (including the instance itself and any related elements)
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the operation violates Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException- If the instance is not found or not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- If the current context does not exist or is not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the remove operation
-
removeFromContext
public List<org.gcube.informationsystem.model.reference.ERElement> removeFromContext(org.gcube.informationsystem.model.reference.ERElement er, org.gcube.informationsystem.resourceregistry.api.rest.PropagationMode propagationMode, Boolean dryRun) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Removes an Information System element instance from the caller's current context, using a provided instance object and controlling how the removal propagates to related elements.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
removeFromContextin interfaceResourceRegistryPublisher- Parameters:
er- The instance to remove from the current context (must contain a valid UUID in the header)propagationMode- How removal propagates (shalloworsurgical);deepis corrected toshallow, andnulluses the server defaultdryRun- Whether to perform a dry-run (true) or apply actual changes (false)- Returns:
- List of all elements affected by this operation (including the instance itself and any related elements)
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the operation violates Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException- If the instance is not found or not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- If the current context does not exist or is not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the remove operation
-
removeFromCurrentContext
public List<org.gcube.informationsystem.model.reference.ERElement> removeFromCurrentContext(String type, UUID instanceUUID, Boolean dryRun) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Alias ofResourceRegistryPublisher.removeFromContext(String, UUID, Boolean)— removal already targets the caller's current context; kept for naming symmetry withResourceRegistryPublisher.addToCurrentContext(String, UUID, Boolean).Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
removeFromCurrentContextin interfaceResourceRegistryPublisher- Parameters:
type- The exact type name of the Information System element to removeinstanceUUID- The UUID of the instance to remove from the current contextdryRun- Whether to perform a dry-run (true) or apply actual changes (false)- Returns:
- List of all elements affected by this operation (including the instance itself and any related elements)
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the operation violates Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException- If the instance is not found or not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- If the current context does not exist or is not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the remove operation
-
removeFromCurrentContext
public List<org.gcube.informationsystem.model.reference.ERElement> removeFromCurrentContext(String type, UUID instanceUUID, org.gcube.informationsystem.resourceregistry.api.rest.PropagationMode propagationMode, Boolean dryRun) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Alias ofResourceRegistryPublisher.removeFromContext(String, UUID, PropagationMode, Boolean)— removal already targets the caller's current context; kept for naming symmetry with theaddToCurrentContextfamily.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
removeFromCurrentContextin interfaceResourceRegistryPublisher- Parameters:
type- The exact type name of the Information System element to removeinstanceUUID- The UUID of the instance to remove from the current contextpropagationMode- How removal propagates (shalloworsurgical);deepis corrected toshallow, andnulluses the server defaultdryRun- Whether to perform a dry-run (true) or apply actual changes (false)- Returns:
- List of all elements affected by this operation (including the instance itself and any related elements)
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the operation violates Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException- If the instance is not found or not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- If the current context does not exist or is not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the remove operation
-
removeFromCurrentContext
public List<org.gcube.informationsystem.model.reference.ERElement> removeFromCurrentContext(org.gcube.informationsystem.model.reference.ERElement er, Boolean dryRun) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Alias ofResourceRegistryPublisher.removeFromContext(ERElement, Boolean)— removal already targets the caller's current context; kept for naming symmetry with theaddToCurrentContextfamily.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
removeFromCurrentContextin interfaceResourceRegistryPublisher- Parameters:
er- The instance to remove from the current context (must contain a valid UUID in the header)dryRun- Whether to perform a dry-run (true) or apply actual changes (false)- Returns:
- List of all elements affected by this operation (including the instance itself and any related elements)
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the operation violates Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException- If the instance is not found or not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- If the current context does not exist or is not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the remove operation
-
removeFromCurrentContext
public List<org.gcube.informationsystem.model.reference.ERElement> removeFromCurrentContext(org.gcube.informationsystem.model.reference.ERElement er, org.gcube.informationsystem.resourceregistry.api.rest.PropagationMode propagationMode, Boolean dryRun) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Alias ofResourceRegistryPublisher.removeFromContext(ERElement, PropagationMode, Boolean)— removal already targets the caller's current context; kept for naming symmetry with theaddToCurrentContextfamily.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
removeFromCurrentContextin interfaceResourceRegistryPublisher- Parameters:
er- The instance to remove from the current context (must contain a valid UUID in the header)propagationMode- How removal propagates (shalloworsurgical);deepis corrected toshallow, andnulluses the server defaultdryRun- Whether to perform a dry-run (true) or apply actual changes (false)- Returns:
- List of all elements affected by this operation (including the instance itself and any related elements)
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the operation violates Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException- If the instance is not found or not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- If the current context does not exist or is not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the remove operation
-
getElementContexts
public Map<UUID,String> getElementContexts(String type, UUID instanceUUID) throws org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.AvailableInAnotherContextException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Retrieves the list of contexts where a specific Information System element is present in the Resource Registry.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
getElementContextsin interfaceResourceRegistryPublisher- Parameters:
type- The exact type name of the Information System element (e.g., "EService", "ContactFacet")instanceUUID- The unique identifier of the element whose contexts to retrieve- Returns:
- Map containing context UUID to context path mappings where the element is present
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException- If no element is found with the specified type and UUIDorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.AvailableInAnotherContextException- If the element exists outside caller token subtreeorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during context retrieval
-
getElementContexts
public <ERElem extends org.gcube.informationsystem.model.reference.ERElement> Map<UUID,String> getElementContexts(ERElem er) throws org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.AvailableInAnotherContextException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Retrieves the list of contexts where a specific Information System element is present in the Resource Registry.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
getElementContextsin interfaceResourceRegistryPublisher- Type Parameters:
ERElem- The type of Information System element (Resource, Facet, ConsistsOf, or IsRelatedTo)- Parameters:
er- The Information System element whose contexts to retrieve- Returns:
- Map containing context UUID to context path mappings where the element is present
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException- If the specified element does not exist or is not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.AvailableInAnotherContextException- If the element exists outside caller token subtreeorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during context retrieval
-
addResourceToContext
public List<org.gcube.informationsystem.model.reference.ERElement> addResourceToContext(String resourceType, UUID resourceUUID, UUID contextUUID, Boolean dryRun) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Adds a Resource instance to a specific context.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
addResourceToContextin interfaceResourceRegistryPublisher- Parameters:
resourceType- The exact type name of the Resource to addresourceUUID- The UUID of the Resource instance to add to the contextcontextUUID- The UUID of the target context where the Resource should be addeddryRun- Whether to perform a dry-run (true) or apply actual changes (false)- Returns:
- List of all elements affected by this operation (including the Resource itself and any related elements)
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the operation violates Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException- If the Resource is not found or not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- If the target context does not exist or is not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the add operation
-
addResourceToContext
public <R extends org.gcube.informationsystem.model.reference.entities.Resource> List<org.gcube.informationsystem.model.reference.ERElement> addResourceToContext(R resource, UUID contextUUID, Boolean dryRun) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Adds a Resource instance to a specific context using a provided Resource object.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
addResourceToContextin interfaceResourceRegistryPublisher- Type Parameters:
R- The specific type of Resource to add- Parameters:
resource- The Resource instance to add to the context (must contain a valid UUID in the header)contextUUID- The UUID of the target context where the Resource should be addeddryRun- Whether to perform a dry-run (true) or apply actual changes (false)- Returns:
- List of all elements affected by this operation (including the Resource itself and any related elements)
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the operation violates Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException- If the Resource is not found or not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- If the target context does not exist or is not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the add operation
-
addResourceToCurrentContext
public List<org.gcube.informationsystem.model.reference.ERElement> addResourceToCurrentContext(String resourceType, UUID resourceUUID, Boolean dryRun) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Adds a Resource instance to the current context.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
addResourceToCurrentContextin interfaceResourceRegistryPublisher- Parameters:
resourceType- The exact type name of the Resource to addresourceUUID- The UUID of the Resource instance to add to the current contextdryRun- Whether to perform a dry-run (true) or apply actual changes (false)- Returns:
- List of all elements affected by this operation (including the Resource itself and any related elements)
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the operation violates Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException- If the Resource is not found or not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- If the current context cannot be determined or accessedorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the add operation
-
addResourceToCurrentContext
public <R extends org.gcube.informationsystem.model.reference.entities.Resource> List<org.gcube.informationsystem.model.reference.ERElement> addResourceToCurrentContext(R resource, Boolean dryRun) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Adds a Resource instance to the current context using a provided Resource object.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
addResourceToCurrentContextin interfaceResourceRegistryPublisher- Type Parameters:
R- The specific type of Resource to add- Parameters:
resource- The Resource instance to add to the current context (must contain a valid UUID in the header)dryRun- Whether to perform a dry-run (true) or apply actual changes (false)- Returns:
- List of all elements affected by this operation (including the Resource itself and any related elements)
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the operation violates Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException- If the Resource is not found or not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- If the current context cannot be determined or accessedorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the add operation
-
removeResourceFromContext
public List<org.gcube.informationsystem.model.reference.ERElement> removeResourceFromContext(String resourceType, UUID resourceUUID, Boolean dryRun) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Removes a Resource instance from the caller's current context.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
removeResourceFromContextin interfaceResourceRegistryPublisher- Parameters:
resourceType- The exact type name of the Resource to removeresourceUUID- The UUID of the Resource instance to remove from the current contextdryRun- Whether to perform a dry-run (true) or apply actual changes (false)- Returns:
- List of all elements affected by this operation (including the Resource itself and any related elements)
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the operation violates Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException- If the Resource is not found or not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- If the current context does not exist or is not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the remove operation
-
removeResourceFromContext
public <R extends org.gcube.informationsystem.model.reference.entities.Resource> List<org.gcube.informationsystem.model.reference.ERElement> removeResourceFromContext(R resource, Boolean dryRun) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Removes a Resource instance from the caller's current context, using a provided Resource object.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
removeResourceFromContextin interfaceResourceRegistryPublisher- Type Parameters:
R- The type of Resource (EService, HostingNode, Software, etc.)- Parameters:
resource- The Resource instance to remove from the current context (must contain a valid UUID in the header)dryRun- Whether to perform a dry-run (true) or apply actual changes (false)- Returns:
- List of all elements affected by this operation (including the Resource itself and any related elements)
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the operation violates Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException- If the Resource is not found or not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- If the current context does not exist or is not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the remove operation
-
removeResourceFromCurrentContext
public List<org.gcube.informationsystem.model.reference.ERElement> removeResourceFromCurrentContext(String resourceType, UUID resourceUUID, Boolean dryRun) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Alias ofResourceRegistryPublisher.removeResourceFromContext(String, UUID, Boolean)— removal already targets the caller's current context; kept for naming symmetry withaddResourceToCurrentContext.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
removeResourceFromCurrentContextin interfaceResourceRegistryPublisher- Parameters:
resourceType- The exact type name of the Resource to removeresourceUUID- The UUID of the Resource instance to remove from the current contextdryRun- Whether to perform a dry-run (true) or apply actual changes (false)- Returns:
- List of all elements affected by this operation (including the Resource itself and any related elements)
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the operation violates Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException- If the Resource is not found or not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- If the current context does not exist or is not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the remove operation
-
removeResourceFromCurrentContext
public <R extends org.gcube.informationsystem.model.reference.entities.Resource> List<org.gcube.informationsystem.model.reference.ERElement> removeResourceFromCurrentContext(R resource, Boolean dryRun) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Alias ofResourceRegistryPublisher.removeResourceFromContext(Resource, Boolean)— removal already targets the caller's current context; kept for naming symmetry withaddResourceToCurrentContext.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
removeResourceFromCurrentContextin interfaceResourceRegistryPublisher- Type Parameters:
R- The type of Resource (EService, HostingNode, Software, etc.)- Parameters:
resource- The Resource instance to remove from the current context (must contain a valid UUID in the header)dryRun- Whether to perform a dry-run (true) or apply actual changes (false)- Returns:
- List of all elements affected by this operation (including the Resource itself and any related elements)
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the operation violates Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException- If the Resource is not found or not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- If the current context does not exist or is not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the remove operation
-
getResourceContexts
public Map<UUID,String> getResourceContexts(String resourceType, UUID resourceUUID) throws org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Retrieves the list of contexts where a specific Resource is present in the Resource Registry.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
getResourceContextsin interfaceResourceRegistryPublisher- Parameters:
resourceType- The exact type name of the Resource (e.g., "EService", "HostingNode")resourceUUID- The unique identifier of the Resource whose contexts to retrieve- Returns:
- Map containing context UUID to context path mappings where the Resource is present
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException- If no Resource is found with the specified type and UUIDorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during context retrieval
-
getResourceContexts
public <R extends org.gcube.informationsystem.model.reference.entities.Resource> Map<UUID,String> getResourceContexts(R resource) throws org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Retrieves the list of contexts where a specific Resource is present in the Resource Registry.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
getResourceContextsin interfaceResourceRegistryPublisher- Type Parameters:
R- The type of Resource (EService, HostingNode, Software, etc.)- Parameters:
resource- The Resource instance whose contexts to retrieve- Returns:
- Map containing context UUID to context path mappings where the Resource is present
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException- If the specified Resource does not exist or is not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during context retrieval
-
addFacetToContext
public List<org.gcube.informationsystem.model.reference.ERElement> addFacetToContext(String facetType, UUID facetUUID, UUID contextUUID, Boolean dryRun) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Adds a Facet instance to a specific context using type name and UUID.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
addFacetToContextin interfaceResourceRegistryPublisher- Parameters:
facetType- The type name of the Facet to add (must be a valid Facet type)facetUUID- The UUID of the Facet instance to add to the specified contextcontextUUID- The UUID of the target context where the Facet should be addeddryRun- Whether to perform a dry-run (true) or apply actual changes (false)- Returns:
- List of all elements affected by this operation (including the Facet itself and any related elements)
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the operation violates Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException- If the Facet is not found or not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- If the target context cannot be determined or accessedorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the add operation
-
addFacetToContext
public <F extends org.gcube.informationsystem.model.reference.entities.Facet> List<org.gcube.informationsystem.model.reference.ERElement> addFacetToContext(F facet, UUID contextUUID, Boolean dryRun) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Adds a Facet instance to a specific context using a provided Facet object.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
addFacetToContextin interfaceResourceRegistryPublisher- Type Parameters:
F- The specific type of Facet to add- Parameters:
facet- The Facet instance to add to the specified context (must contain a valid UUID in the header)contextUUID- The UUID of the target context where the Facet should be addeddryRun- Whether to perform a dry-run (true) or apply actual changes (false)- Returns:
- List of all elements affected by this operation (including the Facet itself and any related elements)
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the operation violates Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException- If the Facet is not found or not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- If the target context cannot be determined or accessedorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the add operation
-
addFacetToCurrentContext
public List<org.gcube.informationsystem.model.reference.ERElement> addFacetToCurrentContext(String facetType, UUID facetUUID, Boolean dryRun) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Adds a Facet instance to the current context using type name and UUID.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
addFacetToCurrentContextin interfaceResourceRegistryPublisher- Parameters:
facetType- The type name of the Facet to add (must be a valid Facet type)facetUUID- The UUID of the Facet instance to add to the current contextdryRun- Whether to perform a dry-run (true) or apply actual changes (false)- Returns:
- List of all elements affected by this operation (including the Facet itself and any related elements)
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the operation violates Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException- If the Facet is not found or not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- If the current context cannot be determined or accessedorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the add operation
-
addFacetToCurrentContext
public <F extends org.gcube.informationsystem.model.reference.entities.Facet> List<org.gcube.informationsystem.model.reference.ERElement> addFacetToCurrentContext(F facet, Boolean dryRun) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Adds a Facet instance to the current context using a provided Facet object.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
addFacetToCurrentContextin interfaceResourceRegistryPublisher- Type Parameters:
F- The specific type of Facet to add- Parameters:
facet- The Facet instance to add to the current context (must contain a valid UUID in the header)dryRun- Whether to perform a dry-run (true) or apply actual changes (false)- Returns:
- List of all elements affected by this operation (including the Facet itself and any related elements)
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the operation violates Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException- If the Facet is not found or not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- If the current context cannot be determined or accessedorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the add operation
-
removeFacetFromContext
public List<org.gcube.informationsystem.model.reference.ERElement> removeFacetFromContext(String facetType, UUID facetUUID, Boolean dryRun) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Removes a Facet instance from the caller's current context.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
removeFacetFromContextin interfaceResourceRegistryPublisher- Parameters:
facetType- The exact type name of the Facet to removefacetUUID- The UUID of the Facet instance to remove from the current contextdryRun- Whether to perform a dry-run (true) or apply actual changes (false)- Returns:
- List of all elements affected by this operation (including the Facet itself and any related elements)
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the operation violates Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException- If the Facet is not found or not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- If the current context does not exist or is not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the remove operation
-
removeFacetFromContext
public <F extends org.gcube.informationsystem.model.reference.entities.Facet> List<org.gcube.informationsystem.model.reference.ERElement> removeFacetFromContext(F facet, Boolean dryRun) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Removes a Facet instance from the caller's current context, using a provided Facet object.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
removeFacetFromContextin interfaceResourceRegistryPublisher- Type Parameters:
F- The type of Facet (StateFacet, ContactFacet, AccessPointFacet, etc.)- Parameters:
facet- The Facet instance to remove from the current context (must contain a valid UUID in the header)dryRun- Whether to perform a dry-run (true) or apply actual changes (false)- Returns:
- List of all elements affected by this operation (including the Facet itself and any related elements)
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the operation violates Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException- If the Facet is not found or not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- If the current context does not exist or is not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the remove operation
-
removeFacetFromCurrentContext
public List<org.gcube.informationsystem.model.reference.ERElement> removeFacetFromCurrentContext(String facetType, UUID facetUUID, Boolean dryRun) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Alias ofResourceRegistryPublisher.removeFacetFromContext(String, UUID, Boolean)— removal already targets the caller's current context; kept for naming symmetry withaddFacetToCurrentContext.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
removeFacetFromCurrentContextin interfaceResourceRegistryPublisher- Parameters:
facetType- The exact type name of the Facet to removefacetUUID- The UUID of the Facet instance to remove from the current contextdryRun- Whether to perform a dry-run (true) or apply actual changes (false)- Returns:
- List of all elements affected by this operation (including the Facet itself and any related elements)
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the operation violates Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException- If the Facet is not found or not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- If the current context does not exist or is not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the remove operation
-
removeFacetFromCurrentContext
public <F extends org.gcube.informationsystem.model.reference.entities.Facet> List<org.gcube.informationsystem.model.reference.ERElement> removeFacetFromCurrentContext(F facet, Boolean dryRun) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Alias ofResourceRegistryPublisher.removeFacetFromContext(Facet, Boolean)— removal already targets the caller's current context; kept for naming symmetry withaddFacetToCurrentContext.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
removeFacetFromCurrentContextin interfaceResourceRegistryPublisher- Type Parameters:
F- The type of Facet (StateFacet, ContactFacet, AccessPointFacet, etc.)- Parameters:
facet- The Facet instance to remove from the current context (must contain a valid UUID in the header)dryRun- Whether to perform a dry-run (true) or apply actual changes (false)- Returns:
- List of all elements affected by this operation (including the Facet itself and any related elements)
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- If the operation violates Information System model constraintsorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException- If the Facet is not found or not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- If the current context does not exist or is not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during the remove operation
-
getFacetContexts
public Map<UUID,String> getFacetContexts(String facetType, UUID facetUUID) throws org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Retrieves the list of contexts where a specific Facet is present in the Resource Registry.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
getFacetContextsin interfaceResourceRegistryPublisher- Parameters:
facetType- The exact type name of the Facet (e.g., "ContactFacet", "StateFacet")facetUUID- The unique identifier of the Facet whose contexts to retrieve- Returns:
- Map containing context UUID to context path mappings where the Facet is present
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException- If no Facet is found with the specified type and UUIDorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during context retrieval
-
getFacetContexts
public <F extends org.gcube.informationsystem.model.reference.entities.Facet> Map<UUID,String> getFacetContexts(F facet) throws org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Retrieves the list of contexts where a specific Facet is present in the Resource Registry.Invocation-specific options and immutable response metadata are available through
RequestInfo.serverResponses().- Specified by:
getFacetContextsin interfaceResourceRegistryPublisher- Type Parameters:
F- The type of Facet (ContactFacet, StateFacet, AccessPointFacet, etc.)- Parameters:
facet- The Facet instance whose contexts to retrieve- Returns:
- Map containing context UUID to context path mappings where the Facet is present
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException- If the specified Facet does not exist or is not accessibleorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- If an error occurs during context retrieval
-
removeFromContext
@Deprecated public List<org.gcube.informationsystem.model.reference.ERElement> removeFromContext(String type, UUID instanceUUID, UUID contextUUID, Boolean dryRun) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Deprecated.Removes the instance from the given Context. The Resource Registry 6.0.0 removes from the Context of the caller's token only: whencontextUUIDis the current Context this method delegates to the overload without Context, otherwise it throwsUnsupportedOperationException.- Specified by:
removeFromContextin interfaceResourceRegistryPublisher- Parameters:
type- the type name of the instanceinstanceUUID- the UUID of the instancecontextUUID- the UUID of the Context to remove the instance fromdryRun- whether to simulate the removal- Returns:
- the instances affected by the removal
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- if the removal violates the schemaorg.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException- if the instance does not existorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- if the current Context cannot be resolvedorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- if an error occurs during the operation
-
removeFromContext
@Deprecated public List<org.gcube.informationsystem.model.reference.ERElement> removeFromContext(org.gcube.informationsystem.model.reference.ERElement er, UUID contextUUID, Boolean dryRun) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Deprecated.Removes the instance from the given Context. The Resource Registry 6.0.0 removes from the Context of the caller's token only: whencontextUUIDis the current Context this method delegates to the overload without Context, otherwise it throwsUnsupportedOperationException.- Specified by:
removeFromContextin interfaceResourceRegistryPublisher- Parameters:
er- the instancecontextUUID- the UUID of the Context to remove the instance fromdryRun- whether to simulate the removal- Returns:
- the instances affected by the removal
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- if the removal violates the schemaorg.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException- if the instance does not existorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- if the current Context cannot be resolvedorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- if an error occurs during the operation
-
removeResourceFromContext
@Deprecated public List<org.gcube.informationsystem.model.reference.ERElement> removeResourceFromContext(String resourceType, UUID resourceUUID, UUID contextUUID, Boolean dryRun) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Deprecated.Removes the instance from the given Context. The Resource Registry 6.0.0 removes from the Context of the caller's token only: whencontextUUIDis the current Context this method delegates to the overload without Context, otherwise it throwsUnsupportedOperationException.- Specified by:
removeResourceFromContextin interfaceResourceRegistryPublisher- Parameters:
resourceType- the type name of the ResourceresourceUUID- the UUID of the ResourcecontextUUID- the UUID of the Context to remove the Resource fromdryRun- whether to simulate the removal- Returns:
- the instances affected by the removal
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- if the removal violates the schemaorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException- if the instance does not existorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- if the current Context cannot be resolvedorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- if an error occurs during the operation
-
removeResourceFromContext
@Deprecated public <R extends org.gcube.informationsystem.model.reference.entities.Resource> List<org.gcube.informationsystem.model.reference.ERElement> removeResourceFromContext(R resource, UUID contextUUID, Boolean dryRun) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Deprecated.Removes the instance from the given Context. The Resource Registry 6.0.0 removes from the Context of the caller's token only: whencontextUUIDis the current Context this method delegates to the overload without Context, otherwise it throwsUnsupportedOperationException.- Specified by:
removeResourceFromContextin interfaceResourceRegistryPublisher- Type Parameters:
R- the Resource type- Parameters:
resource- the ResourcecontextUUID- the UUID of the Context to remove the Resource fromdryRun- whether to simulate the removal- Returns:
- the instances affected by the removal
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- if the removal violates the schemaorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException- if the instance does not existorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- if the current Context cannot be resolvedorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- if an error occurs during the operation
-
removeFacetFromContext
@Deprecated public List<org.gcube.informationsystem.model.reference.ERElement> removeFacetFromContext(String facetType, UUID facetUUID, UUID contextUUID, Boolean dryRun) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Deprecated.Removes the instance from the given Context. The Resource Registry 6.0.0 removes from the Context of the caller's token only: whencontextUUIDis the current Context this method delegates to the overload without Context, otherwise it throwsUnsupportedOperationException.- Specified by:
removeFacetFromContextin interfaceResourceRegistryPublisher- Parameters:
facetType- the type name of the FacetfacetUUID- the UUID of the FacetcontextUUID- the UUID of the Context to remove the Facet fromdryRun- whether to simulate the removal- Returns:
- the instances affected by the removal
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- if the removal violates the schemaorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException- if the instance does not existorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- if the current Context cannot be resolvedorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- if an error occurs during the operation
-
removeFacetFromContext
@Deprecated public <F extends org.gcube.informationsystem.model.reference.entities.Facet> List<org.gcube.informationsystem.model.reference.ERElement> removeFacetFromContext(F facet, UUID contextUUID, Boolean dryRun) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
Deprecated.Removes the instance from the given Context. The Resource Registry 6.0.0 removes from the Context of the caller's token only: whencontextUUIDis the current Context this method delegates to the overload without Context, otherwise it throwsUnsupportedOperationException.- Specified by:
removeFacetFromContextin interfaceResourceRegistryPublisher- Type Parameters:
F- the Facet type- Parameters:
facet- the FacetcontextUUID- the UUID of the Context to remove the Facet fromdryRun- whether to simulate the removal- Returns:
- the instances affected by the removal
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException- if the removal violates the schemaorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException- if the instance does not existorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- if the current Context cannot be resolvedorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- if an error occurs during the operation
-
-