Package org.apache.tiles.core.prepare.factory

# Class BasicPreparerFactory

java.lang.Object
org.apache.tiles.core.prepare.factory.BasicPreparerFactory

All Implemented Interfaces:
  `PreparerFactory`

Direct Known Subclasses:
  `StrutsPreparerFactory`

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

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected Map<String,ViewPreparer>`
  `preparers`
  Maps a preparer name to the instantiated preparer.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BasicPreparerFactory()`
  Constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected ViewPreparer`
  `createPreparer(String name)`
  Creates a view preparer for the given name.
  `ViewPreparer`
  `getPreparer(String name, Request 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 Details

  - ### preparers

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

- ## Constructor Details

  - ### BasicPreparerFactory

    public BasicPreparerFactory()
    Constructor.

- ## Method Details

  - ### getPreparer

    public ViewPreparer getPreparer(String name, Request context)
    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

  - ### createPreparer

    protected ViewPreparer createPreparer(String name)
    Creates a view preparer for the given name.
    Parameters:
      `name` - The name of the preparer.
    Returns:
      The created preparer.