1 16 package org.apache.cocoon.ajax; 17 18 import java.util.Collections ; 19 import java.util.Map ; 20 21 import org.apache.avalon.framework.parameters.Parameters; 22 import org.apache.avalon.framework.thread.ThreadSafe; 23 import org.apache.cocoon.environment.ObjectModelHelper; 24 import org.apache.cocoon.environment.Request; 25 import org.apache.cocoon.matching.Matcher; 26 import org.apache.cocoon.sitemap.PatternException; 27 28 42 public class AjaxRequestMatcher implements Matcher, ThreadSafe { 43 44 public Map match(String pattern, Map objectModel, Parameters parameters) throws PatternException { 45 Request req = ObjectModelHelper.getRequest(objectModel); 46 47 return AjaxHelper.isAjaxRequest(req) ? Collections.EMPTY_MAP : null; 48 } 49 } 50 | Popular Tags |