java.lang.Object
org.gcube.informationsystem.resourceregistry.rest.base.BaseRest
org.gcube.informationsystem.resourceregistry.rest.core.SharingManager

@Path("sharing") public class SharingManager extends BaseRest
Deprecated compatibility facade for the old /sharing endpoint.

The canonical membership APIs are exposed under /instances; this resource is intentionally hidden from OpenAPI and delegates to InstancesPolicyEnforcementPoint to keep legacy callers working.

Author:
Luca Frosini (ISTI - CNR)
  • Constructor Details

    • SharingManager

      public SharingManager()
      Creates a new SharingManager instance.
  • Method Details

    • addRemove

      @POST @Path("/contexts/{context-uuid}/{type-name}/{instance-uuid}") @Produces("application/json") public String addRemove(@PathParam("context-uuid") String contextId, @PathParam("type-name") String type, @PathParam("instance-uuid") String instanceId, @QueryParam("operation") String operation, @QueryParam("dryRun") @DefaultValue("false") 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
      Handles the deprecated add/remove sharing endpoint by delegating to the canonical Instances PEP membership operations.
      Parameters:
      contextId - the target Context UUID from the legacy URI
      type - the concrete instance type
      instanceId - the instance UUID
      operation - legacy operation token (ADD or REMOVE)
      dryRun - whether to simulate the operation without committing changes
      Returns:
      the serialized canonical response produced by the Instances PEP
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException - if schema validation fails
      org.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException - if the target instance is not found
      org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException - if the target Context is not found
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - on authorization or backend failures