org.apache.cocoon.matching
Class AbstractPreparableMatcher
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.matching.AbstractPreparableMatcher
- All Implemented Interfaces:
- Component, LogEnabled, Matcher, PreparableMatcher
- Direct Known Subclasses:
- AbstractRegexpMatcher
public abstract class AbstractPreparableMatcher
- extends AbstractLogEnabled
- implements PreparableMatcher
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).
- Version:
- CVS $Id: AbstractPreparableMatcher.html 1304258 2012-03-23 10:09:27Z ilgrosso $
- Author:
- Sylvain Wallez
Fields inherited from interface org.apache.cocoon.matching.Matcher |
ROLE |
Method Summary |
Map |
match(String pattern,
Map objectModel,
Parameters parameters)
Match the pattern by preparing it and matching the prepared pattern. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractPreparableMatcher
public AbstractPreparableMatcher()
match
public Map match(String pattern,
Map objectModel,
Parameters parameters)
throws PatternException
- Match the pattern by preparing it and matching the prepared pattern.
- Specified by:
match
in interface Matcher
- Parameters:
pattern
- The pattern to match against. Depending on the
implementation the pattern can contain wildcards
or regular expressions.objectModel
- The Map
with object of the
calling environment which can be used
to select values this matchers matches against.
- Returns:
- Map The returned
Map
object with
replacements for wildcards/regular-expressions
contained in the pattern.
If the return value is null there was no match.
- Throws:
PatternException
Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.