org.apache.turbine.modules
Class NavigationLoader

java.lang.Object
  extended byjava.util.Dictionary
      extended byjava.util.Hashtable
          extended byorg.apache.turbine.modules.GenericLoader
              extended byorg.apache.turbine.modules.NavigationLoader
All Implemented Interfaces:
java.lang.Cloneable, Loader, java.util.Map, java.io.Serializable

public class NavigationLoader
extends GenericLoader
implements Loader

The purpose of this class is to allow one to load and execute Navigation modules.

Version:
$Id: NavigationLoader.java 534527 2007-05-02 16:10:59Z tv $
Author:
Dave Bryson, Henning P. Schmiedehausen
See Also:
Serialized Form

Method Summary
 org.apache.ecs.ConcreteElement eval(RunData data, java.lang.String name)
          Attempts to load and execute the external Navigation.
 void exec(RunData data, java.lang.String name)
          Attempts to load and execute the external Navigation.
 Assembler getAssembler(java.lang.String name)
          Pulls out an instance of the object by name.
static NavigationLoader getInstance()
          The method through which this class is accessed.
 Navigation getInstance(java.lang.String name)
          Pulls out an instance of the Navigation by name.
 
Methods inherited from class org.apache.turbine.modules.GenericLoader
cache, getBasePackage, reload, setReload
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

eval

public org.apache.ecs.ConcreteElement eval(RunData data,
                                           java.lang.String name)
                                    throws java.lang.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:
data - Turbine information.
name - Name of object that will execute the navigation.
Throws:
java.lang.Exception - a generic exception.

exec

public void exec(RunData data,
                 java.lang.String name)
          throws java.lang.Exception
Attempts to load and execute the external Navigation.

Specified by:
exec in class GenericLoader
Parameters:
data - Turbine information.
name - Name of object instance.
Throws:
java.lang.Exception - a generic exception.

getAssembler

public Assembler getAssembler(java.lang.String name)
                       throws java.lang.Exception
Pulls out an instance of the object by name. Name is just the single name of the object. This is equal to getInstance but returns an Assembler object and is needed to fulfil the Loader interface.

Specified by:
getAssembler in interface Loader
Parameters:
name - Name of object instance.
Returns:
A Layout with the specified name, or null.
Throws:
java.lang.Exception - a generic exception.

getInstance

public Navigation getInstance(java.lang.String name)
                       throws java.lang.Exception
Pulls out an instance of the Navigation by name. Name is just the single name of the Navigation.

Parameters:
name - Name of requested Navigation
Returns:
A Navigation with the specified name, or null.
Throws:
java.lang.Exception - a generic exception.

getInstance

public static NavigationLoader getInstance()
The method through which this class is accessed.

Returns:
The single instance of this class.


Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.