/** * List of {@link PwaIcon}:s that should be added to manifest.webmanifest. * * @return List of {@link PwaIcon}:s that should be added to * manifest.webmanifest */ public List<PwaIcon> getManifestIcons() { return getIcons(PwaIcon.Domain.MANIFEST); }
/** * List of {@link PwaIcon}:s that should be added to header. * * @return List of {@link PwaIcon}:s that should be added to header */ public List<PwaIcon> getHeaderIcons() { return getIcons(PwaIcon.Domain.HEADER); }
private String initializeInstallPrompt(PwaConfiguration pwaConfiguration) { PwaIcon largest = getIcons().stream().filter(PwaIcon::shouldBeCached) .min((icon1, icon2) -> icon2.getWidth() - icon1.getWidth()) .orElse(null); return BootstrapHandler.readResource("default-pwa-prompt.html") .replace("%%%INSTALL%%%", "Install") .replace("%%%LOGO_PATH%%%", largest == null ? "" : pwaConfiguration.getRootUrl() + largest.getHref()) .replace("%%%PROJECT_NAME%%%", pwaConfiguration.getAppName()); }
List<String> filesToCahe = getIcons().stream() .filter(PwaIcon::shouldBeCached).map(PwaIcon::getCacheFormat) .collect(Collectors.toList());
private String initializeOfflinePage(PwaConfiguration config, URL resource) throws IOException { List<PwaIcon> iconList = getIcons().stream() .filter(PwaIcon::shouldBeCached).collect(Collectors.toList());
for (PwaIcon icon : pwaRegistry.getIcons()) { requestHandlerMap.put(icon.getRelHref(), (session, request, response) -> {