org.apache.turbine.modules
Class NavigationLoader

java.lang.Object
  |
  +--java.util.Dictionary
        |
        +--java.util.Hashtable
              |
              +--org.apache.turbine.modules.GenericLoader
                    |
                    +--org.apache.turbine.modules.NavigationLoader
All Implemented Interfaces:
java.lang.Cloneable, java.util.Map, java.io.Serializable

public class NavigationLoader
extends GenericLoader

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

Version:
$Id: NavigationLoader.java,v 1.1.1.1 2001/08/16 05:08:29 jvanzyl Exp $
Author:
Dave Bryson
See Also:
Serialized Form

Inner classes inherited from class java.util.Map
java.util.Map.Entry
 
Field Summary
private static NavigationLoader instance
          The single instance of this class.
 
Fields inherited from class org.apache.turbine.modules.GenericLoader
CACHE, reload, TURBINE_PACKAGE
 
Fields inherited from class java.util.Hashtable
count, emptyEnumerator, emptyIterator, ENTRIES, entrySet, KEYS, keySet, loadFactor, modCount, serialVersionUID, table, threshold, values, VALUES
 
Constructor Summary
private NavigationLoader()
          These ctor's are private to force clients to use getInstance() to access this class.
private NavigationLoader(int i)
          These ctor's are private to force clients to use getInstance() to access this class.
 
Method Summary
private  void addInstance(java.lang.String name, Navigation navigation)
          Adds an instance of an object into the hashtable.
 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.
static NavigationLoader getInstance()
          The method through which this class is accessed.
 Navigation getInstance(java.lang.String name)
          Pulls out an instance of the object 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, getEnumeration, getIterator, hashCode, isEmpty, keys, keySet, put, putAll, readObject, rehash, remove, size, toString, values, writeObject
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

instance

private static NavigationLoader instance
The single instance of this class.
Constructor Detail

NavigationLoader

private NavigationLoader()
These ctor's are private to force clients to use getInstance() to access this class.

NavigationLoader

private NavigationLoader(int i)
These ctor's are private to force clients to use getInstance() to access this class.
Method Detail

addInstance

private void addInstance(java.lang.String name,
                         Navigation navigation)
Adds an instance of an object into the hashtable.
Parameters:
name - Name of object.
navigation - Navigation to be associated with name.

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.
Overrides:
exec in class GenericLoader
Parameters:
data - Turbine information.
name - Name of object instance.
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 object by name. Name is just the single name of the object.
Parameters:
name - Name of object instance.
Returns:
A Layout 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-2002 Apache Software Foundation. All Rights Reserved.