Class Bootstrap

java.lang.Object
com.oorian.bootstrap.Bootstrap

public class Bootstrap extends Object
Entry point for the Bootstrap library integration with Oorian.

This class provides static methods to configure paths and add Bootstrap resources to the page head. Bootstrap is a popular CSS framework that provides pre-built components and utility classes for building responsive web interfaces.

Basic Usage:


 // In your Page class
 @Override
 protected void createHead(Head head) {
     Bootstrap.addAllResources(head);
 }
 

Custom Paths:


 // Configure custom paths for production builds
 Bootstrap.setBootstrapRootPath("/custom/bootstrap");
 Bootstrap.addAllResources(head);
 
See Also:
  • Constructor Details

    • Bootstrap

      public Bootstrap()
  • Method Details

    • setOorianBootstrapJsPath

      public static void setOorianBootstrapJsPath(String path)
      Sets the path to the Oorian-Bootstrap bridge JavaScript file.
      Parameters:
      path - Path to oorian.bootstrap.js
    • setBootstrapRootPath

      public static void setBootstrapRootPath(String path)
      Sets the root path where Bootstrap resources are located.
      Parameters:
      path - Root path for Bootstrap files (default: "/bootstrap")
    • getOorianBootstrapJs

      public static String getOorianBootstrapJs()
      Gets the path to the Oorian-Bootstrap bridge JavaScript.
      Returns:
      Full path to oorian.bootstrap.js
    • getBootstrapJs

      public static String getBootstrapJs()
      Gets the path to the Bootstrap JavaScript bundle.
      Returns:
      Path to bootstrap.bundle.min.js
    • getBootstrapCss

      public static String getBootstrapCss()
      Gets the path to the Bootstrap CSS file.
      Returns:
      Path to bootstrap.min.css
    • addBootstrapCss

      public static void addBootstrapCss(com.oorian.html.elements.Head head)
      Adds the Bootstrap CSS to the page head.
      Parameters:
      head - The page head element
    • addBootstrapJavascript

      public static void addBootstrapJavascript(com.oorian.html.elements.Head head)
      Adds the Bootstrap JavaScript to the page head.

      This method adds the Bootstrap bundle which includes Popper.js for positioning tooltips, popovers, and dropdowns.

      Parameters:
      head - The page head element
    • addOorianBootstrapJavascript

      public static void addOorianBootstrapJavascript(com.oorian.html.elements.Head head)
      Adds the Oorian-Bootstrap bridge JavaScript to the page head.

      This method adds the bridge script that provides additional functionality for Bootstrap components, such as component initialization and event handling.

      Parameters:
      head - The page head element
    • addAllResources

      public static void addAllResources(com.oorian.html.elements.Head head)
      Adds all Bootstrap resources to the page head.

      This convenience method adds the Bootstrap CSS, Bootstrap JavaScript bundle, and the Oorian-Bootstrap bridge script.

      Parameters:
      head - The page head element