Class PreboardedWebService

java.lang.Object
ubic.gemma.rest.PreboardedWebService

@Service @Path("/") public class PreboardedWebService extends Object
REST surface for the proposed-experiment workflow.

Six endpoints per HANDOFF_PROPOSED_EXPERIMENT_WORKFLOW.md:

  • POST /preboarded — create a preboarded from an accession. 409 with existing entity id+type if accession is already known (either as a preboarded or a loaded EE).
  • GET /preboarded/{id} — fetch preboarded + latest annotation set.
  • GET /preboarded?accession=X — resolve accession to id.
  • POST /preboarded/{id}/annotation-sets — attach an annotation set (typically a PROPOSAL role from an agent run), idempotent on (role, runId).
  • POST /preboarded/{id}/promote — promote to a loaded EE. Restricted to GROUP_CURATOR / GROUP_ADMIN; agents cannot promote.
  • GET /preboarded?state=... — list preboarded by workflow state (curator triage view).

Auth model (handoff §"Authorization"):

  • POST preboarded + POST annotation-sets: GROUP_CURATOR / GROUP_ADMIN / GROUP_AGENT. Agents need to create preboarded and attach annotation sets.
  • POST promote: GROUP_CURATOR / GROUP_ADMIN only. Agents MUST get 403.
  • GET endpoints: any authenticated user (no @PreAuthorize on reads).
  • Constructor Details

  • Method Details

    • createPreboarded

      @POST @Path("/preboarded") @Consumes("application/json") @Produces("application/json") @PreAuthorize("hasAuthority('GROUP_CURATOR') or hasAuthority('GROUP_ADMIN') or hasAuthority('GROUP_AGENT')") public jakarta.ws.rs.core.Response createPreboarded(@Nullable PreboardedWebService.CreatePreboardedRequest req)
      Create a new PreboardedExperiment for the supplied accession. Returns 409 with the existing id+type if the accession already exists (as a preboarded OR an EE).
    • getPreboarded

      @GET @Path("/preboarded/{id}") @Produces("application/json") public PreboardedWebService.PreboardedResponse getPreboarded(@PathParam("id") Long id)
      Fetch a preboarded by id + its latest annotation set (proposal role).
    • listOrResolvePreboarded

      @GET @Path("/preboarded") @Produces("application/json") public jakarta.ws.rs.core.Response listOrResolvePreboarded(@QueryParam("accession") @Nullable String accession, @QueryParam("state") @Nullable String stateName)
      Listing endpoint: by accession (returns the single matching preboarded, 404 if none) or by state (queue view, returns the most-recent preboarded in that state — full pagination deferred).
    • attachAnnotationSet

      @POST @Path("/preboarded/{id}/annotation-sets") @Consumes("application/json") @Produces("application/json") @PreAuthorize("hasAuthority('GROUP_CURATOR') or hasAuthority('GROUP_ADMIN') or hasAuthority('GROUP_AGENT')") public jakarta.ws.rs.core.Response attachAnnotationSet(@PathParam("id") Long id, @Nullable PreboardedWebService.AttachAnnotationSetRequest req)
      Attach a new annotation set to a preboarded. Idempotent on (role, runId): if a row with the same triple already exists, returns 200 OK with the existing row rather than 201 Created.
    • promotePreboarded

      @POST @Path("/preboarded/{id}/promote") @Consumes("application/json") @Produces("application/json") @PreAuthorize("hasAuthority('GROUP_CURATOR') or hasAuthority('GROUP_ADMIN')") public jakarta.ws.rs.core.Response promotePreboarded(@PathParam("id") Long id, @Nullable PreboardedWebService.PromoteRequest req)
      Promote a preboarded to a loaded ExpressionExperiment.