Class PythonBaseFactory<T extends Assembler>
java.lang.Object
org.apache.turbine.services.assemblerbroker.util.python.PythonBaseFactory<T>
- Type Parameters:
T
- the specialized assembler type
- All Implemented Interfaces:
Loader<T>
,AssemblerFactory<T>
- Direct Known Subclasses:
PythonActionFactory
,PythonLayoutFactory
,PythonNavigationFactory
,PythonPageFactory
,PythonScreenFactory
public abstract class PythonBaseFactory<T extends Assembler>
extends Object
implements AssemblerFactory<T>
A factory that attempts to load a python class in the
JPython interpreter and execute it as a Turbine screen.
The JPython script should inherit from Turbine Screen or one
of its subclasses.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAssembler
(String subDirectory, String name) Get an Assembler.int
Get the size of a possibly configured cacheGet the loader for this type of assemblerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.turbine.services.assemblerbroker.util.AssemblerFactory
getManagedClass
Methods inherited from interface org.apache.turbine.modules.Loader
getAssembler
-
Field Details
-
PYTHON_PATH
Key for the python path- See Also:
-
PYTHON_CONFIG_FILE
Global config file. This is executed before every screen- See Also:
-
-
Constructor Details
-
PythonBaseFactory
public PythonBaseFactory()
-
-
Method Details
-
getAssembler
Get an Assembler.- Parameters:
subDirectory
- subdirectory within python.pathname
- name of the requested Assembler- Returns:
- an Assembler
- Throws:
Exception
- generic exception
-
getLoader
Get the loader for this type of assembler- Specified by:
getLoader
in interfaceAssemblerFactory<T extends Assembler>
- Returns:
- a Loader
-
getCacheSize
Get the size of a possibly configured cache- Specified by:
getCacheSize
in interfaceLoader<T extends Assembler>
- Returns:
- the size of the cache in bytes
-