cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: xml-cocoon2/src/java/org/apache/cocoon/components/flow/javascript JavaScriptInterpreter.java SourceInfo.java ListInputStream.java
Date Wed, 26 Feb 2003 13:28:19 GMT
cziegeler    2003/02/26 05:28:19

  Modified:    src/java/org/apache/cocoon/environment Environment.java
                        AbstractEnvironment.java
               src/java/org/apache/cocoon/components/flow/javascript
                        JavaScriptInterpreter.java SourceInfo.java
                        ListInputStream.java
  Log:
  Updating code; removing dependencies on deprecated code
  
  Revision  Changes    Path
  1.19      +1 -16     xml-cocoon2/src/java/org/apache/cocoon/environment/Environment.java
  
  Index: Environment.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/environment/Environment.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- Environment.java	6 Feb 2003 15:13:21 -0000	1.18
  +++ Environment.java	26 Feb 2003 13:28:19 -0000	1.19
  @@ -51,7 +51,6 @@
   package org.apache.cocoon.environment;
   
   import org.apache.avalon.framework.component.ComponentManager;
  -import org.apache.cocoon.components.source.SourceHandler;
   import org.apache.excalibur.xmlizer.XMLizer;
   import java.io.IOException;
   import java.io.OutputStream;
  @@ -75,20 +74,6 @@
        * This is an internal method, use it at your own risk!
        */
       ComponentManager getComponentManager();
  -
  -    /**
  -     * Get the <code>SourceHandler</code> for the current request
  -     * This is an internal method, use it at your own risk!
  -     * @deprecated Not used anymore (FIXME - This should be removed)
  -     */
  -    SourceHandler getSourceHandler();
  -
  -    /**
  -     * Set the <code>SourceHandler</code> for the current request
  -     * This is an internal method, use it at your own risk!
  -     * @deprecated Not used anymore (FIXME - This should be removed)
  -     */
  -    void setSourceHandler(SourceHandler sourceHandler);
   
       /**
        * Set the <code>SourceResolver</code> and the <code>XMLizer</code>
  
  
  
  1.41      +1 -17     xml-cocoon2/src/java/org/apache/cocoon/environment/AbstractEnvironment.java
  
  Index: AbstractEnvironment.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/environment/AbstractEnvironment.java,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- AbstractEnvironment.java	20 Feb 2003 18:22:19 -0000	1.40
  +++ AbstractEnvironment.java	26 Feb 2003 13:28:19 -0000	1.41
  @@ -56,7 +56,6 @@
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
   
   import org.apache.cocoon.ProcessingException;
  -import org.apache.cocoon.components.source.SourceHandler;
   import org.apache.cocoon.components.source.SourceUtil;
   import org.apache.cocoon.util.BufferedOutputStream;
   
  @@ -182,21 +181,6 @@
           this.action = action;
           this.objectModel = new HashMap();
           this.rootContext = context;
  -    }
  -
  -    /**
  -     * Get the <code>SourceHandler</code> for the current request
  -     * @deprecated Not used anymore (FIXME - This should be removed)
  -     */
  -    public SourceHandler getSourceHandler() {
  -        return null;
  -    }
  -
  -    /**
  -     * Set the <code>SourceHandler</code> for the current request
  -     * @deprecated Not used anymore (FIXME - This should be removed)
  -     */
  -    public void setSourceHandler(SourceHandler sourceHandler) {
       }
   
       /**
  
  
  
  1.19      +5 -7      xml-cocoon2/src/java/org/apache/cocoon/components/flow/javascript/JavaScriptInterpreter.java
  
  Index: JavaScriptInterpreter.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/flow/javascript/JavaScriptInterpreter.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- JavaScriptInterpreter.java	23 Feb 2003 19:26:57 -0000	1.18
  +++ JavaScriptInterpreter.java	26 Feb 2003 13:28:19 -0000	1.19
  @@ -62,11 +62,9 @@
   import org.apache.cocoon.components.flow.Interpreter;
   import org.apache.cocoon.components.flow.WebContinuation;
   import org.apache.cocoon.environment.Environment;
  -import org.apache.cocoon.environment.ModifiableSource;
   import org.apache.cocoon.environment.ObjectModelHelper;
   import org.apache.cocoon.environment.Request;
   import org.apache.cocoon.environment.Session;
  -import org.apache.cocoon.environment.Source;
   import org.mozilla.javascript.Context;
   import org.mozilla.javascript.Function;
   import org.mozilla.javascript.NativeArray;
  @@ -79,6 +77,7 @@
   import org.mozilla.javascript.JavaScriptException;
   import org.mozilla.javascript.tools.debugger.ScopeProvider;
   import org.apache.commons.jxpath.ri.JXPathContextReferenceImpl;
  +import org.apache.excalibur.source.Source;
   /**
    * Interface with the JavaScript interpreter.
    *
  @@ -372,7 +371,7 @@
             Reader reader = new BufferedReader(new InputStreamReader(is));
             Context context = Context.getCurrentContext();
             Script compiledScript = context.compileReader(thrScope, reader,
  -                                                        src.getSystemId(), 
  +                                                        src.getURI(), 
                                                           1, null);
             compiledScripts.add(compiledScript);
         }
  @@ -424,9 +423,8 @@
         // FIXME: should we worry about synchronization?
         for (int i = 0, size = scripts.size(); i < size; i++) {
           Source src = (Source)scripts.get(i);
  -        if (src instanceof ModifiableSource)
  -          ((ModifiableSource)src).refresh();
  -        getLogger().debug("Checking " + src.getSystemId()
  +        src.refresh();
  +        getLogger().debug("Checking " + src.getURI()
                              + ", source " + src
                              + ", last modified " + src.getLastModified()
                              + ", last time check " + lastTimeCheck);
  @@ -451,7 +449,7 @@
   
         for (int i = 0; i < size; i++) {
           String source = (String)needResolve.get(i);
  -        Source src = environment.resolve(source);
  +        Source src = environment.resolveURI(source);
           scripts.add(src);
         }
         needResolve.clear();
  
  
  
  1.3       +2 -2      xml-cocoon2/src/java/org/apache/cocoon/components/flow/javascript/SourceInfo.java
  
  Index: SourceInfo.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/flow/javascript/SourceInfo.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SourceInfo.java	31 Jan 2003 22:51:24 -0000	1.2
  +++ SourceInfo.java	26 Feb 2003 13:28:19 -0000	1.3
  @@ -46,7 +46,7 @@
   
   package org.apache.cocoon.components.flow.javascript;
   
  -import org.apache.cocoon.environment.Source;
  +import org.apache.excalibur.source.Source;
   
   /**
    * Maintains line number information for a {@link
  @@ -67,7 +67,7 @@
   
     public String getSystemId()
     {
  -    return source.getSystemId();
  +    return source.getURI();
     }
   
     public int getLineNumbers()
  
  
  
  1.7       +1 -1      xml-cocoon2/src/java/org/apache/cocoon/components/flow/javascript/ListInputStream.java
  
  Index: ListInputStream.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/flow/javascript/ListInputStream.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ListInputStream.java	31 Jan 2003 22:51:24 -0000	1.6
  +++ ListInputStream.java	26 Feb 2003 13:28:19 -0000	1.7
  @@ -48,7 +48,7 @@
   
   import org.apache.cocoon.CascadingIOException;
   import org.apache.cocoon.ProcessingException;
  -import org.apache.cocoon.environment.Source;
  +import org.apache.excalibur.source.Source;
   
   import java.io.IOException;
   import java.io.InputStream;
  
  
  

Mime
View raw message