Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.turbine.services.assemblerbroker.util.python
Class PythonBaseFactory<T extends Assembler>

    java.lang.Object
      org.apache.turbine.services.assemblerbroker.util.python.PythonBaseFactory<T>

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.

Version:
  $Id: PythonBaseFactory.java 1078552 2011-03-06 19:58:46Z tv $
Author:
  Leon Messerschmidt, Henning P. Schmiedehausen

Field Summary
`static String` | `PYTHON_CONFIG_FILE` Global config file.
`static String` | `PYTHON_PATH` Key for the python path

Constructor Summary
`PythonBaseFactory()`

Method Summary
`T` | `getAssembler(String subDirectory, String name)` Get an Assembler.
`int` | `getCacheSize()` Get the size of a possibly configured cache
`abstract 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.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.path
    `name` - 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 interface `AssemblerFactory<T extends Assembler>`
  Returns:
    a Loader

### getCacheSize

    public int getCacheSize()

  Get the size of a possibly configured cache

  Specified by:
    `getCacheSize` in interface `Loader<T extends Assembler>`
  Returns:
    the size of the cache in bytes

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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