Class PrefixedPatternDefinitionResolver<T>
java.lang.Object
org.apache.tiles.definition.pattern.AbstractPatternDefinitionResolver<T>
org.apache.tiles.definition.pattern.PrefixedPatternDefinitionResolver<T>
- Type Parameters:
T
- The type of the customization key.
- All Implemented Interfaces:
PatternDefinitionResolver<T>
This resolver allows the use of multiple pattern matching languages. The
syntax of definition names must be
The different languages must be registered through the use of
LANGUAGENAME:expression
.The different languages must be registered through the use of
registerDefinitionPatternMatcherFactory(String, DefinitionPatternMatcherFactory)
method before using this resolver.- Since:
- 2.2.0
- Version:
- $Rev: 942880 $ $Date: 2010-05-11 05:58:07 +1000 (Tue, 11 May 2010) $
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Map<String,
Definition> addDefinitionsAsPatternMatchers
(List<DefinitionPatternMatcher> matchers, Map<String, Definition> defsMap) Adds definitions, filtering and adding them to the list of definition pattern matchers.void
registerDefinitionPatternMatcherFactory
(String language, DefinitionPatternMatcherFactory factory) Registers aDefinitionPatternMatcherFactory
connected to a particular language.Methods inherited from class org.apache.tiles.definition.pattern.AbstractPatternDefinitionResolver
clearPatternPaths, resolveDefinition, storeDefinitionPatterns
-
Constructor Details
-
PrefixedPatternDefinitionResolver
public PrefixedPatternDefinitionResolver()Constructor.- Since:
- 2.2.0
-
-
Method Details
-
registerDefinitionPatternMatcherFactory
public void registerDefinitionPatternMatcherFactory(String language, DefinitionPatternMatcherFactory factory) Registers aDefinitionPatternMatcherFactory
connected to a particular language.- Parameters:
language
- The name of the language.factory
- The pattern matcher factory to register.- Since:
- 2.2.0
-
addDefinitionsAsPatternMatchers
protected Map<String,Definition> addDefinitionsAsPatternMatchers(List<DefinitionPatternMatcher> matchers, Map<String, Definition> defsMap) Adds definitions, filtering and adding them to the list of definition pattern matchers. Only a subset of definitions will be transformed into definition pattern matchers.- Specified by:
addDefinitionsAsPatternMatchers
in classAbstractPatternDefinitionResolver<T>
- Parameters:
matchers
- The list containing the currently stored definition pattern matchers.defsMap
- The definition map to parse.- Returns:
- The map of the definitions not recognized as containing definition patterns.
-