org.apache.cocoon.matching
Class SessionAttributeMatcher

java.lang.Object
  extended byorg.apache.cocoon.matching.SessionAttributeMatcher
All Implemented Interfaces:
org.apache.cocoon.matching.Matcher, ThreadSafe

public class SessionAttributeMatcher
extends Object
implements org.apache.cocoon.matching.Matcher, ThreadSafe

This class allows for matching based on a session attribute. If the specified session attribute exists, its string representation is retrieved for later sitemap substitution.

Example:

 <map:match type="session-attribute" pattern="style">
     <map:read src="{1}"/>
 </map:match>
 

Version:
$Id: SessionAttributeMatcher.html 1304280 2012-03-23 11:18:01Z ilgrosso $

Field Summary
 
Fields inherited from interface org.apache.cocoon.matching.Matcher
ROLE
 
Constructor Summary
SessionAttributeMatcher()
           
 
Method Summary
 Map match(String pattern, Map objectModel, Parameters parameters)
          Match method to see if the request attribute exists.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionAttributeMatcher

public SessionAttributeMatcher()
Method Detail

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 org.apache.cocoon.matching.Matcher
Parameters:
pattern - name of session attribute to find
objectModel - environment passed through via cocoon
Returns:
null or map containing value of session attribute 'pattern'


Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.