Package com.iizix.pwa
Class PWACustomHTML
- java.lang.Object
- com.iizix.pwa.PWACustomHTML
 
- public class PWACustomHTML extends java.lang.ObjectClass holding custom HTML for an app and potentially a language.- Author:
- Christopher Mindus
 
- Constructor Summary- Constructors - Constructor - Description - PWACustomHTML(java.io.File cacheDir, java.io.File iiziAppHTML, java.lang.String appID, PWAProps props, IKStringInfoProvider provider, java.lang.String httpsServer)Constructs a new instance of the PWA customizer for HTML.
 - Method Summary- All Methods Instance Methods Concrete Methods - Modifier and Type - Method - Description - java.io.File- getGenerateHTML(java.lang.String languageCode)Gets or generates a customized HTML file from the template "iiziApp.html".
 
- Constructor Detail- PWACustomHTML- public PWACustomHTML(java.io.File cacheDir, java.io.File iiziAppHTML, java.lang.String appID, PWAProps props, IKStringInfoProvider provider, java.lang.String httpsServer) throws java.io.IOExceptionConstructs a new instance of the PWA customizer for HTML.- Parameters:
- cacheDir- Cache directory where to place the customized HTML.
- iiziAppHTML- The un-customized version of "iiziApp.html".
- appID- The application ID.
- props- The PWA properties for the application.
- provider- The KString information provider that is not language sensitive.
- httpsServer- The HTTPS server.
- Throws:
- java.io.IOException- If the "iiziApp.html" failed to load.
 
 
 - Method Detail- getGenerateHTML- public java.io.File getGenerateHTML(java.lang.String languageCode) throws java.io.IOExceptionGets or generates a customized HTML file from the template "iiziApp.html".- This method will block the caller thread (and others requesting the same language) until it has completed. - Parameters:
- languageCode- The language code requested,- nullor empty string for default language. If the language code is not found, the default one will be used.
- Returns:
- The generated (or cached) HTML file, or nullfor an error with this language from a previous call.
- Throws:
- java.io.IOException- For I/O errors: only first time an IOException is thrown, subsequent calls with the same language code will result in- nullbeing returned.