org.apache.cocoon.matching
Class RequestAttributeMatcher
java.lang.Object
org.apache.cocoon.matching.RequestAttributeMatcher
- All Implemented Interfaces:
- Component, ThreadSafe, Matcher
public class RequestAttributeMatcher
- extends Object
- implements Matcher, ThreadSafe
This class allows for matching based on a request attribute.
If the specified request attribute exists, its string representation
is retrieved for later sitemap substitution.
Example:
<map:match type="request-attribute" pattern="next">
<map:redirect-to src="{1}"/>
</map:match>
- Version:
- CVS $Id: RequestAttributeMatcher.html 1304258 2012-03-23 10:09:27Z ilgrosso $
- Author:
- Vadim Gritsenko
Fields inherited from interface org.apache.cocoon.matching.Matcher |
ROLE |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RequestAttributeMatcher
public RequestAttributeMatcher()
match
public Map match(String pattern,
Map objectModel,
Parameters parameters)
- Match method to see if the request attribute exists. If it does
have a value the string represenation of attribute is added to
the array list for later sitemap substitution.
- Specified by:
match
in interface Matcher
- Parameters:
pattern
- name of request attribute to findobjectModel
- environment passed through via cocoon
- Returns:
- null or map containing value of request attribute 'pattern'
Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.