org.apache.turbine.modules
Class ScreenLoader

java.lang.Object
  extended by org.apache.turbine.modules.GenericLoader<Screen>
      extended by org.apache.turbine.modules.ScreenLoader
All Implemented Interfaces:
Loader<Screen>

public class ScreenLoader
extends GenericLoader<Screen>
implements Loader<Screen>

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

Version:
$Id: ScreenLoader.java 1078552 2011-03-06 19:58:46Z tv $
Author:
Dave Bryson, Henning P. Schmiedehausen, Peter Courcoux

Field Summary
 
Fields inherited from class org.apache.turbine.modules.GenericLoader
ab
 
Method Summary
 org.apache.ecs.ConcreteElement eval(PipelineData pipelineData, String name)
          Attempts to load and execute the external Screen.
 org.apache.ecs.ConcreteElement eval(RunData data, String name)
          Deprecated. Use PipelineData version instead.
 void exec(PipelineData pipelineData, String name)
          Attempts to load and execute the Screen.
 void exec(RunData data, String name)
          Deprecated. Use PipelineData version instead.
 Screen getAssembler(String name)
          Pulls out an instance of the object by name.
 int getCacheSize()
          Get the size of a possibly configured cache
static ScreenLoader 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

@Deprecated
public org.apache.ecs.ConcreteElement eval(RunData data,
                                                      String name)
                                    throws Exception
Deprecated. Use PipelineData version instead.

Attempts to load and execute the external Screen. This is used when you want to execute a Screen which returns its output via a MultiPartElement instead of out the data.getPage() value. This allows you to easily chain the execution of Screen modules together.

Parameters:
data - Turbine information.
name - Name of object that will execute the screen.
Throws:
Exception - a generic exception.

eval

public org.apache.ecs.ConcreteElement eval(PipelineData pipelineData,
                                           String name)
                                    throws Exception
Attempts to load and execute the external Screen. This is used when you want to execute a Screen which returns its output via a MultiPartElement instead of out the data.getPage() value. This allows you to easily chain the execution of Screen modules together.

Parameters:
data - Turbine information.
name - Name of object that will execute the screen.
Throws:
Exception - a generic exception.

exec

@Deprecated
public void exec(RunData data,
                            String name)
          throws Exception
Deprecated. Use PipelineData version instead.

Attempts to load and execute the Screen. This is used when you want to execute a Screen which returns its output via the data.getPage() object.

Specified by:
exec in class GenericLoader<Screen>
Parameters:
data - Turbine information.
name - Name of object that will execute the screen.
Throws:
Exception - a generic exception.

exec

public void exec(PipelineData pipelineData,
                 String name)
          throws Exception
Attempts to load and execute the Screen. This is used when you want to execute a Screen which returns its output via the data.getPage() object.

Overrides:
exec in class GenericLoader<Screen>
Parameters:
data - Turbine information.
name - Name of object that will execute the screen.
Throws:
Exception - a generic exception.

getAssembler

public Screen getAssembler(String name)
                    throws 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<Screen>
Parameters:
name - Name of object instance.
Returns:
A Screen 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<Screen>
Returns:
the size of the cache in bytes
See Also:
Loader.getCacheSize()

getInstance

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

Returns:
The single instance of this class.


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