Class ExternalBrowserPagesImpl
java.lang.Object
com.iizigo.comm.ExternalBrowserPagesImpl
- All Implemented Interfaces:
IExternalBrowserPages
Class to handle external web pages with embedded Jetty.
- Author:
- Christopher Mindus
Constructor Summary
ConstructorsMethod Summary
Modifier and TypeMethodDescriptionbooleandoAuthenticate(PortConfig portConfig, String target) Checks if a request URL is a WebSocket request or an Application URI that should not use authentication.getAppSorryInfo(String appID) Gets what iiziAppSorry.html shows for an application (CC-BROWSER-GATE, ruling Q2): the Designer's answer to what the server takes from ServerShell.getCustomizedAppHTML(File file, String appID, String lang) Gets a customized "iiziApp.html" file for a specific application ID and optional language.getFileOrResource(String location, String target) Gets a File or Resource redirection from a web server target request, used for e.g.voidCalled when initialized.booleanisTargetValid(PortConfig portConfig, String target) Checks for valid target to handle.voidprint(PortConfig portConfig, PrintWriter pw, String root, String target, HttpServletRequest request, HttpServletResponse response) Print the page output.static StringsetTooltipPreview(String html) Sets the current tooltip preview.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IExternalBrowserPages
getAppAnalytics, getAppAnalytics, getAppDirectory, getAppUIModes, isAppRefusedOn, isOriginAllowed
Constructor Details
ExternalBrowserPagesImpl
Constructor.
Method Details
setTooltipPreview
initialize
Called when initialized.doAuthenticate
Checks if a request URL is a WebSocket request or an Application URI that should not use authentication.- Specified by:
doAuthenticatein interfaceIExternalBrowserPages- Parameters:
portConfig- The port configuration.target- The target URI.- Returns:
- true if authentication should be performed, false otherwise.
getFileOrResource
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:
getFileOrResourcein interfaceIExternalBrowserPages- Parameters:
location- The location string between '/$' and '$/'target- The target string from the Web Server after last '$/' (i.e. after location), does NOT begin with '/'.- Returns:
- The
Filefor the resource, null for none.
isTargetValid
Checks for valid target to handle.- Specified by:
isTargetValidin interfaceIExternalBrowserPages- Parameters:
portConfig- The port configuration.target- The target URI.- Returns:
- true if target is processed as an external page, false otherwise.
print
public void print(PortConfig portConfig, PrintWriter pw, String root, String target, HttpServletRequest request, HttpServletResponse response) throws IOException Print the page output.- Specified by:
printin interfaceIExternalBrowserPages- Parameters:
portConfig- The port configuration.pw- The print writer.root- The web server root.target- Target page.request- The request.response- The response.- Throws:
IOException- For I/O errors.
getCustomizedAppHTML
Gets a customized "iiziApp.html" file for a specific application ID and optional language.- Specified by:
getCustomizedAppHTMLin interfaceIExternalBrowserPages- Parameters:
file- The compressed iiziApp.html file without customization.appID- The application ID.lang- The language requested, ornullfor default.- Returns:
- The customized (and probably cached) file to send instead of the un-customized one, or
nullfor none, i.e. in case an application ID is not found.
getAppSorryInfo
Gets what iiziAppSorry.html shows for an application (CC-BROWSER-GATE, ruling Q2): the Designer's answer to what the server takes from ServerShell. The application is the first Module project loaded in the workspace whose registered appID, or whose name, equals the appID ignoring case, the name also with its spaces as dots, the way the development server launch derives an appID from it. The name and description come from its Module app settings, as the server takes them, and the store URLs from its.iiziApp, read on each call so that a saved change shows at once; a project without the file has no links.- Specified by:
getAppSorryInfoin interfaceIExternalBrowserPages- Parameters:
appID- The application ID, never null nor empty.- Returns:
- The information, or null for an unknown application.