This project has retired. For details please refer to its Attic page.
AbstractPatternDefinitionResolver (Tiles 2 2.2.2 API)

org.apache.tiles.definition.pattern
Class AbstractPatternDefinitionResolver<T>

Package class diagram package AbstractPatternDefinitionResolver
java.lang.Object
  extended by org.apache.tiles.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 DefinitionPatternMatcher separated by customization key.
Implementations should provide a way to translate a definition to a DefinitionPatternMatcher.

Since:
2.2.0
Version:
$Rev: 823662 $ $Date: 2009-10-09 20:48:03 +0200 (ven, 09 ott 2009) $

Constructor Summary
AbstractPatternDefinitionResolver()
           
 
Method Summary
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.
 Definition resolveDefinition(String name, T customizationKey)
          Resolves a definition searching in all patterns for the requested customization key.
 Map<String,Definition> storeDefinitionPatterns(Map<String,Definition> localeDefsMap, T customizationKey)
          Stores definition patterns.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractPatternDefinitionResolver

public AbstractPatternDefinitionResolver()
Method Detail

resolveDefinition

public Definition resolveDefinition(String name,
                                    T customizationKey)
Resolves a definition searching in all patterns for the requested customization key.

Specified by:
resolveDefinition in interface PatternDefinitionResolver<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:
storeDefinitionPatterns in 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.

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


Copyright © 2001-2010 Apache Software Foundation. All Rights Reserved.