This project has retired. For details please refer to its Attic page.
BasicPreparerFactory (Tiles 2 2.0.7 API)

org.apache.tiles.preparer
Class BasicPreparerFactory

Package class diagram package BasicPreparerFactory
java.lang.Object
  extended by org.apache.tiles.preparer.BasicPreparerFactory
All Implemented Interfaces:
PreparerFactory

public class BasicPreparerFactory
extends Object
implements PreparerFactory

Default implementation of the PreparerFactory. This factory provides no contextual configuration. It simply instantiates the named preparerInstance and returns it.

Since:
Tiles 2.0
Version:
$Rev: 680124 $ $Date: 2008-07-27 17:20:00 +0200 (Sun, 27 Jul 2008) $

Field Summary
protected  Map<String,ViewPreparer> preparers
          Maps a preparer name to the instantiated preparer.
 
Constructor Summary
BasicPreparerFactory()
          Constructor.
 
Method Summary
protected  ViewPreparer createPreparer(String name)
          Creates a view preparer for the given name.
 ViewPreparer getPreparer(String name, TilesRequestContext context)
          Create a new instance of the named preparerInstance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

preparers

protected Map<String,ViewPreparer> preparers
Maps a preparer name to the instantiated preparer.

Constructor Detail

BasicPreparerFactory

public BasicPreparerFactory()
Constructor.

Method Detail

getPreparer

public ViewPreparer getPreparer(String name,
                                TilesRequestContext context)
                         throws TilesException
Create a new instance of the named preparerInstance. This factory expects all names to be qualified class names.

Specified by:
getPreparer in interface PreparerFactory
Parameters:
name - the named preparerInstance
context - current context
Returns:
ViewPreparer instance
Throws:
TilesException - If something goes wrong during preparer creation.

createPreparer

protected ViewPreparer createPreparer(String name)
                               throws TilesException
Creates a view preparer for the given name.

Parameters:
name - The name of the preparer.
Returns:
The created preparer.
Throws:
TilesException - If something goes wrong during instantiation, or if the created object is not an instance of ViewPreparer.


Copyright © 2001-2008 Apache Software Foundation. All Rights Reserved.