|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DefinitionsFactory
Interface for creating a ComponentDefinitions
object and managing
its contents.
DefinitionsFactory implementations are responsible for maintaining the data sources of Tiles configuration data and using the data to create ComponentDefinitions sets. Implementations also know how to append locale-specific configuration data to an existing ComponentDefinitions set.
Field Summary | |
---|---|
static java.lang.String |
DEFINITIONS_IMPL_PROPERTY
Property name that specifies the implementation of ComponentDefinitions. |
static java.lang.String |
READER_IMPL_PROPERTY
Property name that specifies the implementation of the DefinitionsReader. |
Method Summary | |
---|---|
void |
addSource(java.lang.Object source)
Adds a source where ComponentDefinition objects are stored. |
ComponentDefinition |
getDefinition(java.lang.String name,
TilesRequestContext tilesContext)
Returns a ComponentDefinition object that matches the given name and Tiles context |
void |
init(java.util.Map<java.lang.String,java.lang.String> params)
Initializes the DefinitionsFactory and its subcomponents. |
ComponentDefinitions |
readDefinitions()
Creates and returns a ComponentDefinitions set by reading
configuration data from the applied sources. |
Field Detail |
---|
static final java.lang.String READER_IMPL_PROPERTY
static final java.lang.String DEFINITIONS_IMPL_PROPERTY
Method Detail |
---|
void init(java.util.Map<java.lang.String,java.lang.String> params) throws DefinitionsFactoryException, org.apache.tiles.TilesException
params
- The Map of configuration properties.
DefinitionsFactoryException
- if an initialization error occurs.
org.apache.tiles.TilesException
ComponentDefinition getDefinition(java.lang.String name, TilesRequestContext tilesContext) throws DefinitionsFactoryException
name
- The name of the ComponentDefinition to return.tilesContext
- The Tiles context to use to resolve the definition.
DefinitionsFactoryException
- if an error occurs reading definitions.void addSource(java.lang.Object source) throws DefinitionsFactoryException
source
- The configuration source for definitions.
DefinitionsFactoryException
- if an invalid source is passed in or
an error occurs resolving the source to an actual data store.ComponentDefinitions readDefinitions() throws DefinitionsFactoryException
ComponentDefinitions
set by reading
configuration data from the applied sources.
DefinitionsFactoryException
- if an error occurs reading the
sources.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |