|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DefinitionsFactory
Interface for creating a Definitions
object and managing
its contents.
DefinitionsFactory implementations are responsible for maintaining the data sources of Tiles configuration data and using the data to create Definitions sets. Implementations also know how to append locale-specific configuration data to an existing Definitions set.
Field Summary | |
---|---|
static String |
LOCALE_RESOLVER_IMPL_PROPERTY
Property name that specifies the implementation of LocaleResolver . |
static String |
READER_IMPL_PROPERTY
Property name that specifies the implementation of the DefinitionsReader. |
Method Summary | |
---|---|
void |
addSource(Object source)
Adds a source where Definition objects are stored. |
Definition |
getDefinition(String name,
TilesRequestContext tilesContext)
Returns a Definition object that matches the given name and Tiles context. |
void |
init(Map<String,String> params)
Initializes the DefinitionsFactory and its subcomponents. |
Definitions |
readDefinitions()
Creates and returns a Definitions set by reading
configuration data from the applied sources. |
Field Detail |
---|
static final String READER_IMPL_PROPERTY
static final String LOCALE_RESOLVER_IMPL_PROPERTY
LocaleResolver
.
Method Detail |
---|
void init(Map<String,String> params) throws TilesException
params
- The Map of configuration properties.
TilesException
- If a Tiles exception, such as an initialization
error, occurs.Definition getDefinition(String name, TilesRequestContext tilesContext) throws DefinitionsFactoryException
name
- The name of the Definition to return.tilesContext
- The Tiles context to use to resolve the definition.
DefinitionsFactoryException
- if an error occurs reading definitions.void addSource(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.Definitions readDefinitions() throws DefinitionsFactoryException
Definitions
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 |