Interface ResourceRegistryPublisher

  • All Superinterfaces:
    org.gcube.informationsystem.resourceregistry.api.request.RequestInfo
    All Known Implementing Classes:
    ResourceRegistryPublisherImpl

    public interface ResourceRegistryPublisher
    extends org.gcube.informationsystem.resourceregistry.api.request.RequestInfo
    Client interface for publishing and managing entities, relations, and resources in the Resource Registry.

    The interface is the authoritative caller-facing contract. Stable invocation options are represented by immutable request options, while HTTP metadata is available through the opt-in response executor without changing ordinary domain-oriented return values.

    Two outcomes are common to every write and are not repeated on each method:

    • a ConcurrentWriteException (409 Conflict): the write lost the race with a concurrent write on the same elements and changed nothing; it can be repeated as it is;
    • for an IsRelatedTo, an IsRelatedToAlreadyPresentException (409 Conflict) when the same source and target are already linked, in the Context of the request, by an instance of the same polymorphic lineage (the same Type, or one that extends the other), and an IsRelatedToAvailableInAnotherContextException (403 Forbidden) when that instance is in a Context the caller does not see: the rule holds across every Context, and the existing instance is added to the Context instead of being created again.
    Author:
    Luca Frosini (ISTI - CNR)
    • Field Summary

      • Fields inherited from interface org.gcube.informationsystem.resourceregistry.api.request.RequestInfo

        DEFAULT_LIMIT, DEFAULT_OFFSET, UNBOUNDED_LIMIT
    • Method Summary

      All Methods Instance Methods Abstract Methods Default 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)
      Deprecated.
      use per-request custom headers from ResourceRegistryRequestOptions
      void addHeader​(String name, String value)
      Deprecated.
      use per-request custom headers from ResourceRegistryRequestOptions
      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.
      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> 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.
      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.
      default Map<UUID,​String> getInstanceContexts​(String type, UUID instanceUUID)
      Retrieves the list of contexts where an instance is present in the caller's token subtree.
      default <ERElem extends org.gcube.informationsystem.model.reference.ERElement>
      List<ERElem>
      getInstances​(Class<ERElem> clazz, Boolean polymorphic)
      Alias for list(Class, Boolean) matching ResourceRegistryClient.getInstances(Class, Boolean).
      default String getInstances​(String type, Boolean polymorphic)
      Alias for list(String, Boolean) matching ResourceRegistryClient.getInstances(String, Boolean).
      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.
      default String jsonQuery​(String jsonQuery)
      Alias for query(String, Boolean) matching ResourceRegistryClient.jsonQuery(String).
      <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)
      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)
      <F extends org.gcube.informationsystem.model.reference.entities.Facet>
      List<org.gcube.informationsystem.model.reference.ERElement>
      removeFacetFromCurrentContext​(F facet, Boolean dryRun)
      Alias of 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 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)
      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 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)
      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 removeFromContext(String, UUID, Boolean) — removal already targets the caller's current context; kept for naming symmetry with 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 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 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 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)
      <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)
      List<org.gcube.informationsystem.model.reference.ERElement> removeResourceFromCurrentContext​(String resourceType, UUID resourceUUID, Boolean dryRun)
      Alias of 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 removeResourceFromContext(Resource, Boolean) — removal already targets the caller's current context; kept for naming symmetry with addResourceToCurrentContext.
      <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 interface org.gcube.informationsystem.resourceregistry.api.request.RequestInfo

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

      • addHeader

        @Deprecated
        void addHeader​(String name,
                       String value)
        Deprecated.
        use per-request custom headers from ResourceRegistryRequestOptions
        Adds a custom HTTP header to be included in requests.

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

        Parameters:
        name - Header name
        value - Header value
      • addHeader

        @Deprecated
        void addHeader​(String name,
                       boolean value)
        Deprecated.
        use per-request custom headers from ResourceRegistryRequestOptions
        Adds a custom HTTP header to be included in requests.

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

        Parameters:
        name - Header name
        value - boolean value
      • getContextCache

        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().

        Returns:
        The context cache instance
      • getAllContexts

        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().

        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
      • getContext

        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().

        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

        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().

        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

        <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().

        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

        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().

        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
      • getInstances

        default <ERElem extends org.gcube.informationsystem.model.reference.ERElement> List<ERElem> getInstances​(Class<ERElem> clazz,
                                                                                                                 Boolean polymorphic)
                                                                                                          throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Alias for list(Class, Boolean) matching ResourceRegistryClient.getInstances(Class, Boolean).
        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
      • getInstances

        default String getInstances​(String type,
                                    Boolean polymorphic)
                             throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Alias for list(String, Boolean) matching ResourceRegistryClient.getInstances(String, Boolean).
        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
      • query

        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().

        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
      • jsonQuery

        default String jsonQuery​(String jsonQuery)
                          throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryException,
                                 org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Alias for query(String, Boolean) matching ResourceRegistryClient.jsonQuery(String).
        Parameters:
        jsonQuery - JSON object describing the structure to search for
        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

        <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().

        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

        <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().

        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

        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().

        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
      • create

        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().

        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
      • exist

        <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().

        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

        <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().

        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

        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().

        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

        <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().

        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

        <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().

        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

        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().

        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

        <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().

        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

        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().

        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

        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().

        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

        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().

        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

        <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().

        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

        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().

        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

        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().

        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

        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().

        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

        <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().

        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

        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().

        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

        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().

        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

        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().

        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

        <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().

        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

        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().

        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

        <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().

        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

        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().

        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

        <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().

        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

        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().

        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

        <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().

        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

        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().

        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

        <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().

        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

        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().

        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

        <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().

        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

        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().

        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

        <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().

        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

        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().

        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

        <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().

        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

        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().

        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

        <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().

        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

        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().

        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

        <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().

        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

        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().

        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

        <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().

        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

        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().

        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

        <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().

        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

        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().

        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

        <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().

        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

        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().

        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

        <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().

        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

        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().

        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

        <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().

        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

        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().

        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

        <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().

        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

        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().

        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

        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().

        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

        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().

        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

        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().

        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

        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 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().

        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

        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().

        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

        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().

        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

        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().

        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

        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().

        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

        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().

        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

        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().

        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

        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().

        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

        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().

        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

        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().

        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

        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().

        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

        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 removeFromContext(String, UUID, Boolean) — removal already targets the caller's current context; kept for naming symmetry with addToCurrentContext(String, UUID, Boolean).

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

        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

        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 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().

        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

        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 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().

        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

        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 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().

        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

        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().

        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

        <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().

        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
      • getInstanceContexts

        default Map<UUID,​String> getInstanceContexts​(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 an instance is present in the caller's token subtree. Alias matching ResourceRegistryClient.getInstanceContexts(String, UUID).
        Parameters:
        type - The exact type name of the Information System element
        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
      • addResourceToContext

        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().

        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

        <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().

        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

        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().

        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

        <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().

        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

        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().

        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

        <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().

        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

        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 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().

        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

        <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 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().

        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

        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().

        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

        <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().

        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

        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().

        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

        <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().

        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

        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().

        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

        <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().

        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

        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().

        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

        <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().

        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

        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 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().

        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

        <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 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().

        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

        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().

        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

        <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().

        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
        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
        Removes the instance from the given Context: from the current Context through the Remove from Current Context endpoint, from any other Context through removeFromContext(String, UUID, UUID, PropagationMode, Boolean, Boolean, Boolean), whose role rules apply.
        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
        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
        Removes the instance from the given Context: from the current Context through the Remove from Current Context endpoint, from any other Context through removeFromContext(String, UUID, UUID, PropagationMode, Boolean, Boolean, Boolean), whose role rules apply.
        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
        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
        Removes the instance from the given Context: from the current Context through the Remove from Current Context endpoint, from any other Context through removeFromContext(String, UUID, UUID, PropagationMode, Boolean, Boolean, Boolean), whose role rules apply.
        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
        <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
        Removes the instance from the given Context: from the current Context through the Remove from Current Context endpoint, from any other Context through removeFromContext(String, UUID, UUID, PropagationMode, Boolean, Boolean, Boolean), whose role rules apply.
        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
        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
        Removes the instance from the given Context: from the current Context through the Remove from Current Context endpoint, from any other Context through removeFromContext(String, UUID, UUID, PropagationMode, Boolean, Boolean, Boolean), whose role rules apply.
        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
        <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
        Removes the instance from the given Context: from the current Context through the Remove from Current Context endpoint, from any other Context through removeFromContext(String, UUID, UUID, PropagationMode, Boolean, Boolean, Boolean), whose role rules apply.
        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