org.apache.turbine.modules

## Class NavigationLoader

- java.lang.Object
- - org.apache.turbine.modules.GenericLoader<Navigation>
  - - org.apache.turbine.modules.NavigationLoader

- All Implemented Interfaces:
    Loader<Navigation>

      public class NavigationLoader
      extends GenericLoader<Navigation>
      implements Loader<Navigation>

  The purpose of this class is to allow one to load and execute Navigation modules.
  Version:
    $Id: NavigationLoader.java 1709648 2015-10-20 17:08:10Z tv $
  Author:
    Dave Bryson, Henning P. Schmiedehausen, Peter Courcoux

- - ### Field Summary

    - ### Fields inherited from class org.apache.turbine.modules.GenericLoader

      `ab`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `eval(PipelineData pipelineData, String name)` Attempts to load and execute the external Navigation.
    `void` | `exec(PipelineData pipelineData, String name)` Attempts to load and execute the external Navigation.
    `Navigation` | `getAssembler(String name)` Pulls out an instance of the object by name.
    `int` | `getCacheSize()` Get the size of a possibly configured cache
    `static NavigationLoader` | `getInstance()` The method through which this class is accessed.

    - ### Methods inherited from class org.apache.turbine.modules.GenericLoader

      `getAssembler, getBasePackage, getPackages, reload, setReload`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### eval

          public String eval(PipelineData pipelineData,
                    String name)
                      throws Exception

      Attempts to load and execute the external Navigation. This is used when you want to execute a Navigation which returns its output via a MultiPartElement instead of out the data.getPage() value. This allows you to easily chain the execution of Navigation modules together.
      Parameters:
        `pipelineData` - Turbine information.
        `name` - Name of object that will execute the navigation.
      Returns:
        the navigation module output
      Throws:
        `Exception` - a generic exception.

    - #### exec

          public void exec(PipelineData pipelineData,
                  String name)
                    throws Exception

      Attempts to load and execute the external Navigation.
      Specified by:
        `exec` in class `GenericLoader<Navigation>`
      Parameters:
        `pipelineData` - Turbine information.
        `name` - Name of object instance.
      Throws:
        `Exception` - a generic exception.

    - #### getAssembler

          public Navigation getAssembler(String name)
                                  throws Exception

      Pulls out an instance of the object by name. Name is just the single name of the object.
      Specified by:
        `getAssembler` in interface `Loader<Navigation>`
      Parameters:
        `name` - Name of object instance.
      Returns:
        A Layout with the specified name, or null.
      Throws:
        `Exception` - a generic exception.

    - #### getCacheSize

          public int getCacheSize()

      Description copied from interface: `Loader`
      Get the size of a possibly configured cache
      Specified by:
        `getCacheSize` in interface `Loader<Navigation>`
      Returns:
        the size of the cache in bytes
      See Also:
        `Loader.getCacheSize()`

    - #### getInstance

          public static NavigationLoader getInstance()

      The method through which this class is accessed.
      Returns:
        The single instance of this class.

Copyright © 2000-2015 The Apache Software Foundation. All Rights Reserved.