org.apache.cocoon.matching
Class SessionAttributeMatcher

java.lang.Object
  |
  +--org.apache.cocoon.matching.SessionAttributeMatcher
All Implemented Interfaces:
org.apache.avalon.framework.component.Component, Matcher, org.apache.avalon.framework.thread.ThreadSafe

public class SessionAttributeMatcher
extends java.lang.Object
implements Matcher, org.apache.avalon.framework.thread.ThreadSafe

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

Example:

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

Version:
CVS $Id: SessionAttributeMatcher.java,v 1.4 2002/02/22 07:03:52 cziegeler Exp $
Author:
Vadim Gritsenko

Fields inherited from interface org.apache.cocoon.matching.Matcher
ROLE
 
Constructor Summary
SessionAttributeMatcher()
           
 
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 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 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 attribute exists. If it does have a value the string represenation of attribute is added to the array list for later substitution with a xpath attribute.
Specified by:
match in interface Matcher
Parameters:
pattern - name of session attribute to find
objectModel - environment passed through via cocoon


Copyright © 1999-2002 Apache Software Foundation. All Rights Reserved.