Class ContextManager

java.lang.Object
org.gcube.resourcemanagement.rest.BaseREST
org.gcube.resourcemanagement.rest.vremodelling.ContextManager

@Path("contexts") public class ContextManager extends BaseREST
Author:
Luca Frosini (ISTI - CNR)
  • Field Details

    • CONTEXTS_PATH_PART

      public static final String CONTEXTS_PATH_PART
      The path part for contexts endpoints
      See Also:
    • CONTEXT_UUID_PATH_PARAMETER

      public static final String CONTEXT_UUID_PATH_PARAMETER
      The path parameter for context UUID
      See Also:
    • CURRENT_CONTEXT_PATH_PART

      public static final String CURRENT_CONTEXT_PATH_PART
      The path part for current context
      See Also:
  • Constructor Details

    • ContextManager

      public ContextManager()
      Default constructor for ContextManager
  • Method Details

    • create

      @POST @Path("{CONTEXT_UUID}") @Consumes({"text/plain","application/json;charset=UTF-8"}) @Produces("application/json;charset=UTF-8") public String create(String json) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException, jakarta.ws.rs.WebApplicationException
      Create a new Context using the provided definition POST /contexts BODY: {...}
      Parameters:
      json - the context definition in JSON format
      Returns:
      the created context as JSON string
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if there's an error in the resource registry
      jakarta.ws.rs.WebApplicationException - if the request is invalid
    • read

      @GET @Path("{CONTEXT_UUID}") @Produces("application/json;charset=UTF-8") public String read(@PathParam("CONTEXT_UUID") String uuid) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException, jakarta.ws.rs.WebApplicationException
      Allow to read the Context definition GET /contexts/{UUID} e.g. GET /contexts/c0f314e7-2807-4241-a792-2a6c79ed4fd0
      Parameters:
      uuid - the UUID of the context to read
      Returns:
      the context definition as JSON string
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if there's an error in the resource registry
      jakarta.ws.rs.WebApplicationException - if the request is invalid
    • update

      @PUT @Path("{CONTEXT_UUID}") @Consumes({"text/plain","application/json;charset=UTF-8"}) @Produces("application/json;charset=UTF-8") public String update(@PathParam("CONTEXT_UUID") String uuid, String json) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException, jakarta.ws.rs.WebApplicationException
      Update an existing Context definition PUT /contexts/{UUID} e.g. PUT /contexts/c0f314e7-2807-4241-a792-2a6c79ed4fd0 BODY: {...}
      Parameters:
      uuid - the UUID of the context to update
      json - the updated context definition in JSON format
      Returns:
      the updated context as JSON string
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if there's an error in the resource registry
      jakarta.ws.rs.WebApplicationException - if the request is invalid
    • delete

      @DELETE @Consumes({"text/plain","application/json;charset=UTF-8"}) @Path("{CONTEXT_UUID}") public jakarta.ws.rs.core.Response delete(@PathParam("CONTEXT_UUID") String uuid) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException, jakarta.ws.rs.WebApplicationException
      Delete a context by its UUID DELETE /contexts/{UUID} e.g. DELETE /contexts/c0f314e7-2807-4241-a792-2a6c79ed4fd0
      Parameters:
      uuid - the UUID of the context to delete
      Returns:
      Response indicating the result of the delete operation
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if there's an error in the resource registry
      jakarta.ws.rs.WebApplicationException - if the request is invalid