org.apache.turbine.modules
Class GenericLoader

java.lang.Object
  extended byjava.util.Dictionary
      extended byjava.util.Hashtable
          extended byorg.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 534527 2007-05-02 16:10:59Z tv $
Author:
Dave Bryson, Henning P. Schmiedehausen
See Also:
Serialized Form

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, 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
 

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-2008 Apache Software Foundation. All Rights Reserved.