Interface INBSPage


public interface INBSPage
Interface all compiled nbspages implement. The render() method of a compiled nbspage renders the page to the output stream set via the set(java.lang.String, java.lang.Object) method.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the specified string, marking it for localization.
    void
    Cleans up after rendering.
    get(String name)
    Returns specified parameter.
    get(String name, boolean ignoreUrlParams)
     
    get(String name, Class<?> reqClass, Object defaultValue)
    Returns specified parameter in a classcast safe manner.
    getString(String name, String defaultValue)
    Returns string version of specified parameter.
    getString(String name, String defaultValue, boolean ignoreUrlParams)
     
    void
    init(INBSPRuntime runtime)
    Initializes this page.
    void
    Prepares this page for rendering.
    void
    print(boolean p)
    Prints the specified primitive.
    void
    print(byte p)
    Prints the specified primitive.
    void
    print(byte[] a)
    Prints the specified array.
    void
    print(byte[] a, int start, int length)
    Prints the specified array.
    void
    print(char p)
    Prints the specified primitive.
    void
    print(char[] a)
    Prints the specified array.
    void
    print(char[] a, int start, int length)
    Prints the specified array.
    void
    print(double p)
    Prints the specified primitive.
    void
    print(float p)
    Prints the specified primitive.
    void
    print(int p)
    Prints the specified primitive.
    void
    print(long p)
    Prints the specified primitive.
    void
    Prints the specified object.
    void
    Prints the specified object.
    void
    Renders this page.
    void
    render(String file)
    Renders the specified page to this page's out with this page's params.
    void
    set(String name, Object o)
    Sets the specified object with the specified name.
  • Method Details

    • init

      void init(INBSPRuntime runtime)
      Initializes this page. Only needs to be done once per instance.
    • print

      void print(boolean p) throws IOException
      Prints the specified primitive.
      Parameters:
      p - Primitive to print
      Throws:
      IOException
    • print

      void print(byte p) throws IOException
      Prints the specified primitive.
      Parameters:
      p - Primitive to print
      Throws:
      IOException
    • print

      void print(char p) throws IOException
      Prints the specified primitive.
      Parameters:
      p - Primitive to print
      Throws:
      IOException
    • print

      void print(int p) throws IOException
      Prints the specified primitive.
      Parameters:
      p - Primitive to print
      Throws:
      IOException
    • print

      void print(long p) throws IOException
      Prints the specified primitive.
      Parameters:
      p - Primitive to print
      Throws:
      IOException
    • print

      void print(float p) throws IOException
      Prints the specified primitive.
      Parameters:
      p - Primitive to print
      Throws:
      IOException
    • print

      void print(double p) throws IOException
      Prints the specified primitive.
      Parameters:
      p - Primitive to print
      Throws:
      IOException
    • print

      void print(byte[] a) throws IOException
      Prints the specified array.
      Parameters:
      a - Array to print
      Throws:
      IOException
    • print

      void print(byte[] a, int start, int length) throws IOException
      Prints the specified array.
      Parameters:
      a - Array to print
      start - Index of first item to print.
      length - Length of items to print
      Throws:
      IOException
    • print

      void print(char[] a) throws IOException
      Prints the specified array.
      Parameters:
      a - Array to print
      Throws:
      IOException
    • print

      void print(char[] a, int start, int length) throws IOException
      Prints the specified array.
      Parameters:
      a - Array to print
      start - Index of first item to print.
      length - Length of items to print
      Throws:
      IOException
    • print

      void print(Object o) throws IOException
      Prints the specified object.
      Parameters:
      o - Object to print
      Throws:
      IOException
    • print

      void print(String o) throws IOException
      Prints the specified object.
      Parameters:
      o - Object to print
      Throws:
      IOException
    • babble

      String babble(String s)
      Returns the specified string, marking it for localization.
      Parameters:
      s - String marked for localization.
      Returns:
      The passed string.
    • get

      Object get(String name)
      Returns specified parameter.
      Parameters:
      name - Name of parameter to get.
      Returns:
      Parameter value or null if not found.
    • getString

      String getString(String name, String defaultValue)
      Returns string version of specified parameter.
      Parameters:
      name - Name of parameter to get.
      defaultValue - Default value to return if parameter not found or not a string.
      Returns:
      String value of specified parameter or the default vaule if not found.
    • get

      Object get(String name, Class<?> reqClass, Object defaultValue)
      Returns specified parameter in a classcast safe manner.
      Parameters:
      name - Name of parameter to get.
      reqClass - the class the parameter must be.
      defaultValue - Default value to return if parameter not found or not an instance of the required class.
      Returns:
      value of specified parameter or the default vaule if not found.
    • set

      void set(String name, Object o)
      Sets the specified object with the specified name. There are several reserved keys, including "out", "request", and "session", which should be used to set the output stream Writer, the current HttpServletRequest, and the current user's HttpSession, respectively.
    • prepare

      void prepare(Map<String,Object> params)
      Prepares this page for rendering.
    • render

      void render() throws Exception
      Renders this page.
      Throws:
      Exception
    • render

      void render(String file) throws Exception
      Renders the specified page to this page's out with this page's params.
      Parameters:
      file - URI specifing file to render.
      Throws:
      Exception
    • clear

      void clear()
      Cleans up after rendering.
    • get

      Object get(String name, boolean ignoreUrlParams)
    • getString

      String getString(String name, String defaultValue, boolean ignoreUrlParams)