A matcher that can prepare patterns during sitemap setup for faster match at request time.
This is also a regular matcher, meaning the sitemap can decide either to prepare the pattern
or to match with a request-time evaluated pattern (for {..} substitution).
preparedMatch(Object preparedPattern,
Map objectModel,
Parameters parameters)
Matches the prepared pattern against some values in the object model (most often the
Request) and returns a Map object with replacements
for wildcards contained in the pattern.
Prepares a pattern in a form that allows faster match. For example, a regular
expression matcher can precompile the expression and return the corresponding
object. This method is called once for each pattern used with a particular matcher
class. The returned value is then passed back as the preparedPattern
parameter of preparedMatch(Object, Map, Parameters).
Parameters:
pattern - The pattern to prepare. Depending on the implementation the pattern
can contain wildcards or regular expressions.
Matches the prepared pattern against some values in the object model (most often the
Request) and returns a Map object with replacements
for wildcards contained in the pattern.
Parameters:
preparedPattern - The preparedPattern to match against, as returned by preparePattern(String).
objectModel - The Map with objects of the calling environment
which can be used to select values this matchers matches against.
Returns:
a Map object with replacements for wildcards/regular-expressions
contained in the pattern. If the return value is null there was no match.