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 RequestAttributeMatcher implements Matcher, ThreadSafe 41 { 42 51 public Map match(String pattern, Map objectModel, Parameters parameters) { 52 53 Object attribute = ObjectModelHelper.getRequest(objectModel).getAttribute(pattern); 54 55 if (attribute == null) { 56 return null; 57 } else { 58 Map map = new HashMap (); 59 map.put("1", attribute.toString()); 60 return map; 61 } 62 } 63 } 64 | Popular Tags |