java.lang.Object
org.omnifaces.resourcehandler.WebAppManifest
Please refer to PWAResourceHandler for usage instructions.
- Since:
- 3.6
- Author:
- Bauke Scholtz
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static enumEnumeration of categories, to be used ingetCategories().protected static enumEnumeration of text direction types, to be used ingetDir().protected static enumEnumeration of display modes, to be used ingetDisplay().protected static final classTo be used ingetIcons().protected static enumEnumeration of orientation modes, to be used ingetOrientation().protected static enumEnumeration of related application platforms, to be used inWebAppManifest.RelatedApplication.getPlatform().protected static final classTo be used ingetRelatedApplications()protected static final classTo be used ingetScreenshots()protected static enumAWebAppManifest.Screenshotform factorprotected static final classto be usedgetShortcuts()protected static final classTo be used inWebAppManifest.ImageResource.getSizes(). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the placeholder background color of your web application.protected Collection<String>Returns a collection of Faces view IDs which should be cached via the service worker so that they are available offline.Returns a collection of categories where your web application supposedly belongs to.Returns the description of your web application.getDir()Returns the default text direction type of your web application.Returns the default display mode of your web application.Returns the IARC rating ID of your web application.abstract Collection<WebAppManifest.ImageResource>getIcons()Returns the icons of your web application.getLang()Returns the default language of your web application.abstract StringgetName()Returns the name of your web application.protected StringReturns the Faces view ID which should represent the "You're offline!"Returns the default orientation mode of your web application.Returns a collection of related (native) applications that provide similar/equivalent functionality as your web application.getScope()Returns the scope of this manifest.A collection of screenshots of your application with different sizes and formats that the browser will show in the installation wizard popup.A collection of shortcut action link that the mobile operating system will render as a context action menu for the application.Returns the short name of your web application.Returns the default home URL of your web application.Returns the theme color of your web application.booleanReturns whether the applications listed ingetRelatedApplications()should be preferred over the web application.
-
Constructor Details
-
WebAppManifest
public WebAppManifest()
-
-
Method Details
-
getName
Returns the name of your web application.- Returns:
- The name of your web application.
- See Also:
-
getIcons
Returns the icons of your web application.- Returns:
- The icons of your web application.
- See Also:
-
getLang
Returns the default language of your web application. The default implementation returnsFaces.getDefaultLocale()with a fallback ofLocale.getDefault().- Returns:
- The default language of your web application.
-
getDir
Returns the default text direction type of your web application. The default implementation returnsWebAppManifest.Dir.AUTO.- Returns:
- The default text direction type of your web application.
-
getDisplay
Returns the default display mode of your web application. The default implementation returnsWebAppManifest.Display.BROWSER.- Returns:
- The default display mode of your web application.
- See Also:
-
getOrientation
Returns the default orientation mode of your web application. The default implementation returnsnullto let the device handle the orientation based on the combination of device orientation and user auto-orientation setting. Since OmniFaces 4.5, the default implementation returnsnull. The previous default value wasWebAppManifest.Orientation.ANY.- Returns:
- The default orientation mode of your web application.
- See Also:
-
getStartUrl
Returns the default home URL of your web application. The default implementation returnsFaces.getRequestBaseURL().- Returns:
- The default home URL of your web application.
- See Also:
-
getCacheableViewIds
Returns a collection of Faces view IDs which should be cached via the service worker so that they are available offline. The default implementation returns Faces view IDs derived fromWebXml.getWelcomeFiles(). If this method returns an empty collection, then no service worker will be generated.- Returns:
- A collection of Faces view IDs which should be cached via the service worker so that they are available offline.
- Since:
- 3.7
- See Also:
-
getOfflineViewId
Returns the Faces view ID which should represent the "You're offline!" error page. The default implementation returnsnull, meaning that there is no such one. IfgetCacheableViewIds()returns an empty collection, then this method will be ignored.- Returns:
- the Faces view ID which should represent the "You're offline!" error page.
- Since:
- 3.7
- See Also:
-
getScreenshots
A collection of screenshots of your application with different sizes and formats that the browser will show in the installation wizard popup. These images are intended to be also used by progressive web app stores.- Returns:
- A collection of screenshots of your application with different sizes and formats.
- Since:
- 4.5
- See Also:
-
getScope
Returns the scope of this manifest. The default implementation returnsnull.- Returns:
- The scope of this manifest.
- See Also:
-
getShortName
Returns the short name of your web application. The default implementation returnsnull.- Returns:
- The short name of your web application.
- See Also:
-
getDescription
Returns the description of your web application. The default implementation returnsnull.- Returns:
- The description of your web application.
- See Also:
-
getThemeColor
Returns the theme color of your web application. The default implementation returnsnull.- Returns:
- The theme color of your web application.
- See Also:
-
getBackgroundColor
Returns the placeholder background color of your web application. The default implementation returnsnull.- Returns:
- The placeholder background color of your web application.
- See Also:
-
getCategories
Returns a collection of categories where your web application supposedly belongs to. The default implementation returns an empty set.- Returns:
- A collection of categories where your web application supposedly belongs to.
- See Also:
-
getIarcRatingId
Returns the IARC rating ID of your web application. The default implementation returnsnull.- Returns:
- The IARC rating ID of your web application.
- See Also:
-
getRelatedApplications
Returns a collection of related (native) applications that provide similar/equivalent functionality as your web application. The default implementation returns an empty set.- Returns:
- A collection of related (native) applications that provide similar/equivalent functionality as your web application.
- See Also:
-
isPreferRelatedApplications
public boolean isPreferRelatedApplications()Returns whether the applications listed ingetRelatedApplications()should be preferred over the web application. The default implementation returnsfalse.- Returns:
- Whether the applications listed in
getRelatedApplications()should be preferred over the web application. - See Also:
-
getShortcuts
A collection of shortcut action link that the mobile operating system will render as a context action menu for the application.- Returns:
- A collection of shortcut action link that the mobile operating system will render as a context action menu for the application.
- Since:
- 4.5
- See Also:
-