Class Regenerate


  • @RequiredRole("edit")
    public class Regenerate
    extends APIRequestHandler
    /api/edit/transcripts/layers/regenerate : Handler for regenerating selected layers for selected transcripts.

    /api/edit/transcripts/layers/regenerate

    POST starts layer generation in selected transcripts for a given layer (or all layers).

    Can be a multipart-encoded request, or have a plain URL-encoded body. Parameters are:

    layerId
    The ID of the layer to regenerate, or an empty string for all layers.
    ids
    If a multipart-encoded request, this is a text file containing transcript IDs, one per line, identifying the transcripts to regenerate.
    id
    If a url-encoded request, this multiple value parameter, specifies the IDs of transcripts to regenerate.

    One of ids or id must be specified.

    Output: A JSON-encoded response containing the threadId of a task that is processing the request.

    Author:
    Robert Fromont robert@fromont.net.nz
    • Constructor Detail

      • Regenerate

        public Regenerate()
        Default constructor.
    • Method Detail

      • post

        public javax.json.JsonObject post​(RequestParameters requestParameters,
                                          Consumer<Integer> httpStatus,
                                          BiFunction<Collection<Integer>,​Integer,​String> layerGenerator)
        The POST method for the servlet.
        Parameters:
        requestParameters - Request parameter map.
        httpStatus - Receives the response status code, in case of error.
        layerGenerator - A function that will start a layer generation thread for the given list of ag_ids and the given layer, and return the thread ID.
        Returns:
        JSON-encoded object representing the response