Class ExternalBrowserPagesImpl

All Implemented Interfaces:

public class ExternalBrowserPagesImpl extends Object implements IExternalBrowserPages
Class to handle external web pages with embedded Jetty.
Christopher Mindus
  • Constructor Details

    • ExternalBrowserPagesImpl

      public ExternalBrowserPagesImpl(InternalWebServer webServer)
  • Method Details

    • setTooltipPreview

      public static String setTooltipPreview(String html)
      Sets the current tooltip preview.
      html - The HTML string to set as preview.
      The resource to use in a browser.
    • initialize

      public void initialize(IntegratedWebServer iws)
      Called when initialized.
    • doAuthenticate

      public boolean doAuthenticate(String target)
      Checks if a request URL is a WebSocket request or an Application URI that should not use authentication.
      Specified by:
      doAuthenticate in interface IExternalBrowserPages
      target - The target URI.
      true if authentication should be performed, false otherwise.
    • getFileOrResource

      public Object getFileOrResource(String location, String target)
      Gets a File or Resource redirection from a web server target request, used for e.g. Asset resource files when used on the server and the file is inside a Jar.
      Specified by:
      getFileOrResource in interface IExternalBrowserPages
      location - The location string between '/$' and '$/'
      target - The target string from the Web Server after last '$/' (i.e. after location), does NOT begin with '/'.
      The File for the resource, null for none.
    • isTargetValid

      public boolean isTargetValid(String target)
      Checks for valid target to handle.
      Specified by:
      isTargetValid in interface IExternalBrowserPages
    • print

      public void print(PrintWriter pw, String root, String target, int port, boolean isSecure, HttpServletRequest request, HttpServletResponse response) throws IOException
      Print the page output.
      Specified by:
      print in interface IExternalBrowserPages
      pw - The print writer.
      root - The web server root.
      target - Target page.
      port - The port number (external value could be different).
      isSecure - Flag indicating the connection is secure due to external party.
      request - The request.
      response - The response.
      IOException - For I/O errors.
    • getCustomizedAppHTML

      public File getCustomizedAppHTML(File file, String appID, String lang)
      Gets a customized "iiziApp.html" file for a specific application ID and optional language.
      Specified by:
      getCustomizedAppHTML in interface IExternalBrowserPages
      file - The compressed iiziApp.html file without customization.
      appID - The application ID.
      lang - The language requested, or null for default.
      The customized (and probably cached) file to send instead of the un-customized one, or null for none, i.e. in case an application ID is not found.