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 import org.apache.cocoon.environment.Request; 22 23 import java.util.HashMap ; 24 import java.util.Map ; 25 26 42 public class RequestParameterMatcher implements Matcher, ThreadSafe 43 { 44 53 public Map match(String pattern, Map objectModel, Parameters parameters) { 54 Request request = ObjectModelHelper.getRequest(objectModel); 55 56 String parameter = request.getParameter(pattern); 57 if (parameter == null) { 58 return null; } else { 60 Map map = new HashMap (); 61 map.put("1", parameter); 62 return map; } 64 } 65 } 66 | Popular Tags |