org.apache.turbine.modules
Class GenericLoader

java.lang.Object
  |
  +--java.util.Dictionary
        |
        +--java.util.Hashtable
              |
              +--org.apache.turbine.modules.GenericLoader
All Implemented Interfaces:
java.lang.Cloneable, java.util.Map, java.io.Serializable
Direct Known Subclasses:
ActionLoader, LayoutLoader, NavigationLoader, PageLoader, ScheduledJobLoader, ScreenLoader

public abstract class GenericLoader
extends java.util.Hashtable

This is the base class for the loaders. It contains code that is used across all of the loaders. It also specifies the interface that is required to be called a Loader.

Version:
$Id: GenericLoader.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  boolean CACHE
           
private  boolean reload
           
private static java.lang.String TURBINE_PACKAGE
          Base packages path for Turbine
 
Fields inherited from class java.util.Hashtable
count, emptyEnumerator, emptyIterator, ENTRIES, entrySet, KEYS, keySet, loadFactor, modCount, serialVersionUID, table, threshold, values, VALUES
 
Constructor Summary
GenericLoader()
          Basic constructor for creating a loader.
GenericLoader(int i)
          Basic constructor for creating a loader.
 
Method Summary
 boolean cache()
          If set to true, then cache the Loader objects.
abstract  void exec(RunData data, java.lang.String name)
          Attempts to load and execute the external action that has been set.
static java.lang.String getBasePackage()
          Gets the base package where Turbine should find its default modules.
 boolean reload()
          Returns whether or not this external action is reload itself.
 GenericLoader setReload(boolean reload)
          Sets whether or not this external action is reload itself.
 
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

reload

private boolean reload

CACHE

private boolean CACHE

TURBINE_PACKAGE

private static final java.lang.String TURBINE_PACKAGE
Base packages path for Turbine
Constructor Detail

GenericLoader

public GenericLoader()
Basic constructor for creating a loader.

GenericLoader

public GenericLoader(int i)
Basic constructor for creating a loader.
Method Detail

cache

public boolean cache()
If set to true, then cache the Loader objects.
Returns:
True if the Loader objects are being cached.

exec

public abstract void exec(RunData data,
                          java.lang.String name)
                   throws java.lang.Exception
Attempts to load and execute the external action that has been set.
Throws:
java.lang.Exception - a generic exception.

reload

public boolean reload()
Returns whether or not this external action is reload itself. This is in cases where the Next button would be clicked, but since we are checking for that, we would go into an endless loop.
Returns:
True if the action is reload.

setReload

public GenericLoader setReload(boolean reload)
Sets whether or not this external action is reload itself. This is in cases where the Next button would be clicked, but since we are checking for that, we would go into an endless loop.
Parameters:
reload - True if the action must be marked as reload.
Returns:
Itself.

getBasePackage

public static java.lang.String getBasePackage()
Gets the base package where Turbine should find its default modules.
Returns:
A String with the base package name.


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