Class SharingManager
java.lang.Object
org.gcube.informationsystem.resourceregistry.rest.base.BaseRest
org.gcube.informationsystem.resourceregistry.rest.core.SharingManager
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)
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.gcube.informationsystem.resourceregistry.rest.base.BaseRest
buildResponse, buildResponse, setAccountingMethod, setAccountingMethod
-
Constructor Details
-
SharingManager
public SharingManager()Creates a newSharingManagerinstance.
-
-
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 URItype- the concrete instance typeinstanceId- the instance UUIDoperation- legacy operation token (ADDorREMOVE)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 failsorg.gcube.informationsystem.resourceregistry.api.exceptions.instances.entities.resource.ResourceNotFoundException- if the target instance is not foundorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException- if the target Context is not foundorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- on authorization or backend failures
-