1 16 package org.apache.cocoon.matching; 17 18 import org.apache.avalon.framework.parameters.Parameters; 19 import org.apache.avalon.framework.thread.ThreadSafe; 20 import org.apache.cocoon.environment.ObjectModelHelper; 21 22 import java.util.HashMap ; 23 import java.util.Map ; 24 25 40 public class SessionAttributeMatcher implements Matcher, ThreadSafe 41 { 42 51 public Map match(String pattern, Map objectModel, Parameters parameters) { 52 53 Object attribute = ObjectModelHelper.getRequest(objectModel).getSession().getAttribute(pattern); 54 if (attribute == null) { 55 return null; 56 } else { 57 Map map = new HashMap (); 58 map.put("1", attribute.toString()); 59 return map; 60 } 61 } 62 } 63 | Popular Tags |