Interface Page


public interface Page
One page of an extension: drawn from what its Renderer describes, or the plugin's own web page (view(String)). An extension with several pages shows them as tabs.
  • Method Details

    • id

      String id()
      Returns:
      the page's name in addresses
    • title

      Page title(String title)
      The page's name, as its title and its tab; its id until set.
      Parameters:
      title - the name
      Returns:
      this page
    • title

      Page title(String language, String title)
      The page's name in one of the dashboard's languages, en or fr.
      Parameters:
      language - the language's code
      title - the name in that language
      Returns:
      this page
    • permission

      Page permission(@Nullable String permission)
      The permission needed to see this page, on top of the extension's.
      Parameters:
      permission - a permission, or null for the extension's alone
      Returns:
      this page
    • render

      Page render(Renderer renderer)
      What describes the page, called for each dashboard that shows it, each time it is drawn.
      Parameters:
      renderer - what describes the page
      Returns:
      this page
    • on

      Page on(Execution execution)
      Where the renderer runs: off the server's threads (Execution.ASYNC) until set.
      Parameters:
      execution - where it runs
      Returns:
      this page
    • refreshEvery

      Page refreshEvery(@Nullable Duration period)
      Draws the page again on its own, at this pace, while a dashboard shows it. Without it, a page is drawn when it opens, after one of its actions, and when the plugin calls Extension.refresh(String).
      Parameters:
      period - one second at least, or null to stop
      Returns:
      this page
    • view

      Page view(String file)
      Makes the page the plugin's own web page: an HTML file of its assets (Extension.assets(String)), shown in a frame that fills the page. Its script finds the dashboard's in window.prism.
      Parameters:
      file - the file, under the assets' folder
      Returns:
      this page
    • hidden

      Page hidden()
      Keeps the page out of the tabs: it opens from a button (View.Buttons.open(String, String)) or after an action (Result.navigate(String)), as the detail of something.
      Returns:
      this page