|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectorg.apache.tiles.factory.TilesContainerFactory
public class TilesContainerFactory
Factory provided for convenience. This factory creates a default implementation of the container, initializes, and puts it into service.
| Field Summary | |
|---|---|
static String |
CONTAINER_FACTORY_INIT_PARAM
Initialization parameter that represents the container factory class name. |
static String |
CONTAINER_FACTORY_MUTABLE_INIT_PARAM
Initialization parameter that indicates if the container factory is mutable. |
static String |
CONTEXT_FACTORY_INIT_PARAM
Initialization parameter that represents the context factory class name. |
protected Map<String,String> |
defaultConfiguration
The default configuration to be used by the factory. |
static String |
DEFINITIONS_FACTORY_INIT_PARAM
Initialization parameter that represents the definitions factory class name. |
static String |
PREPARER_FACTORY_INIT_PARAM
Initialization parameter that represents the preparer factory class name. |
| Constructor Summary | |
|---|---|
TilesContainerFactory()
|
|
| Method Summary | |
|---|---|
TilesContainer |
createContainer(Object context)
Creates a Tiles container. |
protected static Object |
createFactory(Map<String,String> configuration,
String initParameterName)
Creates a factory instance. |
MutableTilesContainer |
createMutableTilesContainer(Object context)
Creates a mutable Tiles container. |
TilesContainer |
createTilesContainer(Object context)
Creates an immutable Tiles container. |
static TilesContainerFactory |
getFactory(Object context)
Retrieve a factory instance as configured through the specified context. |
static TilesContainerFactory |
getFactory(Object context,
Map<String,String> defaults)
Retrieve a factory instance as configured through the specified context. |
protected static String |
getInitParameter(Object context,
String parameterName)
Returns the value of an initialization parameter. |
protected static Map<String,String> |
getInitParameterMap(Object context)
Returns a map containing parameters name-value entries. |
protected void |
initializeContainer(Object context,
BasicTilesContainer container)
Initializes a container. |
protected static String |
resolveFactoryName(Map<String,String> configuration,
String parameterName)
Resolves a factory class name. |
void |
setDefaultConfiguration(Map<String,String> defaultConfiguration)
Sets the default configuration parameters. |
void |
setDefaultValue(String key,
String value)
Sets one default configuration parameter value. |
protected void |
storeContainerDependencies(Object context,
Map<String,String> initParameters,
Map<String,String> configuration,
BasicTilesContainer container)
Stores container dependencies, that is called before TilesContainer.init(Map). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String CONTAINER_FACTORY_INIT_PARAM
public static final String CONTAINER_FACTORY_MUTABLE_INIT_PARAM
public static final String CONTEXT_FACTORY_INIT_PARAM
public static final String DEFINITIONS_FACTORY_INIT_PARAM
public static final String PREPARER_FACTORY_INIT_PARAM
protected Map<String,String> defaultConfiguration
| Constructor Detail |
|---|
public TilesContainerFactory()
| Method Detail |
|---|
public static TilesContainerFactory getFactory(Object context)
throws TilesException
context - the executing applications context.
Typically a ServletContext or PortletContext
TilesException - if an error occurs creating the factory.
public static TilesContainerFactory getFactory(Object context,
Map<String,String> defaults)
throws TilesException
context - the executing applications context. Typically a
ServletContext or PortletContextdefaults - Default configuration parameters values, used if the
context object has not the corresponding parameters.
TilesException - if an error occurs creating the factory.
public TilesContainer createContainer(Object context)
throws TilesException
context - The (application) context object.
TilesException - If something goes wrong during instantiation.public void setDefaultConfiguration(Map<String,String> defaultConfiguration)
defaultConfiguration - The default configuration parameters.
public void setDefaultValue(String key,
String value)
key - The key of the configuration parameter.value - The value of the configuration parameter.
public TilesContainer createTilesContainer(Object context)
throws TilesException
context - The (application) context object.
TilesException - If something goes wrong during initialization.
public MutableTilesContainer createMutableTilesContainer(Object context)
throws TilesException
context - The (application) context object.
TilesException - If something goes wrong during initialization.
protected void initializeContainer(Object context,
BasicTilesContainer container)
throws TilesException
context - The (application) context object to use.container - The container to be initialized.
TilesException - If something goes wrong during initialization.
protected void storeContainerDependencies(Object context,
Map<String,String> initParameters,
Map<String,String> configuration,
BasicTilesContainer container)
throws TilesException
TilesContainer.init(Map).
context - The (application) context object to use.initParameters - The initialization parameters.configuration - The merged configuration parameters (both defaults
and context ones).container - The container to use.
TilesException - If something goes wrong during initialization.
protected static Object createFactory(Map<String,String> configuration,
String initParameterName)
throws TilesException
configuration - The merged configuration parameters (both defaults
and context ones).initParameterName - The initialization parameter name from which the
class name is got.
TilesException - If something goes wrong during creation.
protected static String resolveFactoryName(Map<String,String> configuration,
String parameterName)
throws TilesException
configuration - The merged configuration parameters (both defaults
and context ones).parameterName - The name of the initialization parameter to use.
TilesException - If something goes wrong during resolution.
protected static String getInitParameter(Object context,
String parameterName)
throws TilesException
context - The (application) context object to use.parameterName - The parameter name to retrieve.
TilesException - If the context has not been recognized.
protected static Map<String,String> getInitParameterMap(Object context)
throws TilesException
context - The (application) context object to use.
TilesException - If the context object has not been recognized.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||