You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by da...@apache.org on 2006/10/02 12:42:58 UTC

svn commit: r451962 - in /cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/flow: AbstractInterpreter.java javascript/fom/FOM_JavaScriptInterpreter.java

Author: danielf
Date: Mon Oct  2 03:42:57 2006
New Revision: 451962

URL: http://svn.apache.org/viewvc?view=rev&rev=451962
Log:
Preparing to move the flowscript implementaion to an own block by inlining a flowscript specific method from the AbstractInterpreter into the FOM_JavaScriptInterpreter.

Modified:
    cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/flow/AbstractInterpreter.java
    cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/flow/javascript/fom/FOM_JavaScriptInterpreter.java

Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/flow/AbstractInterpreter.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/flow/AbstractInterpreter.java?view=diff&rev=451962&r1=451961&r2=451962
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/flow/AbstractInterpreter.java (original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/flow/AbstractInterpreter.java Mon Oct  2 03:42:57 2006
@@ -179,28 +179,6 @@
     }
 
     /**
-     * Call the Cocoon sitemap for the given URI, sending the output of the
-     * eventually matched pipeline to the specified outputstream.
-     *
-     * @param uri The URI for which the request should be generated.
-     * @param biz Extra data associated with the subrequest.
-     * @param out An OutputStream where the output should be written to.
-     * @exception Exception If an error occurs.
-     */
-    protected void process(String uri, Object biz, OutputStream out)
-    throws Exception {
-        // FIXME (SW): should we deprecate this method in favor of PipelineUtil?
-        PipelineUtil pipeUtil = new PipelineUtil();
-        try {
-            pipeUtil.contextualize(this.avalonContext);
-            pipeUtil.service(this.manager);
-            pipeUtil.processToStream(uri, biz, out);
-        } finally {
-            pipeUtil.dispose();
-        }
-    }
-
-    /**
      * @see org.apache.cocoon.components.flow.Interpreter#forwardTo(java.lang.String, java.lang.Object, org.apache.cocoon.components.flow.WebContinuation, org.apache.cocoon.environment.Redirector)
      */
     public void forwardTo(String uri, Object bizData,

Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/flow/javascript/fom/FOM_JavaScriptInterpreter.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/flow/javascript/fom/FOM_JavaScriptInterpreter.java?view=diff&rev=451962&r1=451961&r2=451962
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/flow/javascript/fom/FOM_JavaScriptInterpreter.java (original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/components/flow/javascript/fom/FOM_JavaScriptInterpreter.java Mon Oct  2 03:42:57 2006
@@ -43,6 +43,7 @@
 import org.apache.cocoon.components.flow.javascript.LocationTrackingDebugger;
 import org.apache.cocoon.components.flow.javascript.ScriptablePointerFactory;
 import org.apache.cocoon.components.flow.javascript.ScriptablePropertyHandler;
+import org.apache.cocoon.components.flow.util.PipelineUtil;
 import org.apache.cocoon.environment.ObjectModelHelper;
 import org.apache.cocoon.environment.Redirector;
 import org.apache.cocoon.environment.Request;
@@ -706,12 +707,29 @@
                         redirector);
     }
 
+    /**
+     * Call the Cocoon sitemap for the given URI, sending the output of the
+     * eventually matched pipeline to the specified outputstream.
+     *
+     * @param uri The URI for which the request should be generated.
+     * @param biz Extra data associated with the subrequest.
+     * @param out An OutputStream where the output should be written to.
+     * @exception Exception If an error occurs.
+     */
     // package access as this is called by FOM_Cocoon
     void process(Scriptable scope, FOM_Cocoon cocoon, String uri,
                  Object bizData, OutputStream out)
     throws Exception {
         setupView(scope, cocoon, null);
-        super.process(uri, bizData, out);
+        // FIXME (SW): should we deprecate this method in favor of PipelineUtil?
+        PipelineUtil pipeUtil = new PipelineUtil();
+        try {
+            pipeUtil.contextualize(this.avalonContext);
+            pipeUtil.service(this.manager);
+            pipeUtil.processToStream(uri, bizData, out);
+        } finally {
+            pipeUtil.dispose();
+        }
     }
 
     private void setupView(Scriptable scope, FOM_Cocoon cocoon, FOM_WebContinuation kont) {