org.apache.cocoon.matching
Class HeaderMatcher
java.lang.Object
|
+--org.apache.cocoon.matching.HeaderMatcher
- All Implemented Interfaces:
- org.apache.avalon.framework.component.Component, Matcher, org.apache.avalon.framework.thread.ThreadSafe
- public class HeaderMatcher
- extends java.lang.Object
- implements Matcher, org.apache.avalon.framework.thread.ThreadSafe
This class allows for matching based on a request header.
If the specified request header parameter exists, its value is
retrieved for later sitemap substitution.
Example:
<map:match type="header" pattern="referer">
<map:redirect-to uri="{1}"/>
</map:match>
- Version:
- CVS $Id: HeaderMatcher.java,v 1.1.2.2 2002/10/03 04:40:44 vgritsenko Exp $
- Author:
- Vadim Gritsenko
Fields inherited from interface org.apache.cocoon.matching.Matcher |
ROLE |
Method Summary |
java.util.Map |
match(java.lang.String pattern,
java.util.Map objectModel,
org.apache.avalon.framework.parameters.Parameters parameters)
Match method to see if the request header exists. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HeaderMatcher
public HeaderMatcher()
match
public java.util.Map match(java.lang.String pattern,
java.util.Map objectModel,
org.apache.avalon.framework.parameters.Parameters parameters)
- Match method to see if the request header exists. If it does
have a value the header added to the array list for later
sitemap substitution.
- Specified by:
match
in interface Matcher
- Parameters:
pattern
- name of request header to findobjectModel
- environment passed through via cocoon- Returns:
- null or map containing value of request header 'pattern'
Copyright � 1999-2002 Apache Software Foundation. All Rights Reserved.