Package jmri.server.web.app
Class JsonManifest
- java.lang.Object
-
- jmri.server.web.app.JsonManifest
-
- All Implemented Interfaces:
WebManifest
public class JsonManifest extends java.lang.Object implements WebManifest
Web Manifest built from manifest.json files.
-
-
Constructor Summary
Constructors Constructor Description JsonManifest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.String>
getAngularDependencies()
Get the Angular dependencies required by the servlet associated with the manifest.java.util.Set<AngularRoute>
getAngularRoutes()
Get the Angular routes supported by the servlet associated with the manifest.java.util.List<java.net.URL>
getAngularSources()
Get the sources for the Angular module components required by the servlet associated with the manifest.java.util.Set<WebMenuItem>
getNavigationMenuItems()
Get the navigation menu items that provide access to the servlet associated with the manifest.java.util.Set<java.net.URI>
getPreloadedTranslations(java.util.Locale locale)
Get the paths for JSON translation dictionaries to pre-load.java.util.List<java.lang.String>
getScripts()
Get any scripts the servlet associated with the manifest requires in the order required.java.util.List<java.lang.String>
getStyles()
Get any CSS style sheets the servlet associated with the manifest requires in the order required.
-
-
-
Constructor Detail
-
JsonManifest
public JsonManifest()
-
-
Method Detail
-
getNavigationMenuItems
public java.util.Set<WebMenuItem> getNavigationMenuItems()
Description copied from interface:WebManifest
Get the navigation menu items that provide access to the servlet associated with the manifest.- Specified by:
getNavigationMenuItems
in interfaceWebManifest
- Returns:
- a set of menu items; provide an empty set if the item should not be in the navigation menu
-
getScripts
public java.util.List<java.lang.String> getScripts()
Description copied from interface:WebManifest
Get any scripts the servlet associated with the manifest requires in the order required.- Specified by:
getScripts
in interfaceWebManifest
- Returns:
- a set of script URLs; provide an empty set if the item needs no scripts
-
getStyles
public java.util.List<java.lang.String> getStyles()
Description copied from interface:WebManifest
Get any CSS style sheets the servlet associated with the manifest requires in the order required.- Specified by:
getStyles
in interfaceWebManifest
- Returns:
- a set of style sheet URLs; provide an empty set if the item needs no style sheets
-
getAngularDependencies
public java.util.List<java.lang.String> getAngularDependencies()
Description copied from interface:WebManifest
Get the Angular dependencies required by the servlet associated with the manifest.- Specified by:
getAngularDependencies
in interfaceWebManifest
- Returns:
- an ordered list of angular dependencies
-
getAngularRoutes
public java.util.Set<AngularRoute> getAngularRoutes()
Description copied from interface:WebManifest
Get the Angular routes supported by the servlet associated with the manifest.- Specified by:
getAngularRoutes
in interfaceWebManifest
- Returns:
- a map of angular path to angular routing instructions
-
getAngularSources
public java.util.List<java.net.URL> getAngularSources()
Description copied from interface:WebManifest
Get the sources for the Angular module components required by the servlet associated with the manifest.- Specified by:
getAngularSources
in interfaceWebManifest
- Returns:
- a list of sources to include in the web app
-
getPreloadedTranslations
public java.util.Set<java.net.URI> getPreloadedTranslations(java.util.Locale locale)
Description copied from interface:WebManifest
Get the paths for JSON translation dictionaries to pre-load. If translation dictionaries exist, but not for the requested Locale, fallback onto the requested language, and, if that is also not available, to the English language with no country specified.- Specified by:
getPreloadedTranslations
in interfaceWebManifest
- Parameters:
locale
- the requested locale for the translations- Returns:
- a list of translation sources
-
-