Interface WebManifest

  • All Known Implementing Classes:
    JsonManifest

    public interface WebManifest
    Provide integration for the JMRI web services so servlets can visually integrate into the JMRI web site.
    • Method Summary

      All Methods Instance Methods Abstract 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.
    • Method Detail

      • getNavigationMenuItems

        @Nonnull
        java.util.Set<WebMenuItemgetNavigationMenuItems()
        Get the navigation menu items that provide access to the servlet associated with the manifest.
        Returns:
        a set of menu items; provide an empty set if the item should not be in the navigation menu
      • getScripts

        @Nonnull
        java.util.List<java.lang.String> getScripts()
        Get any scripts the servlet associated with the manifest requires in the order required.
        Returns:
        a set of script URLs; provide an empty set if the item needs no scripts
      • getStyles

        @Nonnull
        java.util.List<java.lang.String> getStyles()
        Get any CSS style sheets the servlet associated with the manifest requires in the order required.
        Returns:
        a set of style sheet URLs; provide an empty set if the item needs no style sheets
      • getAngularDependencies

        @Nonnull
        java.util.List<java.lang.String> getAngularDependencies()
        Get the Angular dependencies required by the servlet associated with the manifest.
        Returns:
        an ordered list of angular dependencies
      • getAngularRoutes

        @Nonnull
        java.util.Set<AngularRoutegetAngularRoutes()
        Get the Angular routes supported by the servlet associated with the manifest.
        Returns:
        a map of angular path to angular routing instructions
      • getAngularSources

        @Nonnull
        java.util.List<java.net.URL> getAngularSources()
        Get the sources for the Angular module components required by the servlet associated with the manifest.
        Returns:
        a list of sources to include in the web app
      • getPreloadedTranslations

        java.util.Set<java.net.URI> getPreloadedTranslations​(java.util.Locale locale)
        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.
        Parameters:
        locale - the requested locale for the translations
        Returns:
        a list of translation sources