Package de.aristaflow.adept2.ui.web
Class WebUiServlet
java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
de.aristaflow.adept2.base.servlet.SimpleServingServlet
de.aristaflow.adept2.ui.web.WebUiServlet
- All Implemented Interfaces:
DynamicServlet,jakarta.servlet.Servlet,jakarta.servlet.ServletConfig,Serializable
@ConfigurationDescription(properties={@Property(name="AfBaseUrl",defaultValue="AristaFlowREST",description="Optional base URL for the AristaFlow core services."),,,,})
public class WebUiServlet
extends de.aristaflow.adept2.base.servlet.SimpleServingServlet
A simple servlet providing the web UI from a base URL. This appends the requested path to the
base URL and returns the retrieved result (UTF-8-encoded character stream). Deep links will be
adapted appropriately.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final StringThe base URL for the core services or an empty stringprotected final StringThe base URL for the PIR service or an empty stringprotected final StringThe base URL for the Remote HTML service or an empty stringprotected final StringThe base URL for a standalone PIR service or an empty stringprotected final StringThe base href to set in the index.htmlstatic final StringConfiguration key for the base URL for the AristaFlow core services.static final StringConfiguration key for the AristaFlow Process Image Renderer.static final StringConfiguration key for the AristaFlow Remote HTML Runtime Manager.static final StringConfiguration key for a standalone AristaFlow Process Image Renderer.static final StringConfiguration key for the base href to use.static final StringThe configuration key for the configuration variable providing the servlet path and theCONF_BASE_HREF.protected final StringCached and configured index.html content.protected static final StringThe POM properties file within the bundle providing the version.protected final org.apache.tika.mime.MediaTypeThe media type ofindexHtml.Fields inherited from class de.aristaflow.adept2.base.servlet.SimpleServingServlet
base, logger, servletNameFields inherited from class jakarta.servlet.http.HttpServlet
LEGACY_DO_HEAD -
Constructor Summary
ConstructorsConstructorDescriptionWebUiServlet(Configuration conf, de.aristaflow.adept2.base.servlet.AbstractServingServletService asss, Registry registry) Creates a new servlet providing web UI from the designated base URL. -
Method Summary
Modifier and TypeMethodDescriptionprotected StringadaptPath(String path, jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) protected voiddoGet(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) protected booleanhandle(String path, jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) Methods inherited from class de.aristaflow.adept2.base.servlet.SimpleServingServlet
getMimeType, getServletName, servletDeployed, servletUndeployedMethods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPatch, doPost, doPut, doTrace, getLastModified, init, isSensitiveHeader, service, serviceMethods inherited from class jakarta.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, init, log, logMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jakarta.servlet.Servlet
destroy, getServletConfig, getServletInfo, init, service
-
Field Details
-
CONF_VAR_SERVLET_PATH
The configuration key for the configuration variable providing the servlet path and theCONF_BASE_HREF.- See Also:
-
POM_PROPERTIES_FILE
The POM properties file within the bundle providing the version.- See Also:
-
CONF_AF_BASE_URL
Configuration key for the base URL for the AristaFlow core services.- See Also:
-
CONF_AF_REMOTE_HTML_BASE_URL
Configuration key for the AristaFlow Remote HTML Runtime Manager.- See Also:
-
CONF_AF_PIR_BASE_URL
Configuration key for the AristaFlow Process Image Renderer.- See Also:
-
CONF_AF_SPIR_BASE_URL
Configuration key for a standalone AristaFlow Process Image Renderer.- See Also:
-
CONF_BASE_HREF
Configuration key for the base href to use.- See Also:
-
afBaseUrl
The base URL for the core services or an empty string -
afRemoteHtmlBaseUrl
The base URL for the Remote HTML service or an empty string -
afPirBaseUrl
The base URL for the PIR service or an empty string -
afSpirBaseUrl
The base URL for a standalone PIR service or an empty string -
baseHref
The base href to set in the index.html -
indexHtml
Cached and configured index.html content. -
utf8TextMt
protected final org.apache.tika.mime.MediaType utf8TextMtThe media type ofindexHtml.
-
-
Constructor Details
-
WebUiServlet
public WebUiServlet(Configuration conf, de.aristaflow.adept2.base.servlet.AbstractServingServletService asss, Registry registry) throws IOException Creates a new servlet providing web UI from the designated base URL.- Parameters:
conf- Servlet-specific configuration. This is not used by this class.asss- The serving servlet service instantiating this servlet. This provdies the base URL of the content, that is the corresponding root directory (may be in a Jar-file), and the log service.registry- The registry providing the instance name which is also the servlet name.- Throws:
IOException- If there are problems reading theindex.htmlfrom the library, anIOExceptionwill be thrown.
-
-
Method Details
-
adaptPath
protected String adaptPath(String path, jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) - Overrides:
adaptPathin classde.aristaflow.adept2.base.servlet.SimpleServingServlet
-
doGet
protected void doGet(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) throws IOException - Overrides:
doGetin classde.aristaflow.adept2.base.servlet.SimpleServingServlet- Throws:
IOException
-
handle
protected boolean handle(String path, jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) throws IOException - Overrides:
handlein classde.aristaflow.adept2.base.servlet.SimpleServingServlet- Throws:
IOException
-