giacomo     00/12/15 12:44:36

  Modified:    src/org/apache/cocoon/matching Tag: xml-cocoon2
                        WildcardURIMatcherFactory.java
  Log:
  Replaced the obsolete MatcherFactory with CodeFactory
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.25  +6 -3      
xml-cocoon/src/org/apache/cocoon/matching/Attic/WildcardURIMatcherFactory.java
  
  Index: WildcardURIMatcherFactory.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon/src/org/apache/cocoon/matching/Attic/WildcardURIMatcherFactory.java,v
  retrieving revision 1.1.2.24
  retrieving revision 1.1.2.25
  diff -u -r1.1.2.24 -r1.1.2.25
  --- WildcardURIMatcherFactory.java    2000/12/15 20:35:13     1.1.2.24
  +++ WildcardURIMatcherFactory.java    2000/12/15 20:44:35     1.1.2.25
  @@ -8,6 +8,8 @@
   
   package org.apache.cocoon.matching;
   
  +import org.apache.cocoon.CodeFactory;
  +
   import org.apache.avalon.ConfigurationException;
   
   import org.w3c.dom.traversal.NodeIterator;
  @@ -22,10 +24,10 @@
    * @author <a href="mailto:[EMAIL PROTECTED]">Giacomo Pati</a>
    * @author <a href="mailto:[EMAIL PROTECTED]">Stefano Mazzocchi</a>
    * @author <a href="mailto:[EMAIL PROTECTED]">Berin Loritsch</a>
  - * @version CVS $Revision: 1.1.2.24 $ $Date: 2000/12/15 20:35:13 $
  + * @version CVS $Revision: 1.1.2.25 $ $Date: 2000/12/15 20:44:35 $
    */
   
  -public class WildcardURIMatcherFactory implements MatcherFactory {
  +public class WildcardURIMatcherFactory implements CodeFactory {
       protected Logger log = LogKit.getLoggerFor("cocoon");
   
       /** The int representing '*' in the pattern <code>int []</code>. */
  @@ -55,8 +57,9 @@
        */
       public String generateMethodSource (NodeIterator conf)
       throws ConfigurationException {
  +               //"String uri = 
((org.apache.cocoon.environment.http.HttpRequest) 
objectModel.get(Cocoon.REQUEST_OBJECT)).getRequestURI();" +
           return "HashMap map = new HashMap();" +
  -               "String uri = 
((org.apache.cocoon.environment.http.HttpRequest) 
objectModel.get(Cocoon.REQUEST_OBJECT)).getRequestURI();" +
  +               "String uri = ((HttpServletRequest) 
objectModel.get(Cocoon.REQUEST_OBJECT)).getRequestURI();" +
                  "if (uri.startsWith(\"/\")) uri = uri.substring(1);" +
                  "if 
(org.apache.cocoon.matching.helpers.WildcardURIMatcher.match (map, uri, 
pattern)) {" +
                  "return map;" +
  
  
  

Reply via email to