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 Summary
Constructors -
Method Summary
Modifier 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
-
AbstractPatternDefinitionResolver
public AbstractPatternDefinitionResolver()
-
-
Method Details
-
resolveDefinition
Resolves a definition searching in all patterns for the requested customization key.- Specified by:
resolveDefinitionin interfacePatternDefinitionResolver<T>- Parameters:
name- The name of the definition.customizationKey- The customization key.- Returns:
- The resolved definition.
-
storeDefinitionPatterns
public Map<String,Definition> storeDefinitionPatterns(Map<String, Definition> localeDefsMap, T customizationKey) Stores definition patterns.- Specified by:
storeDefinitionPatternsin interfacePatternDefinitionResolver<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.
-
addDefinitionsAsPatternMatchers
protected 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
-
clearPatternPaths
Used 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 interfacePatternDefinitionResolver<T>- Parameters:
customizationKey- customization key
-