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 Modifier and Type Field Description static String
PYTHON_CONFIG_FILE
Global config file.static String
PYTHON_PATH
Key for the python path
-
Constructor Summary
Constructors Constructor Description PythonBaseFactory()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description T
getAssembler(String subDirectory, String name)
Get an Assembler.int
getCacheSize()
Get the size of a possibly configured cacheabstract Loader<T>
getLoader()
Get the loader for this type of assembler-
Methods 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 Detail
-
PYTHON_PATH
public static final String PYTHON_PATH
Key for the python path- See Also:
- Constant Field Values
-
PYTHON_CONFIG_FILE
public static final String PYTHON_CONFIG_FILE
Global config file. This is executed before every screen- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PythonBaseFactory
public PythonBaseFactory()
-
-
Method Detail
-
getAssembler
public T getAssembler(String subDirectory, String name) throws Exception
Get an Assembler.- Parameters:
subDirectory
- subdirectory within python.pathname
- name of the requested Assembler- Returns:
- an Assembler
- Throws:
Exception
- generic exception
-
getLoader
public abstract Loader<T> getLoader()
Get the loader for this type of assembler- Specified by:
getLoader
in interfaceAssemblerFactory<T extends Assembler>
- Returns:
- a Loader
-
getCacheSize
public int 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
-
-