Class AbstractPatternDefinitionResolver<T>
java.lang.Object
org.apache.tiles.core.definition.pattern.AbstractPatternDefinitionResolver<T>
- Type Parameters:
- T- The type of the customization key.
- All Implemented Interfaces:
- PatternDefinitionResolver<T>
- Direct Known Subclasses:
- BasicPatternDefinitionResolver,- PrefixedPatternDefinitionResolver
public abstract class AbstractPatternDefinitionResolver<T>
extends Object
implements PatternDefinitionResolver<T>
A pattern definition resolver that stores 
Implementations should provide a way to translate a definition to a
DefinitionPatternMatcher
 separated by customization key. Implementations should provide a way to translate a definition to a
DefinitionPatternMatcher.- Since:
- 2.2.0
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected abstract Map<String,Definition> addDefinitionsAsPatternMatchers(List<DefinitionPatternMatcher> matchers, Map<String, Definition> defsMap) Adds definitions, filtering and adding them to the list of definition pattern matchers.voidclearPatternPaths(T customizationKey) Used to clear all entries in the localePatternPaths for a specific locale.resolveDefinition(String name, T customizationKey) Resolves a definition searching in all patterns for the requested customization key.storeDefinitionPatterns(Map<String, Definition> localeDefsMap, T customizationKey) Stores definition patterns.
- 
Constructor Details- 
AbstractPatternDefinitionResolverpublic AbstractPatternDefinitionResolver()
 
- 
- 
Method Details- 
resolveDefinitionResolves a definition searching in all patterns for the requested customization key.- Specified by:
- resolveDefinitionin interface- PatternDefinitionResolver<T>
- Parameters:
- name- The name of the definition.
- customizationKey- The customization key.
- Returns:
- The resolved definition.
 
- 
storeDefinitionPatternspublic Map<String,Definition> storeDefinitionPatterns(Map<String, Definition> localeDefsMap, T customizationKey) Stores definition patterns.- Specified by:
- storeDefinitionPatternsin interface- PatternDefinitionResolver<T>
- Parameters:
- localeDefsMap- The map of definitions that may contain also patterns.
- customizationKey- The customization key.
- Returns:
- The map of the definitions not recognized as containing definition patterns.
 
- 
addDefinitionsAsPatternMatchersprotected abstract 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.- 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.
- Since:
- 2.2.1
 
- 
clearPatternPathsUsed to clear all entries in the localePatternPaths for a specific locale. Necessary when reloading definition files to ensure that the list is cleared first- Specified by:
- clearPatternPathsin interface- PatternDefinitionResolver<T>
- Parameters:
- customizationKey- customization key
 
 
-