Class ExtWebApp
- java.lang.Object
-
- nzilbb.labbcat.server.api.APIRequestHandler
-
- nzilbb.labbcat.server.api.edit.annotator.ExtWebApp
-
@RequiredRole("edit") public class ExtWebApp extends APIRequestHandler
Server-side implementation of 'ext' web-apps.This servlet provides access to an annotator's 'ext' web-app, if there is one.
If there's an 'ext' web-app, the first request should be to a path structured:
/api/admin/annotator/ext/annotatorId/The resulting HTML document will then implement the web-app by requesting resources as required.
'Ext' web-apps provide a mechanism for supplying extra information or data to the user (data visualizations, access to dictionary files, etc.) and are 'open-ended'; there's no final request that terminates the web-app, as there is with the 'config' and 'task' web-apps.
- Author:
- Robert Fromont robert@fromont.net.nz
-
-
Field Summary
-
Fields inherited from class nzilbb.labbcat.server.api.APIRequestHandler
SC_BAD_REQUEST, SC_CONFLICT, SC_FORBIDDEN, SC_INTERNAL_SERVER_ERROR, SC_METHOD_NOT_ALLOWED, SC_NOT_FOUND, SC_OK, SC_UNPROCESSABLE_CONTENT, SC_UNSUPPORTED_MEDIA_TYPE
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
get(String method, String requestURI, String pathInfo, String queryString, UnaryOperator<String> requestHeaders, InputStream requestBody, OutputStream out, Consumer<String> contentTypeConsumer, Consumer<String> contentEncoding, Consumer<Integer> httpStatus)
GET handler.-
Methods inherited from class nzilbb.labbcat.server.api.APIRequestHandler
GetSystemAttribute, init, writeResponse
-
-
-
-
Method Detail
-
get
public void get(String method, String requestURI, String pathInfo, String queryString, UnaryOperator<String> requestHeaders, InputStream requestBody, OutputStream out, Consumer<String> contentTypeConsumer, Consumer<String> contentEncoding, Consumer<Integer> httpStatus)
GET handler.- Parameters:
method
- HTTP method of the request.requestURI
- The URL of the request, excluding the query string.pathInfo
- The URL path.queryString
- The URL's query string.requestHeaders
- Access to HTTP request headers.requestBody
- Access to the body of the request.out
- Response body output stream.contentTypeConsumer
- Receives the content type for specification in the response headers.contentEncoding
- Receives the character encoding of the recponse.httpStatus
- Receives the response status code, in case or error.
-
-