Class DevPageBuilders

java.lang.Object
org.apache.juneau.petstore.console.pages.DevPageBuilders

public final class DevPageBuilders extends Object
Builder twins of the Developer pages: Custom cards (cards.ftlh), Rendering flavors (flavors.ftlh, flavors-react.ftlh), Secure (secure.ftlh), Themes (themes.ftlh), Charts (builder only), Data sources (builder only) and Dashboard (builder only).
Example:

return twin(req, DevPageBuilders.secure());

  • Method Details

    • cards

      public static PageSpec cards()
      Custom cards.

      The gauge card's body is the same {species, low, high} the FTL page authors: PageSpec runs it through the registered InventoryGaugeCardType, so both pages carry the same validated fragment.

      Returns:
      The page spec.
    • flavor

      public static PageSpec flavor(Flavor flavor)
      One Rendering flavors page.
      Parameters:
      flavor - The flavor.
      Returns:
      The page spec.
    • secure

      public static PageSpec secure()
      Secure.
      Returns:
      The page spec.
    • themes

      public static PageSpec themes(String theme, boolean custom, List<String> choices)
      Themes.

      The theme itself is drawn by the chrome (base.ftlh), so the spec carries the same petstoreTheme / petstoreCustomTheme attributes the FTL page does.

      Parameters:
      theme - The stock theme to draw in (the custom theme's seed when custom).
      custom - Whether the custom tokens are applied.
      choices - The theme names to offer.
      Returns:
      The page spec.
    • charts

      public static PageSpec charts()
      Charts (builder only): a line chart with markers, a threshold and a click topic, and a table whose ribbon highlights a point.
      Returns:
      The page spec.
    • data

      public static PageSpec data()
      Data sources (builder only): an hourly CSV source chunked by UTC day and cached in IndexedDB, over a range the page script publishes, drawn by a line chart.
      Returns:
      The page spec.
    • dashboard

      public static PageSpec dashboard(String variant, int version)
      Dashboard (builder only): a rail of every section kind over a 2-column grid of charts, bound to one CSV source.
      Parameters:
      variant - The source variant: ok, slow, truncated, error or right (the ok source with the rail on the right).
      version - The persist version; bumping it discards saved state.
      Returns:
      The page spec.