public class PwaRegistry extends Object implements Serializable
PwaConfiguration - basic info
PwaIcon:s - different sizes of icons for header and
manifest
| Constructor and Description |
|---|
PwaRegistry(PWA pwa,
javax.servlet.ServletContext servletContext)
Creates a new PwaRegistry instance.
|
| Modifier and Type | Method and Description |
|---|---|
List<PwaIcon> |
getHeaderIcons()
List of
PwaIcon:s that should be added to header. |
List<PwaIcon> |
getIcons()
List of all icons managed by
PwaRegistry. |
static PwaRegistry |
getInstance(javax.servlet.ServletContext servletContext)
Gets the pwa registry for the given servlet context.
|
List<PwaIcon> |
getManifestIcons()
List of
PwaIcon:s that should be added to manifest.webmanifest. |
String |
getManifestJson()
manifest.webmanifest contents as a String.
|
String |
getOfflineHtml()
Static offline page as String.
|
PwaConfiguration |
getPwaConfiguration() |
String |
getRuntimeServiceWorkerJs()
sw-runtime.js (service worker JavaScript for precaching runtime generated
resources) as a String.
|
public PwaRegistry(PWA pwa, javax.servlet.ServletContext servletContext) throws IOException
pwa - the pwa annotationservletContext - the contextIOException - when icon or offline resources are not found.public static PwaRegistry getInstance(javax.servlet.ServletContext servletContext)
servletContext - the servlet context for which to get a route registry, not
nullnullpublic String getOfflineHtml()
public String getManifestJson()
public String getRuntimeServiceWorkerJs()
public List<PwaIcon> getHeaderIcons()
PwaIcon:s that should be added to header.PwaIcon:s that should be added to headerpublic List<PwaIcon> getManifestIcons()
PwaIcon:s that should be added to manifest.webmanifest.PwaIcon:s that should be added to
manifest.webmanifestpublic List<PwaIcon> getIcons()
PwaRegistry.PwaRegistrypublic PwaConfiguration getPwaConfiguration()
Copyright © 2021. All rights reserved.