Interface IExternalBrowserPages
- All Known Implementing Classes:
ExternalBrowserPagesImpl, ExternalBrowserPagesImpl
public interface IExternalBrowserPages
Page interface for external browsers.
- Author:
- Christopher Mindus
Method 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.default AppAnalytics.SettingsgetAppAnalytics(String appID) Gets the Web Analytics settings of an application (CC-ANALYTICS-CONSENT): the GA4 Measurement ID and the consent choice from its App page, for the one line the servlet injects intoiiziApp.htmlper response.default AppAnalytics.SettingsgetAppAnalytics(String appID, String lang) Gets the Web Analytics settings of an application for a language (CC-FIX-GA4-V5, GA-6): asgetAppAnalytics(String), with the application's name in that language for the consent prompt, the way the PWA manifest names the application.default IAppDirectorygetAppDirectory(String appID) Gets the virtual directory/app/<appID>/of an application (CC-PWA-V5A-APPDIR-ROUTE, design CC-DESIGN-APP-URL-V2 section 2): the generated application page per language and the stamp of the directory, whichAppDirectoryHandlerserves at the head of the handler chain.default BrowserGate.AppInfogetAppSorryInfo(String appID) Gets whatiiziAppSorry.htmlshows for an application, the page served instead ofiiziApp.htmlto a Browser that cannot run IIZI (CC-BROWSER-GATE): its name, description and store links.default StringgetAppUIModes(String appID) Gets the appearance modes an application allows a client to show (CC-THEME-DARK-V5): theuiModeschoice of its App page, written into the first-paint lines ofiiziApp.htmlper response in place ofUISchemes.MODES_MARKER, so that a page of an application whose own styling is light paints light whatever the device's choice.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.default booleanisAppRefusedOn(String appID, PortConfig portConfig) Tells whether an application is REFUSED on the port configuration a request arrived on (CC-FIX-APP-DEFINITIONS, PR-3/PR-4): the server answers fromServerAppConfig.isServedOn- an application'sportslist names the port configurations it is served on, empty for all of them, a request without a configuration is refused by an application with a list (D-19) - and the handlers then answer exactly as for an unknown application ID: 404 for the page, its generated files and its resources, 404 at the WebSocket upgrade, no redirect for the legacy page.default booleanisOriginAllowed(String origin, String requestHost) Tells whether a cross-origin page may read this server's responses (CC-FIX-SB-CORS,IIZI-JETTY-CORS-CREDENTIALS-ANY-ORIGIN): the origin policy ofCORSFilter, asked for anhttp(s)origin that is neither an iiziRun WebView origin nor the host the request came to, which the filter grants by itself.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.
Method Details
isTargetValid
Checks for valid target to handle.- Parameters:
portConfig- The port configuration.target- The target URI.- Returns:
- true if target is processed as an external page, false otherwise.
doAuthenticate
Checks if a request URL is a WebSocket request or an Application URI that should not use authentication.IIZI-NO-BASIC-DIGEST-AUTH: this method has NO CALLER. Its only two call sites are inside the commented-out Basic and Digest authentication block in
RunConfigurationWebServer(see the marker there), so it exists only to serve a feature IIZI does not support. It is deliberately NOT commented out, because both implementors carry@Overrideand are in other projects (com.iizigoandcom.iizix.server) - removing the declaration would break their compilation, which is a decision for CM and not part of the 2026-08-28 authentication decision. Retained as it was; the two call sites pass one argument to this two-argument method, so it is not even the signature they were written against.- Parameters:
portConfig- The port configuration.target- The target URI.- Returns:
- true if authentication should be performed, false otherwise.
print
void print(PortConfig portConfig, PrintWriter pw, String root, String target, HttpServletRequest request, HttpServletResponse response) throws IOException Print the page output.- 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.
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.getCustomizedAppHTML
Gets a customized "iiziApp.html" file for a specific application ID and optional language.- 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 whatiiziAppSorry.htmlshows for an application, the page served instead ofiiziApp.htmlto a Browser that cannot run IIZI (CC-BROWSER-GATE): its name, description and store links. The server answers fromServerShellthroughAppFactory.getAppDistributionProps(); the Designer answers from the Module projects loaded in its workspace, matched by registered appID or by project name, with the store URLs of each project's.iiziApp(ruling Q2 of CC-BROWSER-GATE). This default, kept for any other implementation, knows no application, so the page shows no name and no store link.- Parameters:
appID- The application ID, never null nor empty.- Returns:
- The information, or
nullfor an unknown application: the page is then served with its defaults and without a store link.
getAppAnalytics
Gets the Web Analytics settings of an application (CC-ANALYTICS-CONSENT): the GA4 Measurement ID and the consent choice from its App page, for the one line the servlet injects intoiiziApp.htmlper response. The server answers fromServerShellthrough the Module app settings, and answers only a valid ID; the Designer has no such chain and keeps this default, so its preview never loads Analytics.- Parameters:
appID- The application ID, never null nor empty.- Returns:
- The settings, or
nullfor an unknown application or one without a valid Measurement ID: no line is injected and no Analytics runs.
getAppAnalytics
Gets the Web Analytics settings of an application for a language (CC-FIX-GA4-V5, GA-6): asgetAppAnalytics(String), with the application's name in that language for the consent prompt, the way the PWA manifest names the application. The server answers the name from the App page's localized name; this default knows no language and answersgetAppAnalytics(String).- Parameters:
appID- The application ID, never null nor empty.lang- The language code of the request, null or empty for the default language.- Returns:
- The settings, or
nullfor an unknown application or one without a valid Measurement ID: no line is injected and no Analytics runs.
getAppUIModes
Gets the appearance modes an application allows a client to show (CC-THEME-DARK-V5): theuiModeschoice of its App page, written into the first-paint lines ofiiziApp.htmlper response in place ofUISchemes.MODES_MARKER, so that a page of an application whose own styling is light paints light whatever the device's choice. The server answers fromServerShellthrough the Module app settings; this default, kept for any other implementation, allows both.- Parameters:
appID- The application ID, never null nor empty.- Returns:
- The modes as
UISchemes.modesValue(int)reads them:"light","dark", or the empty string for both; null reads as both.
getAppDirectory
Gets the virtual directory/app/<appID>/of an application (CC-PWA-V5A-APPDIR-ROUTE, design CC-DESIGN-APP-URL-V2 section 2): the generated application page per language and the stamp of the directory, whichAppDirectoryHandlerserves at the head of the handler chain. The server answers fromServerShellthroughAppFactory.getAppDirectory, afterIServer.validateAppIDhas accepted the segment, so a segment that is not a valid application ID is refused before any lookup (design F-6); an alias is answered with the directory of the application it names, whoseIAppDirectory.getAppID()is the canonical ID, and the handler redirects to it. The Designer keeps this default: its server has no such directory, and/app/answers 404 there.- Parameters:
appID- The path segment after/app/, decoded, never null nor empty: an application ID, an alias, or anything else a Browser sent.- Returns:
- The directory, or
nullfor an invalid or unknown ID: the handler answers 404.
isAppRefusedOn
Tells whether an application is REFUSED on the port configuration a request arrived on (CC-FIX-APP-DEFINITIONS, PR-3/PR-4): the server answers fromServerAppConfig.isServedOn- an application'sportslist names the port configurations it is served on, empty for all of them, a request without a configuration is refused by an application with a list (D-19) - and the handlers then answer exactly as for an unknown application ID: 404 for the page, its generated files and its resources, 404 at the WebSocket upgrade, no redirect for the legacy page. This default refuses nothing: the Designer's internal web server serves no application, and a test double that knows no port configurations keeps serving.- Parameters:
appID- The application ID: the canonical ID of a directory, or the ID or alias of a request.portConfig- The port configuration of the request's connector, null for none.- Returns:
- true when refused, false when served.
isOriginAllowed
Tells whether a cross-origin page may read this server's responses (CC-FIX-SB-CORS,IIZI-JETTY-CORS-CREDENTIALS-ANY-ORIGIN): the origin policy ofCORSFilter, asked for anhttp(s)origin that is neither an iiziRun WebView origin nor the host the request came to, which the filter grants by itself. The server answers from its WebSocketOriginallow-list (ServerShell.isOriginAllowedForCORS: the environments' allowed domains, the external server URL, the hub's members and origins, the$allowedOriginssetting, and on a development server the loopback origins). This default, kept for any other implementation, grants nothing; the Designer's internal web server adds the loopback origins by itself (CORSFilter.designerPolicy).- Parameters:
origin- The request'sOriginheader field, anhttp(s)origin.requestHost- The host the request came to (Hostwithout the port), may be null.- Returns:
- true to grant the origin, false to refuse it: the Browser then refuses the preflight or the read of the response.