Class ToolkitPack

java.lang.Object
org.apache.juneau.console.freemarker.ToolkitPack

public final class ToolkitPack extends Object
One named toolkit pack: ordered CSS and JS asset paths, the packs it depends on, its ToolkitPack.Kind, and the resolver that turns each path into a URL.

Register one through ConsoleFreemarkerMixin.Builder.registerToolkitPack(ToolkitPack). A pack registered under an existing name replaces that pack completely, including its dependsOn.

Example:

ToolkitPack.create("datatables-export") .js(jszip, pdfmake, vfsFonts) .dependsOn("datatables-buttons") .kind(ToolkitPack.Kind.VENDOR) .resolver(myResolver) .build();

Since:
10.0.0
  • Method Details

    • create

      public static ToolkitPack.Builder create(String name)
      Starts a pack.
      Parameters:
      name - The pack name. Must not be blank.
      Returns:
      A new builder.
    • name

      public String name()
      Returns the pack name.
      Returns:
      The pack name.
    • cssPaths

      public List<String> cssPaths()
      Returns the ordered CSS asset paths.
      Returns:
      The ordered CSS asset paths.
    • jsPaths

      public List<String> jsPaths()
      Returns the ordered JS asset paths.
      Returns:
      The ordered JS asset paths.
    • dependsOn

      public List<String> dependsOn()
      Returns the names of the packs this one loads after, in order.
      Returns:
      The names of the packs this one loads after, in order.
    • kind

      Returns the pack kind.
      Returns:
      The pack kind.
    • resolver

      Returns the asset-URL resolver.
      Returns:
      The asset-URL resolver.