Class 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 String address
      The base address of the Resource Registry service
      protected org.gcube.informationsystem.resourceregistry.api.contexts.ContextCache contextCache
      Cache for context information to improve performance
      protected org.gcube.informationsystem.resourceregistry.api.contexts.ContextCacheRenewal contextCacheRenewal
      Context cache renewal strategy for refreshing cached context information
      protected Map<String,​String> headers
      HTTP headers to be included in requests
      • Fields inherited from class org.gcube.informationsystem.resourceregistry.api.request.BaseRequestInfo

        allMeta, contextsPolicy, hierarchicalMode, includeMeta, limit, membershipScope, offset
      • Fields inherited from interface org.gcube.informationsystem.resourceregistry.api.request.RequestInfo

        DEFAULT_LIMIT, DEFAULT_OFFSET, UNBOUNDED_LIMIT
    • 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.
      void addHeader​(String name, boolean value)
      Adds a custom HTTP header to be included in requests.
      void addHeader​(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>
      ERElem
      create​(ERElem er)
      Creates a new instance of an Information System element in the Resource Registry, using CreatePolicy.IDEMPOTENT: every missing id, of er and of the nested instances it creates, is generated and set on er.
      <ERElem extends org.gcube.informationsystem.model.reference.ERElement>
      ERElem
      create​(ERElem er, CreatePolicy createPolicy)
      Creates a new instance of an Information System element in the Resource Registry.
      String create​(String json)
      Creates a new instance of an Information System element from JSON representation, using CreatePolicy.IDEMPOTENT.
      protected String create​(String type, String json, UUID uuid)
      Creates a new instance of the specified type in the Resource Registry.
      String create​(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>>
      C
      createConsistsOf​(C consistsOf)
      Creates a new ConsistsOf relation instance in the Resource Registry.
      String createConsistsOf​(String consistsOf)
      Creates a new ConsistsOf relation instance from JSON representation.
      <F extends org.gcube.informationsystem.model.reference.entities.Facet>
      F
      createFacet​(F facet)
      Creates a new Facet instance in the Resource Registry.
      String createFacet​(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>>
      I
      createIsRelatedTo​(I isRelatedTo)
      Creates a new IsRelatedTo relation instance in the Resource Registry.
      String createIsRelatedTo​(String isRelatedTo)
      Creates a new IsRelatedTo relation instance from JSON representation.
      String createResource​(String resource)
      Creates a new Resource instance from JSON representation.
      <R extends org.gcube.informationsystem.model.reference.entities.Resource>
      R
      createResource​(R resource)
      Creates a new Resource instance in the Resource Registry.
      <ERElem extends org.gcube.informationsystem.model.reference.ERElement>
      boolean
      delete​(ERElem er)
      Deletes an Information System element instance from the Resource Registry.
      boolean delete​(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>>
      boolean
      deleteConsistsOf​(C consistsOf)
      Deletes a ConsistsOf relation instance from the Resource Registry.
      boolean deleteConsistsOf​(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>
      boolean
      deleteFacet​(F facet)
      Deletes a Facet instance from the Resource Registry.
      boolean deleteFacet​(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>>
      boolean
      deleteIsRelatedTo​(I isRelatedTo)
      Deletes an IsRelatedTo relation instance from the Resource Registry.
      boolean deleteIsRelatedTo​(String isRelatedToType, UUID uuid)
      Deletes an IsRelatedTo relation instance from the Resource Registry by its type and UUID.
      boolean deleteResource​(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>
      boolean
      deleteResource​(R resource)
      Deletes a Resource instance from the Resource Registry.
      <ERElem extends org.gcube.informationsystem.model.reference.ERElement>
      boolean
      exist​(ERElem er)
      Checks if an Information System element instance exists in the Resource Registry.
      <ERElem extends org.gcube.informationsystem.model.reference.ERElement>
      boolean
      exist​(Class<ERElem> clazz, UUID uuid)
      Checks if an Information System element instance exists in the Resource Registry using class and UUID.
      boolean exist​(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.Context getContext​(UUID uuid)
      Retrieves a specific context by its UUID using internal cache.
      org.gcube.informationsystem.resourceregistry.api.contexts.ContextCache getContextCache()
      Gets the context cache used for context-related operations.
      protected org.gcube.informationsystem.contexts.reference.entities.Context getContextFromServer​(String uuid)
      Retrieves a specific context from the Resource Registry server.
      org.gcube.informationsystem.contexts.reference.entities.Context getContextFromServer​(UUID uuid)
      It reads the context from server.
      org.gcube.informationsystem.contexts.reference.entities.Context getCurrentContext()
      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.GXRequest getGXRequest()
      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.
      boolean isHierarchicalMode()
      <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.
      String list​(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>
      ERElem
      mergeUpdate​(ERElem er)
      Applies a partial (merge-patch) update to an existing instance, using the type and JSON embedded in er.
      String mergeUpdate​(String json)
      Applies a partial (merge-patch) update to an existing instance, using its JSON representation.
      String mergeUpdate​(String type, String json)
      Applies a partial (merge-patch) update to an existing instance, using an explicit type name and its JSON representation.
      String mergeUpdate​(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.
      String query​(String jsonQuery, Boolean polymorphic)
      Executes a JSON structural query against the instances collection.
      <ERElem extends org.gcube.informationsystem.model.reference.ERElement>
      ERElem
      read​(ERElem er)
      Reads an existing instance from the Resource Registry using a provided instance object.
      <ERElem extends org.gcube.informationsystem.model.reference.ERElement>
      ERElem
      read​(Class<ERElem> clazz, UUID uuid)
      Reads an existing instance from the Resource Registry by its type class and UUID.
      String read​(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>>
      C
      readConsistsOf​(C consistsOf)
      Reads a ConsistsOf relation instance from the Resource Registry using a provided instance object.
      String readConsistsOf​(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>
      F
      readFacet​(F facet)
      Reads a Facet instance from the Resource Registry using a provided instance object.
      String readFacet​(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>>
      I
      readIsRelatedTo​(I isRelatedTo)
      Reads an IsRelatedTo relation instance from the Resource Registry by its UUID.
      String readIsRelatedTo​(String isRelatedToType, UUID uuid)
      Reads an IsRelatedTo relation instance from the Resource Registry by its type and UUID.
      String readResource​(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>
      R
      readResource​(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 of ResourceRegistryPublisher.removeFacetFromContext(Facet, Boolean) — removal already targets the caller's current context; kept for naming symmetry with addFacetToCurrentContext.
      List<org.gcube.informationsystem.model.reference.ERElement> removeFacetFromCurrentContext​(String facetType, UUID facetUUID, Boolean dryRun)
      Alias of ResourceRegistryPublisher.removeFacetFromContext(String, UUID, Boolean) — removal already targets the caller's current context; kept for naming symmetry with addFacetToCurrentContext.
      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, UUID contextUUID, org.gcube.informationsystem.resourceregistry.api.rest.PropagationMode propagationMode, Boolean hierarchical, Boolean bypassHierarchyCheck, Boolean dryRun)
      Removes an instance from a specific context through the Remove from Context endpoint, the inverse of ResourceRegistryPublisher.addToContext(String, UUID, UUID, PropagationMode, Boolean, Boolean, Boolean), exposing every parameter of the operation.
      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 of ResourceRegistryPublisher.removeFromContext(String, UUID, Boolean) — removal already targets the caller's current context; kept for naming symmetry with ResourceRegistryPublisher.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 of ResourceRegistryPublisher.removeFromContext(String, UUID, PropagationMode, Boolean) — removal already targets the caller's current context; kept for naming symmetry with the addToCurrentContext family.
      List<org.gcube.informationsystem.model.reference.ERElement> removeFromCurrentContext​(org.gcube.informationsystem.model.reference.ERElement er, Boolean dryRun)
      Alias of ResourceRegistryPublisher.removeFromContext(ERElement, Boolean) — removal already targets the caller's current context; kept for naming symmetry with the addToCurrentContext family.
      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 of ResourceRegistryPublisher.removeFromContext(ERElement, PropagationMode, Boolean) — removal already targets the caller's current context; kept for naming symmetry with the addToCurrentContext family.
      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 of ResourceRegistryPublisher.removeResourceFromContext(String, UUID, Boolean) — removal already targets the caller's current context; kept for naming symmetry with addResourceToCurrentContext.
      <R extends org.gcube.informationsystem.model.reference.entities.Resource>
      List<org.gcube.informationsystem.model.reference.ERElement>
      removeResourceFromCurrentContext​(R resource, Boolean dryRun)
      Alias of ResourceRegistryPublisher.removeResourceFromContext(Resource, Boolean) — removal already targets the caller's current context; kept for naming symmetry with addResourceToCurrentContext.
      void setHierarchicalMode​(boolean hierarchicalMode)
      <ERElem extends org.gcube.informationsystem.model.reference.ERElement>
      ERElem
      update​(ERElem er)
      Updates an existing instance in the Resource Registry using the instance object.
      String update​(String json)
      Updates an existing instance in the Resource Registry using JSON representation.
      String update​(String type, String json)
      Updates an existing instance in the Resource Registry using type name and JSON representation.
      String update​(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>>
      C
      updateConsistsOf​(C consistsOf)
      Updates an existing ConsistsOf relation instance in the Resource Registry.
      String updateConsistsOf​(String consistsOf)
      Updates an existing ConsistsOf relation instance in the Resource Registry using JSON representation.
      <F extends org.gcube.informationsystem.model.reference.entities.Facet>
      F
      updateFacet​(F facet)
      Updates an existing Facet instance in the Resource Registry.
      String updateFacet​(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>>
      I
      updateIsRelatedTo​(I isRelatedTo)
      Updates an existing IsRelatedTo relation instance in the Resource Registry.
      String updateIsRelatedTo​(String isRelatedTo)
      Updates an existing IsRelatedTo relation instance from JSON representation.
      String updateResource​(String resource)
      Updates an existing Resource instance in the Resource Registry using JSON representation.
      <R extends org.gcube.informationsystem.model.reference.entities.Resource>
      R
      updateResource​(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 interface org.gcube.informationsystem.resourceregistry.api.request.RequestInfo

        allMeta, getContextsPolicy, getLimit, getMembershipScope, getOffset, includeMeta, serverResponses, setAllMeta, setContextsPolicy, setIncludeMeta, setLimit, setMembershipScope, setOffset
    • Field Detail

      • address

        protected final String address
        The base address of the Resource Registry service
      • headers

        protected Map<String,​String> headers
        HTTP headers to be included in requests
      • 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 service
        sharedContextCache - Whether to use a shared context cache instance or create a new one
    • Method Detail

      • isHierarchicalMode

        public boolean isHierarchicalMode()
        Specified by:
        isHierarchicalMode in interface org.gcube.informationsystem.resourceregistry.api.request.RequestInfo
        Overrides:
        isHierarchicalMode in class org.gcube.informationsystem.resourceregistry.api.request.BaseRequestInfo
      • setHierarchicalMode

        public void setHierarchicalMode​(boolean hierarchicalMode)
        Specified by:
        setHierarchicalMode in interface org.gcube.informationsystem.resourceregistry.api.request.RequestInfo
        Overrides:
        setHierarchicalMode in class org.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:
        addHeader in interface ResourceRegistryPublisher
        Parameters:
        name - Header name
        value - 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:
        addHeader in interface ResourceRegistryPublisher
        Parameters:
        name - Header name
        value - 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 response
        offset - The offset for pagination
        limit - 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:
        getAllContexts in interface ResourceRegistryPublisher
        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:
        getContextCache in interface ResourceRegistryPublisher
        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 found
        org.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 found
        org.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:
        getContext in interface ResourceRegistryPublisher
        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 accessible
        org.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.ResourceRegistryException
        Retrieves 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:
        getCurrentContext in interface ResourceRegistryPublisher
        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 accessed
        org.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 RequestInfo.serverResponses().

        Implementation Details: Type Resolution:
        • 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).
        Request Configuration:
        • 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.
        Response Processing:
        • Receives JSON array from server
        • Unmarshals JSON to List of typed objects using ElementMapper
        • Returns strongly-typed list for type-safe usage.
        Error Handling:
        • ResourceRegistryExceptions propagated directly from server
        • JSON marshalling/unmarshalling errors are wrapped in RuntimeException;.
        Specified by:
        list in interface ResourceRegistryPublisher
        Type Parameters:
        ERElem - The specific type of Information System element to retrieve
        Parameters:
        clazz - The class representing the type of instances to retrieve
        polymorphic - 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
      • 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 RequestInfo.serverResponses().

        Implementation Details: REST API Call:
        • Makes HTTP GET request to /instances/{type-name} endpoint
        • Sets Accept header to application/json for JSON response
        • Includes type name as path parameter.
        Query Parameters:
        • 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.
        Response Handling:
        • 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.
        HTTP Configuration:
        • Uses GXRequest for HTTP communication
        • Includes authorization headers automatically via base request configuration
        • Response processed via HTTPUtility.getResponse(Class, GXResponse) for proper error handling.
        Error Handling:
        • ResourceRegistryExceptions propagated directly from server
        • Other exceptions wrapped in RuntimeException
        • HTTP errors converted to appropriate Resource Registry exceptions.
        Specified by:
        list in interface ResourceRegistryPublisher
        Parameters:
        type - The name of the Information System type whose instances to retrieve
        polymorphic - 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
      • 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/query with the X-HTTP-Method-Override: QUERY header, the RFC 10008 QUERY network-compatibility fallback, since this client's HTTP layer cannot send a native QUERY request.

        Specified by:
        query in interface ResourceRegistryPublisher
        Parameters:
        jsonQuery - JSON object describing the structure to search for
        polymorphic - 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 invalid
        org.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 create
        json - The JSON representation of the instance
        uuid - 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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.AlreadyPresentException - If an instance with the same UUID already exists
        org.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.IDEMPOTENT uses PUT: repeating the exact same call converges on the same graph state. Only the id of the root instance is generated when missing; the rest of json is sent as it is, so the id of every nested Facet/ConsistsOf/IsRelatedTo must already be set. CreatePolicy.NON_IDEMPOTENT uses POST: two identical calls always create two distinct instances, but every id is 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:
        create in interface ResourceRegistryPublisher
        Parameters:
        type - the concrete type name of the instance to create
        json - JSON representation of the instance to create
        createPolicy - selects the PUT (idempotent) or POST (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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.AlreadyPresentException - If a supplied id, root or nested, already identifies an existing element of the same type
        org.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.ResourceRegistryException
        Creates a new instance of an Information System element in the Resource Registry, using CreatePolicy.IDEMPOTENT: every missing id, of er and of the nested instances it creates, is generated and set on er.

        Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses().

        Specified by:
        create in interface ResourceRegistryPublisher
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.AlreadyPresentException - If an instance with the same UUID already exists
        org.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.ResourceRegistryException
        Creates 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:
        create in interface ResourceRegistryPublisher
        Type Parameters:
        ERElem - The specific type of Information System element to create
        Parameters:
        er - The instance to create in the Resource Registry
        createPolicy - CreatePolicy.IDEMPOTENT generates every missing id, of er and of the nested instances it creates, and sets it on er; CreatePolicy.NON_IDEMPOTENT honors any id present 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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.AlreadyPresentException - If a supplied id, root or nested, already identifies an existing element of the same type
        org.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, using CreatePolicy.IDEMPOTENT. Only the id of the root instance is generated when missing; the rest of json is sent as it is.

        Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses().

        Specified by:
        create in interface ResourceRegistryPublisher
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.AlreadyPresentException - If an instance with the same UUID already exists
        org.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.ResourceRegistryException
        Checks if an Information System element instance exists in the Resource Registry.

        Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses().

        Implementation Details: Type and UUID Extraction:
        • 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.
        Validation:
        • 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:
        exist in interface ResourceRegistryPublisher
        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 context
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - If an error occurs during the existence check
      • 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 RequestInfo.serverResponses().

        Implementation Details: Type Resolution:
        • 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.
        Class Validation:
        • The class must be a valid Information System model type
        • Type name resolution is performed using the TypeUtility for consistency.
        Specified by:
        exist in interface ResourceRegistryPublisher
        Type Parameters:
        ERElem - The specific type of Information System element to check
        Parameters:
        clazz - The class representing the type of instance to check
        uuid - 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 context
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - If an error occurs during the existence check
      • 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 RequestInfo.serverResponses().

        Implementation Details: Request Configuration:
        • Makes HTTP HEAD request to the instances endpoint
        • Includes hierarchical mode parameter if enabled via client configuration.
        Response Handling:
        • 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.
        Authentication:
        • Uses automatic authorization headers via the base request configuration
        • User permissions are validated server-side.
        Logging:
        • 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:
        exist in interface ResourceRegistryPublisher
        Parameters:
        type - The name of the Information System type to check
        uuid - 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 context
        org.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.ResourceRegistryException
        Reads an existing instance from the Resource Registry using a provided instance object.

        Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses().

        Implementation Details: Type and UUID Extraction:
        • 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.
        Response Processing:
        • 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.
        Type Safety:
        • Uses @SuppressWarnings("unchecked") for the type casting from ERElement to ResourceRegistryPublisherImpl
        • 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.
        Error Handling:
        • 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:
        read in interface ResourceRegistryPublisher
        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 UUID
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.AvailableInAnotherContextException - If the instance exists but is not accessible in the current context
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - If an error occurs during instance retrieval
      • 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 RequestInfo.serverResponses().

        Implementation Details: Type Resolution:
        • 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.
        Response Processing:
        • 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.
        Type Safety:
        • Uses @SuppressWarnings("unchecked") for the type casting from ERElement to ResourceRegistryPublisherImpl
        • Type safety is ensured by using the class parameter for type resolution
        • The returned object will be of exactly the specified class type.
        Class Validation:
        • The class must be a valid Information System model type
        • Type name resolution is performed using the TypeUtility for consistency with other methods.
        Error Handling:
        • ResourceRegistryExceptions from the delegated method are propagated directly
        • JSON unmarshalling errors are wrapped in RuntimeException.
        Specified by:
        read in interface ResourceRegistryPublisher
        Type Parameters:
        ERElem - The specific type of Entity or Relation to read
        Parameters:
        clazz - The class of the Entity or Relation type to read
        uuid - 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 type
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.AvailableInAnotherContextException - If the instance exists but is not accessible in the current context
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - If an error occurs during instance retrieval
      • 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 RequestInfo.serverResponses().

        Implementation Details: REST API Call:
        • 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.
        Request Configuration:
        • Uses GXRequest for HTTP communication
        • Includes authorization headers automatically via base request configuration
        • Automatically includes additional query parameters from client configuration:
        • hierarchicalMode: Whether to search in parent contexts
        • contextsPolicy: Where the response carries the contexts membership map
        • membershipScope: The Context boundary of the memberships listed by every contexts map
        • includeMeta: Whether to include metadata in response
        • allMeta: Whether to include metadata for all nested instances.
        Query Parameters:
        • Additional query parameters are included
        • Parameters are based on the current client configuration state
        • Supports hierarchical context navigation when enabled.
        Response Handling:
        • 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.
        Logging:
        • 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.
        Error Handling:
        • ResourceRegistryExceptions propagated directly from server
        • Other exceptions wrapped in RuntimeException.
        Specified by:
        read in interface ResourceRegistryPublisher
        Parameters:
        type - The exact type name of the Entity or Relation to read
        uuid - 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 type
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.AvailableInAnotherContextException - If the instance exists but is not accessible in the current context
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - If an error occurs during instance retrieval
      • 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.ResourceRegistryException
        Updates an existing instance in the Resource Registry using the instance object.

        Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses().

        Implementation Details: Instance Validation:
        • 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.
        Marshalling Process:
        • 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.
        REST API Implementation:
        • 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.
        Response Processing:
        • 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).
        Error Handling:
        • ResourceRegistryExceptions from server are propagated directly
        • JSON marshalling/unmarshalling errors are wrapped in RuntimeException
        • HTTP communication errors are handled by the underlying HTTP utility.
        Query Parameters Included:
        • contextsPolicy: Where the response carries the contexts membership map
        • membershipScope: The Context boundary of the memberships listed by every contexts map
        • includeMeta: Whether to include metadata in the response
        • allMeta: Whether to include metadata for all nested instances.
        Specified by:
        update in interface ResourceRegistryPublisher
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException - If the instance to update does not exist
        org.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 RequestInfo.serverResponses().

        Implementation Details: JSON Processing:
        • Uses Jackson ObjectMapper to parse the input JSON string into a JsonNode
        • Extracts the type name from the JSON using TypeUtility.getTypeName(JsonNode)
        • The JSON must contain the @class property indicating the instance type.
        UUID Validation:
        • 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 Resolution:
        • Type name must be present in the JSON as @class property
        • Uses TypeUtility to extract the type name from the JSON structure
        • Type name is used as path parameter in the REST API call.
        Processing Flow:
        • 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.
        Error Handling:
        • ResourceRegistryExceptions from server are propagated directly
        • JSON parsing errors are wrapped in RuntimeException
        • Missing @class property or invalid JSON structure cause exceptions.
        Specified by:
        update in interface ResourceRegistryPublisher
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException - If the instance to update does not exist
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - If an error occurs during instance update
      • 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 RequestInfo.serverResponses().

        Implementation Details: UUID Extraction:
        • 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.
        JSON Validation:
        • 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.
        Processing Flow:
        • 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.
        Error Handling:
        • ResourceRegistryExceptions from server are propagated directly
        • JSON parsing errors are wrapped in RuntimeException
        • Missing or invalid UUID in JSON causes exceptions.
        Specified by:
        update in interface ResourceRegistryPublisher
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException - If the instance to update or the specified type does not exist
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - If an error occurs during instance update
      • 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 RequestInfo.serverResponses().

        Implementation Details: REST API Implementation:
        • 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.
        Request Configuration:
        • Uses GXRequest for 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 map
        • membershipScope: The Context boundary of the memberships listed by every contexts map
        • includeMeta: Whether to include metadata in response
        • allMeta: Whether to include metadata for all nested instances.
        Update Semantics:
        • 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.
        Response Handling:
        • 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.
        Logging:
        • 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.
        Error Handling:
        • ResourceRegistryExceptions propagated directly from server
        • HTTP 404 errors converted to NotFoundException if instance doesn't exist
        • HTTP 403 errors and context accessibility issues converted to appropriate exceptions
        • Other exceptions wrapped in RuntimeException.
        Specified by:
        update in interface ResourceRegistryPublisher
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException - If the instance with the specified UUID or the specified type does not exist
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - If an error occurs during instance update
      • 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.ResourceRegistryException
        Applies a partial (merge-patch) update to an existing instance, using the type and JSON embedded in er.

        Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses().

        Specified by:
        mergeUpdate in interface ResourceRegistryPublisher
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException - If the instance to update does not exist
        org.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:
        mergeUpdate in interface ResourceRegistryPublisher
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException - If the instance to update does not exist
        org.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:
        mergeUpdate in interface ResourceRegistryPublisher
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException - If the instance to update or the specified type does not exist
        org.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} with Content-Type: application/merge-patch+json; the server validates exact path/body identity.

        Specified by:
        mergeUpdate in interface ResourceRegistryPublisher
        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 arguments
        uuid - 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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException - If the instance with the specified UUID or the specified type does not exist
        org.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.ResourceRegistryException
        Deletes an Information System element instance from the Resource Registry.

        Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses().

        Implementation Details: Instance Identification:
        • 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.
        Type and UUID Validation:
        • 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.
        Cascading Effects:
        • 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.
        Error Handling:
        • ResourceRegistryExceptions from server are propagated directly
        • Missing UUID or invalid instance structure cause exceptions
        • Referential integrity violations result in appropriate server exceptions.
        Specified by:
        delete in interface ResourceRegistryPublisher
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException - If the instance does not exist or is not accessible
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - If an error occurs during the delete operation
      • 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 RequestInfo.serverResponses().

        Implementation Details: REST API Call:
        • 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.
        Request Configuration:
        • Uses GXRequest for 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.
        Deletion Semantics:
        • 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).
        Cascading Behavior:
        • 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.
        Response Handling:
        • Server response is processed but content is not returned to caller
        • Always returns true when deletion is successful
        • Exceptions are thrown for error conditions rather than returning false
        • Response processed via HTTPUtility.getResponse(Class, GXResponse) for proper error handling.
        Logging:
        • 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.
        Error Handling:
        • ResourceRegistryExceptions propagated directly from server
        • HTTP 404 errors converted to NotFoundException if 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:
        delete in interface ResourceRegistryPublisher
        Parameters:
        type - The exact type name of the ERElement to delete
        uuid - 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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException - If the instance does not exist or is not accessible
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - If an error occurs during the delete operation
      • 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} with propagationMode and dryRun as explicit query parameters.

        Specified by:
        delete in interface ResourceRegistryPublisher
        Parameters:
        type - The exact type name of the ERElement to remove
        uuid - The UUID of the instance to remove
        propagationMode - How removal propagates (shallow or surgical); deep is corrected to shallow, and null uses the server default
        dryRun - 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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException - If the instance does not exist or is not accessible
        org.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:
        delete in interface ResourceRegistryPublisher
        Parameters:
        er - The instance to remove (must contain a valid UUID in the header)
        propagationMode - How removal propagates (shallow or surgical); deep is corrected to shallow, and null uses the server default
        dryRun - 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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException - If the instance does not exist or is not accessible
        org.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.ResourceRegistryException
        Creates a new Facet instance in the Resource Registry.

        Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses().

        This method is a type-safe wrapper that delegates to create(ERElement) for implementation details.
        Specified by:
        createFacet in interface ResourceRegistryPublisher
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetAlreadyPresentException - If a facet with the same UUID already exists
        org.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 RequestInfo.serverResponses().

        This method is a type-safe wrapper that delegates to create(String) for implementation details.
        Specified by:
        createFacet in interface ResourceRegistryPublisher
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetAlreadyPresentException - If a facet with the same UUID already exists
        org.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.ResourceRegistryException
        Reads a Facet instance from the Resource Registry using a provided instance object.

        Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses().

        This method is a type-safe wrapper that delegates to read(ERElement) for implementation details.
        Specified by:
        readFacet in interface ResourceRegistryPublisher
        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 UUID
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetAvailableInAnotherContextException - If the Facet exists but is not accessible in the current context
        org.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 RequestInfo.serverResponses().

        This method is a type-safe wrapper that delegates to read(String, UUID) for implementation details.
        Specified by:
        readFacet in interface ResourceRegistryPublisher
        Parameters:
        facetType - The exact type name of the Facet to read
        uuid - 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 type
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetAvailableInAnotherContextException - If the Facet exists but is not accessible in the current context
        org.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.ResourceRegistryException
        Updates an existing Facet instance in the Resource Registry.

        Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses().

        This method is a type-safe wrapper that delegates to update(ERElement) for implementation details.
        Specified by:
        updateFacet in interface ResourceRegistryPublisher
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException - If the Facet to update does not exist
        org.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 RequestInfo.serverResponses().

        This method is a type-safe wrapper that delegates to update(String) for implementation details.
        Specified by:
        updateFacet in interface ResourceRegistryPublisher
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException - If the Facet to update does not exist
        org.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.ResourceRegistryException
        Deletes a Facet instance from the Resource Registry.

        Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses().

        This method is a type-safe wrapper that delegates to delete(ERElement) for implementation details.
        Specified by:
        deleteFacet in interface ResourceRegistryPublisher
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException - If the Facet does not exist or is not accessible
        org.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 RequestInfo.serverResponses().

        This method is a type-safe wrapper that delegates to delete(String, UUID) for implementation details.
        Specified by:
        deleteFacet in interface ResourceRegistryPublisher
        Parameters:
        facetType - The exact type name of the Facet to delete
        uuid - 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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException - If the Facet does not exist or is not accessible
        org.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.ResourceRegistryException
        Creates a new Resource instance in the Resource Registry.

        Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses().

        This method is a type-safe wrapper that delegates to create(ERElement) for implementation details.
        Specified by:
        createResource in interface ResourceRegistryPublisher
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceAlreadyPresentException - If a resource with the same UUID already exists
        org.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 RequestInfo.serverResponses().

        This method is a type-safe wrapper that delegates to create(String) for implementation details.
        Specified by:
        createResource in interface ResourceRegistryPublisher
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceAlreadyPresentException - If a resource with the same UUID already exists
        org.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.ResourceRegistryException
        Reads a Resource instance from the Resource Registry using a provided instance object.

        Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses().

        This method is a type-safe wrapper that delegates to read(ERElement) for implementation details.
        Specified by:
        readResource in interface ResourceRegistryPublisher
        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 UUID
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceAvailableInAnotherContextException - If the Resource exists but is not accessible in the current context
        org.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 RequestInfo.serverResponses().

        This method is a type-safe wrapper that delegates to read(String, UUID) for implementation details.
        Specified by:
        readResource in interface ResourceRegistryPublisher
        Parameters:
        resourceType - The exact type name of the Resource to read
        uuid - 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 type
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceAvailableInAnotherContextException - If the Resource exists but is not accessible in the current context
        org.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.ResourceRegistryException
        Updates an existing Resource instance in the Resource Registry.

        Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses().

        This method is a type-safe wrapper that delegates to update(ERElement) for implementation details.
        Specified by:
        updateResource in interface ResourceRegistryPublisher
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException - If the Resource to update does not exist
        org.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 RequestInfo.serverResponses().

        This method is a type-safe wrapper that delegates to update(String) for implementation details.
        Specified by:
        updateResource in interface ResourceRegistryPublisher
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException - If the Resource to update does not exist
        org.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.ResourceRegistryException
        Deletes a Resource instance from the Resource Registry.

        Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses().

        This method is a type-safe wrapper that delegates to delete(ERElement) for implementation details.
        Specified by:
        deleteResource in interface ResourceRegistryPublisher
        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 accessible
        org.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 RequestInfo.serverResponses().

        This method is a type-safe wrapper that delegates to delete(String, UUID) for implementation details.
        Specified by:
        deleteResource in interface ResourceRegistryPublisher
        Parameters:
        resourceType - The exact type name of the Resource to delete
        uuid - 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 accessible
        org.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.ResourceRegistryException
        Creates a new ConsistsOf relation instance in the Resource Registry.

        Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses().

        This method is a type-safe wrapper that delegates to create(ERElement) for implementation details.
        Specified by:
        createConsistsOf in interface ResourceRegistryPublisher
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.consistsof.ConsistsOfAlreadyPresentException - If a relation with the same UUID already exists
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException - If the source Resource or target Facet does not exist
        org.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 RequestInfo.serverResponses().

        This method is a type-safe wrapper that delegates to create(String) for implementation details.
        Specified by:
        createConsistsOf in interface ResourceRegistryPublisher
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.consistsof.ConsistsOfAlreadyPresentException - If a relation with the same UUID already exists
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException - If the source Resource or target Facet does not exist
        org.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.ResourceRegistryException
        Reads a ConsistsOf relation instance from the Resource Registry using a provided instance object.

        Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses().

        This method is a type-safe wrapper that delegates to read(ERElement) for implementation details.
        Specified by:
        readConsistsOf in interface ResourceRegistryPublisher
        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 UUID
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.consistsof.ConsistsOfAvailableInAnotherContextException - If the relation exists but is not accessible in the current context
        org.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 RequestInfo.serverResponses().

        This method is a type-safe wrapper that delegates to read(String, UUID) for implementation details.
        Specified by:
        readConsistsOf in interface ResourceRegistryPublisher
        Parameters:
        consistsOfType - The exact type name of the ConsistsOf relation to read
        uuid - 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 type
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.consistsof.ConsistsOfAvailableInAnotherContextException - If the relation exists but is not accessible in the current context
        org.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.ResourceRegistryException
        Updates an existing ConsistsOf relation instance in the Resource Registry.

        Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses().

        This method is a type-safe wrapper that delegates to update(ERElement) for implementation details.
        Specified by:
        updateConsistsOf in interface ResourceRegistryPublisher
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.consistsof.ConsistsOfNotFoundException - If the ConsistsOf relation to update does not exist
        org.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 RequestInfo.serverResponses().

        This method is a type-safe wrapper that delegates to update(String) for implementation details.
        Specified by:
        updateConsistsOf in interface ResourceRegistryPublisher
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.consistsof.ConsistsOfNotFoundException - If the ConsistsOf relation to update does not exist
        org.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.ResourceRegistryException
        Deletes a ConsistsOf relation instance from the Resource Registry.

        Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses().

        This method is a type-safe wrapper that delegates to delete(ERElement) for implementation details.
        Specified by:
        deleteConsistsOf in interface ResourceRegistryPublisher
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.consistsof.ConsistsOfNotFoundException - If the ConsistsOf relation does not exist or is not accessible
        org.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 RequestInfo.serverResponses().

        This method is a type-safe wrapper that delegates to delete(String, UUID) for implementation details.
        Specified by:
        deleteConsistsOf in interface ResourceRegistryPublisher
        Parameters:
        consistsOfType - The exact type name of the ConsistsOf relation to delete
        uuid - 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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.consistsof.ConsistsOfNotFoundException - If the ConsistsOf relation does not exist or is not accessible
        org.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.ResourceRegistryException
        Creates a new IsRelatedTo relation instance in the Resource Registry.

        Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses().

        This method is a type-safe wrapper that delegates to create(ERElement) for implementation details.
        Specified by:
        createIsRelatedTo in interface ResourceRegistryPublisher
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.isrelatedto.IsRelatedToAlreadyPresentException - If a relation with the same UUID already exists
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException - If the source or target Resource does not exist
        org.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 RequestInfo.serverResponses().

        This method is a type-safe wrapper that delegates to create(String) for implementation details.
        Specified by:
        createIsRelatedTo in interface ResourceRegistryPublisher
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.isrelatedto.IsRelatedToAlreadyPresentException - If a relation with the same UUID already exists
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException - If the source or target Resource does not exist
        org.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.ResourceRegistryException
        Reads an IsRelatedTo relation instance from the Resource Registry by its UUID.

        Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses().

        This method is a type-safe wrapper that delegates to read(ERElement) for implementation details.
        Specified by:
        readIsRelatedTo in interface ResourceRegistryPublisher
        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 UUID
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.isrelatedto.IsRelatedToAvailableInAnotherContextException - If the IsRelatedTo relation is not accessible in the current context
        org.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 RequestInfo.serverResponses().

        This method is a type-safe wrapper that delegates to read(String, UUID) for implementation details.
        Specified by:
        readIsRelatedTo in interface ResourceRegistryPublisher
        Parameters:
        isRelatedToType - The exact type name of the IsRelatedTo relation to read
        uuid - 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 type
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.isrelatedto.IsRelatedToAvailableInAnotherContextException - If the relation exists but is not accessible in the current context
        org.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.ResourceRegistryException
        Updates an existing IsRelatedTo relation instance in the Resource Registry.

        Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses().

        This method is a type-safe wrapper that delegates to update(ERElement) for implementation details.
        Specified by:
        updateIsRelatedTo in interface ResourceRegistryPublisher
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.isrelatedto.IsRelatedToNotFoundException - If no relation is found with the specified UUID
        org.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 RequestInfo.serverResponses().

        This method is a type-safe wrapper that delegates to update(String) for implementation details.
        Specified by:
        updateIsRelatedTo in interface ResourceRegistryPublisher
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.isrelatedto.IsRelatedToNotFoundException - If no relation is found with the specified UUID
        org.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.ResourceRegistryException
        Deletes an IsRelatedTo relation instance from the Resource Registry.

        Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses().

        This method is a type-safe wrapper that delegates to delete(ERElement) for implementation details.
        Specified by:
        deleteIsRelatedTo in interface ResourceRegistryPublisher
        Type Parameters:
        I - The specific type of IsRelatedTo relation to delete
        Parameters:
        isRelatedTo - Instance object containing at least the UUID in the header
        Returns:
        true if the IsRelatedTo relation was successfully deleted, false otherwise
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.isrelatedto.IsRelatedToNotFoundException - If no relation is found with the specified UUID
        org.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 RequestInfo.serverResponses().

        This method is a type-safe wrapper that delegates to delete(String, UUID) for implementation details.
        Specified by:
        deleteIsRelatedTo in interface ResourceRegistryPublisher
        Parameters:
        isRelatedToType - The exact type name of the IsRelatedTo relation to delete
        uuid - The unique identifier of the IsRelatedTo relation to delete
        Returns:
        true if the IsRelatedTo relation was successfully deleted, false otherwise
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.relations.isrelatedto.IsRelatedToNotFoundException - If no relation is found with the specified UUID and type
        org.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:
        addToContext in interface ResourceRegistryPublisher
        Parameters:
        type - The exact type name of the Information System element to add
        instanceUUID - The UUID of the instance to add to the context
        contextUUID - The UUID of the target context where the instance should be added
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException - If the instance or context is not found or not accessible
        org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - If the target context does not exist or is not accessible
        org.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:
        addToContext in interface ResourceRegistryPublisher
        Parameters:
        type - The exact type name of the Information System element to add
        instanceUUID - The UUID of the instance to add to the context
        contextUUID - The UUID of the target context where the instance should be added
        propagationMode - How the add avalanche propagates to related elements, or null for 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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException - If the instance or context is not found or not accessible
        org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - If the target context does not exist or is not accessible
        org.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=true and bypassHierarchyCheck=true are reserved to IS-Manager, Infrastructure-Manager and IS-Admin: the server rejects them for any other role. A null argument 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} with propagationMode, hierarchical, bypassHierarchyCheck and dryRun as explicit query parameters; a null argument is not sent.

        Specified by:
        addToContext in interface ResourceRegistryPublisher
        Parameters:
        type - The exact type name of the Information System element to add
        instanceUUID - The UUID of the instance to add to the context
        contextUUID - The UUID of the target context where the instance should be added
        propagationMode - How the add avalanche propagates to related elements, or null for the server default (shallow)
        hierarchical - Whether the instance is added to the target context and to its whole subtree, or null for the server default (false)
        bypassHierarchyCheck - Whether the target context may be any live context instead of only the token context subtree and its siblings, or null for 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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException - If the instance or context is not found or not accessible
        org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - If the target context does not exist or is not accessible
        org.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,
                                                                                             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
        Removes an instance from a specific context through the Remove from Context endpoint, the inverse of ResourceRegistryPublisher.addToContext(String, UUID, UUID, PropagationMode, Boolean, Boolean, Boolean), exposing every parameter of the operation. The instance is deleted when it leaves its last context.

        hierarchical=true and bypassHierarchyCheck=true are reserved to IS-Manager, Infrastructure-Manager and IS-Admin: the server rejects them for any other role. A null argument is not sent, so that the server default applies.

        Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses().

        Issues DELETE /instances/{type}/{instance-uuid}/contexts/{context-uuid}; a null argument is not sent.

        Specified by:
        removeFromContext in interface ResourceRegistryPublisher
        Parameters:
        type - The exact type name of the Information System element to remove
        instanceUUID - The UUID of the instance to remove from the context
        contextUUID - The UUID of the context the instance is removed from
        propagationMode - How the removal propagates to related elements, or null for the server default (shallow)
        hierarchical - Whether the instance is removed from the context and from its whole subtree, or null for the server default (false)
        bypassHierarchyCheck - Whether the context may be any live context instead of only the token context subtree and its siblings, or null for 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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException - If the instance is not found or not accessible
        org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - If the context does not exist or is not accessible
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - If an error occurs during the remove 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:
        addToContext in interface ResourceRegistryPublisher
        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 added
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException - If the instance or context is not found or not accessible
        org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - If the target context does not exist or is not accessible
        org.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:
        addToContext in interface ResourceRegistryPublisher
        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 added
        propagationMode - How the add avalanche propagates to related elements, or null for 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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException - If the instance or context is not found or not accessible
        org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - If the target context does not exist or is not accessible
        org.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:
        addToCurrentContext in interface ResourceRegistryPublisher
        Parameters:
        type - The exact type name of the Information System element to add
        instanceUUID - The UUID of the instance to add to the current context
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException - If the instance is not found or not accessible
        org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - If the current context cannot be determined or accessed
        org.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:
        addToCurrentContext in interface ResourceRegistryPublisher
        Parameters:
        type - The exact type name of the Information System element to add
        instanceUUID - The UUID of the instance to add to the current context
        propagationMode - How the add avalanche propagates to related elements, or null for 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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException - If the instance is not found or not accessible
        org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - If the current context cannot be determined or accessed
        org.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:
        addToCurrentContext in interface ResourceRegistryPublisher
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException - If the instance is not found or not accessible
        org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - If the current context cannot be determined or accessed
        org.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:
        addToCurrentContext in interface ResourceRegistryPublisher
        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, or null for 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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException - If the instance is not found or not accessible
        org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - If the current context cannot be determined or accessed
        org.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:
        removeFromContext in interface ResourceRegistryPublisher
        Parameters:
        type - The exact type name of the Information System element to remove
        instanceUUID - The UUID of the instance to remove from the current context
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException - If the instance is not found or not accessible
        org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - If the current context does not exist or is not accessible
        org.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:
        removeFromContext in interface ResourceRegistryPublisher
        Parameters:
        type - The exact type name of the Information System element to remove
        instanceUUID - The UUID of the instance to remove from the current context
        propagationMode - How removal propagates (shallow or surgical); deep is corrected to shallow, and null uses the server default
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException - If the instance is not found or not accessible
        org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - If the current context does not exist or is not accessible
        org.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:
        removeFromContext in interface ResourceRegistryPublisher
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException - If the instance is not found or not accessible
        org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - If the current context does not exist or is not accessible
        org.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:
        removeFromContext in interface ResourceRegistryPublisher
        Parameters:
        er - The instance to remove from the current context (must contain a valid UUID in the header)
        propagationMode - How removal propagates (shallow or surgical); deep is corrected to shallow, and null uses the server default
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException - If the instance is not found or not accessible
        org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - If the current context does not exist or is not accessible
        org.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 of ResourceRegistryPublisher.removeFromContext(String, UUID, Boolean) — removal already targets the caller's current context; kept for naming symmetry with ResourceRegistryPublisher.addToCurrentContext(String, UUID, Boolean).

        Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses().

        Specified by:
        removeFromCurrentContext in interface ResourceRegistryPublisher
        Parameters:
        type - The exact type name of the Information System element to remove
        instanceUUID - The UUID of the instance to remove from the current context
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException - If the instance is not found or not accessible
        org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - If the current context does not exist or is not accessible
        org.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 of ResourceRegistryPublisher.removeFromContext(String, UUID, PropagationMode, Boolean) — removal already targets the caller's current context; kept for naming symmetry with the addToCurrentContext family.

        Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses().

        Specified by:
        removeFromCurrentContext in interface ResourceRegistryPublisher
        Parameters:
        type - The exact type name of the Information System element to remove
        instanceUUID - The UUID of the instance to remove from the current context
        propagationMode - How removal propagates (shallow or surgical); deep is corrected to shallow, and null uses the server default
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException - If the instance is not found or not accessible
        org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - If the current context does not exist or is not accessible
        org.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 of ResourceRegistryPublisher.removeFromContext(ERElement, Boolean) — removal already targets the caller's current context; kept for naming symmetry with the addToCurrentContext family.

        Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses().

        Specified by:
        removeFromCurrentContext in interface ResourceRegistryPublisher
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException - If the instance is not found or not accessible
        org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - If the current context does not exist or is not accessible
        org.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 of ResourceRegistryPublisher.removeFromContext(ERElement, PropagationMode, Boolean) — removal already targets the caller's current context; kept for naming symmetry with the addToCurrentContext family.

        Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses().

        Specified by:
        removeFromCurrentContext in interface ResourceRegistryPublisher
        Parameters:
        er - The instance to remove from the current context (must contain a valid UUID in the header)
        propagationMode - How removal propagates (shallow or surgical); deep is corrected to shallow, and null uses the server default
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException - If the instance is not found or not accessible
        org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - If the current context does not exist or is not accessible
        org.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:
        getElementContexts in interface ResourceRegistryPublisher
        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 UUID
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.AvailableInAnotherContextException - If the element exists outside caller token subtree
        org.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:
        getElementContexts in interface ResourceRegistryPublisher
        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 accessible
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.AvailableInAnotherContextException - If the element exists outside caller token subtree
        org.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:
        addResourceToContext in interface ResourceRegistryPublisher
        Parameters:
        resourceType - The exact type name of the Resource to add
        resourceUUID - The UUID of the Resource instance to add to the context
        contextUUID - The UUID of the target context where the Resource should be added
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException - If the Resource is not found or not accessible
        org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - If the target context does not exist or is not accessible
        org.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:
        addResourceToContext in interface ResourceRegistryPublisher
        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 added
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException - If the Resource is not found or not accessible
        org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - If the target context does not exist or is not accessible
        org.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:
        addResourceToCurrentContext in interface ResourceRegistryPublisher
        Parameters:
        resourceType - The exact type name of the Resource to add
        resourceUUID - The UUID of the Resource instance to add to the current context
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException - If the Resource is not found or not accessible
        org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - If the current context cannot be determined or accessed
        org.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:
        addResourceToCurrentContext in interface ResourceRegistryPublisher
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException - If the Resource is not found or not accessible
        org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - If the current context cannot be determined or accessed
        org.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:
        removeResourceFromContext in interface ResourceRegistryPublisher
        Parameters:
        resourceType - The exact type name of the Resource to remove
        resourceUUID - The UUID of the Resource instance to remove from the current context
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException - If the Resource is not found or not accessible
        org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - If the current context does not exist or is not accessible
        org.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:
        removeResourceFromContext in interface ResourceRegistryPublisher
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException - If the Resource is not found or not accessible
        org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - If the current context does not exist or is not accessible
        org.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 of ResourceRegistryPublisher.removeResourceFromContext(String, UUID, Boolean) — removal already targets the caller's current context; kept for naming symmetry with addResourceToCurrentContext.

        Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses().

        Specified by:
        removeResourceFromCurrentContext in interface ResourceRegistryPublisher
        Parameters:
        resourceType - The exact type name of the Resource to remove
        resourceUUID - The UUID of the Resource instance to remove from the current context
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException - If the Resource is not found or not accessible
        org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - If the current context does not exist or is not accessible
        org.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 of ResourceRegistryPublisher.removeResourceFromContext(Resource, Boolean) — removal already targets the caller's current context; kept for naming symmetry with addResourceToCurrentContext.

        Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses().

        Specified by:
        removeResourceFromCurrentContext in interface ResourceRegistryPublisher
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException - If the Resource is not found or not accessible
        org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - If the current context does not exist or is not accessible
        org.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:
        getResourceContexts in interface ResourceRegistryPublisher
        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 UUID
        org.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:
        getResourceContexts in interface ResourceRegistryPublisher
        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 accessible
        org.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:
        addFacetToContext in interface ResourceRegistryPublisher
        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 context
        contextUUID - The UUID of the target context where the Facet should be added
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException - If the Facet is not found or not accessible
        org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - If the target context cannot be determined or accessed
        org.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:
        addFacetToContext in interface ResourceRegistryPublisher
        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 added
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException - If the Facet is not found or not accessible
        org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - If the target context cannot be determined or accessed
        org.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:
        addFacetToCurrentContext in interface ResourceRegistryPublisher
        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 context
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException - If the Facet is not found or not accessible
        org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - If the current context cannot be determined or accessed
        org.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:
        addFacetToCurrentContext in interface ResourceRegistryPublisher
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException - If the Facet is not found or not accessible
        org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - If the current context cannot be determined or accessed
        org.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:
        removeFacetFromContext in interface ResourceRegistryPublisher
        Parameters:
        facetType - The exact type name of the Facet to remove
        facetUUID - The UUID of the Facet instance to remove from the current context
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException - If the Facet is not found or not accessible
        org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - If the current context does not exist or is not accessible
        org.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:
        removeFacetFromContext in interface ResourceRegistryPublisher
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException - If the Facet is not found or not accessible
        org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - If the current context does not exist or is not accessible
        org.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 of ResourceRegistryPublisher.removeFacetFromContext(String, UUID, Boolean) — removal already targets the caller's current context; kept for naming symmetry with addFacetToCurrentContext.

        Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses().

        Specified by:
        removeFacetFromCurrentContext in interface ResourceRegistryPublisher
        Parameters:
        facetType - The exact type name of the Facet to remove
        facetUUID - The UUID of the Facet instance to remove from the current context
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException - If the Facet is not found or not accessible
        org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - If the current context does not exist or is not accessible
        org.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 of ResourceRegistryPublisher.removeFacetFromContext(Facet, Boolean) — removal already targets the caller's current context; kept for naming symmetry with addFacetToCurrentContext.

        Invocation-specific options and immutable response metadata are available through RequestInfo.serverResponses().

        Specified by:
        removeFacetFromCurrentContext in interface ResourceRegistryPublisher
        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 constraints
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException - If the Facet is not found or not accessible
        org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - If the current context does not exist or is not accessible
        org.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:
        getFacetContexts in interface ResourceRegistryPublisher
        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 UUID
        org.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:
        getFacetContexts in interface ResourceRegistryPublisher
        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 accessible
        org.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: from the current Context through the Remove from Current Context endpoint, from any other Context through ResourceRegistryPublisher.removeFromContext(String, UUID, UUID, PropagationMode, Boolean, Boolean, Boolean), whose role rules apply.
        Specified by:
        removeFromContext in interface ResourceRegistryPublisher
        Parameters:
        type - the type name of the instance
        instanceUUID - the UUID of the instance
        contextUUID - the UUID of the Context to remove the instance from
        dryRun - 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 schema
        org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException - if the instance does not exist
        org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - if the current Context cannot be resolved
        org.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: from the current Context through the Remove from Current Context endpoint, from any other Context through ResourceRegistryPublisher.removeFromContext(String, UUID, UUID, PropagationMode, Boolean, Boolean, Boolean), whose role rules apply.
        Specified by:
        removeFromContext in interface ResourceRegistryPublisher
        Parameters:
        er - the instance
        contextUUID - the UUID of the Context to remove the instance from
        dryRun - 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 schema
        org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException - if the instance does not exist
        org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - if the current Context cannot be resolved
        org.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: from the current Context through the Remove from Current Context endpoint, from any other Context through ResourceRegistryPublisher.removeFromContext(String, UUID, UUID, PropagationMode, Boolean, Boolean, Boolean), whose role rules apply.
        Specified by:
        removeResourceFromContext in interface ResourceRegistryPublisher
        Parameters:
        resourceType - the type name of the Resource
        resourceUUID - the UUID of the Resource
        contextUUID - the UUID of the Context to remove the Resource from
        dryRun - 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 schema
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException - if the instance does not exist
        org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - if the current Context cannot be resolved
        org.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: from the current Context through the Remove from Current Context endpoint, from any other Context through ResourceRegistryPublisher.removeFromContext(String, UUID, UUID, PropagationMode, Boolean, Boolean, Boolean), whose role rules apply.
        Specified by:
        removeResourceFromContext in interface ResourceRegistryPublisher
        Type Parameters:
        R - the Resource type
        Parameters:
        resource - the Resource
        contextUUID - the UUID of the Context to remove the Resource from
        dryRun - 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 schema
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException - if the instance does not exist
        org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - if the current Context cannot be resolved
        org.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: from the current Context through the Remove from Current Context endpoint, from any other Context through ResourceRegistryPublisher.removeFromContext(String, UUID, UUID, PropagationMode, Boolean, Boolean, Boolean), whose role rules apply.
        Specified by:
        removeFacetFromContext in interface ResourceRegistryPublisher
        Parameters:
        facetType - the type name of the Facet
        facetUUID - the UUID of the Facet
        contextUUID - the UUID of the Context to remove the Facet from
        dryRun - 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 schema
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException - if the instance does not exist
        org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - if the current Context cannot be resolved
        org.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: from the current Context through the Remove from Current Context endpoint, from any other Context through ResourceRegistryPublisher.removeFromContext(String, UUID, UUID, PropagationMode, Boolean, Boolean, Boolean), whose role rules apply.
        Specified by:
        removeFacetFromContext in interface ResourceRegistryPublisher
        Type Parameters:
        F - the Facet type
        Parameters:
        facet - the Facet
        contextUUID - the UUID of the Context to remove the Facet from
        dryRun - 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 schema
        org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.facet.FacetNotFoundException - if the instance does not exist
        org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - if the current Context cannot be resolved
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if an error occurs during the operation