public abstract class WebAppManifest extends Object
Please refer to PWAResourceHandler
for usage instructions.
PWAResourceHandler
Modifier and Type | Class and Description |
---|---|
protected static class |
WebAppManifest.Category
Enumeration of categories, to be used in
getCategories() . |
protected static class |
WebAppManifest.Dir
Enumeration of text direction types, to be used in
getDir() . |
protected static class |
WebAppManifest.Display
Enumeration of display modes, to be used in
getDisplay() . |
protected static class |
WebAppManifest.ImageResource
To be used in
getIcons() . |
protected static class |
WebAppManifest.Orientation
Enumeration of orientation modes, to be used in
getOrientation() . |
protected static class |
WebAppManifest.Platform
Enumeration of related application platforms, to be used in
WebAppManifest.RelatedApplication.getPlatform() . |
protected static class |
WebAppManifest.RelatedApplication
To be used in
getRelatedApplications() |
protected static class |
WebAppManifest.Size
To be used in
WebAppManifest.ImageResource.getSizes() . |
Constructor and Description |
---|
WebAppManifest() |
Modifier and Type | Method and Description |
---|---|
String |
getBackgroundColor()
Returns the placeholder background color of your web application.
|
protected Collection<String> |
getCacheableViewIds()
Returns a collection of JSF view IDs which should be cached via the service worker so that they are available offline.
|
Collection<WebAppManifest.Category> |
getCategories()
Returns a collection of categories where your web application supposedly belongs to.
|
String |
getDescription()
Returns the description of your web application.
|
WebAppManifest.Dir |
getDir()
Returns the default text direction type of your web application.
|
WebAppManifest.Display |
getDisplay()
Returns the default display mode of your web application.
|
String |
getIarcRatingId()
Returns the IARC rating ID of your web application.
|
abstract Collection<WebAppManifest.ImageResource> |
getIcons()
Returns the icons of your web application.
|
String |
getLang()
Returns the default language of your web application.
|
abstract String |
getName()
Returns the name of your web application.
|
protected String |
getOfflineViewId()
Returns the JSF view ID which should represent the "You're offline!" error page.
|
WebAppManifest.Orientation |
getOrientation()
Returns the default orientation mode of your web application.
|
Collection<WebAppManifest.RelatedApplication> |
getRelatedApplications()
Returns a collection of related (native) applications that provide similar/equivalent functionality as your web application.
|
String |
getScope()
Returns the scope of this manifest.
|
String |
getShortName()
Returns the short name of your web application.
|
String |
getStartUrl()
Returns the default home URL of your web application.
|
String |
getThemeColor()
Returns the theme color of your web application.
|
boolean |
isPreferRelatedApplications()
Returns whether the applications listed in
getRelatedApplications() should be preferred over the web application. |
public abstract String getName()
public abstract Collection<WebAppManifest.ImageResource> getIcons()
public String getLang()
Faces.getDefaultLocale()
with a fallback of Locale.getDefault()
.public WebAppManifest.Dir getDir()
WebAppManifest.Dir.AUTO
.public WebAppManifest.Display getDisplay()
WebAppManifest.Display.BROWSER
.public WebAppManifest.Orientation getOrientation()
WebAppManifest.Orientation.ANY
.public String getStartUrl()
Faces.getRequestBaseURL()
.protected Collection<String> getCacheableViewIds()
WebXml.getWelcomeFiles()
.
If this method returns an empty collection, then no service worker will be generated.protected String getOfflineViewId()
null
, meaning that there is no such one.
If getCacheableViewIds()
returns an empty collection, then this method will be ignored.public String getScope()
null
.public String getShortName()
null
.public String getDescription()
null
.public String getThemeColor()
null
.public String getBackgroundColor()
null
.public Collection<WebAppManifest.Category> getCategories()
public String getIarcRatingId()
null
.public Collection<WebAppManifest.RelatedApplication> getRelatedApplications()
public boolean isPreferRelatedApplications()
getRelatedApplications()
should be preferred over the web application. The default implementation returns false
.getRelatedApplications()
should be preferred over the web application.Copyright © 2012–2022 OmniFaces. All rights reserved.