cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r420965 - /cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/RequestProcessor.java
Date Tue, 11 Jul 2006 19:56:11 GMT
Author: cziegeler
Date: Tue Jul 11 12:56:11 2006
New Revision: 420965

URL: http://svn.apache.org/viewvc?rev=420965&view=rev
Log:
Make processor settable

Modified:
    cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/RequestProcessor.java

Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/RequestProcessor.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/RequestProcessor.java?rev=420965&r1=420964&r2=420965&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/RequestProcessor.java
(original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/servlet/RequestProcessor.java
Tue Jul 11 12:56:11 2006
@@ -74,8 +74,8 @@
     /** The root settings. */
     protected final Settings settings;
 
-    /** The root processor. */
-    protected final Processor rootProcessor;
+    /** The processor. */
+    protected Processor processor;
 
     /**
      * An optional component that is called before and after processing all
@@ -94,7 +94,7 @@
             this.containerEncoding = encoding;
         }
         this.log = (Logger) this.cocoonBeanFactory.getBean(ProcessingUtil.LOGGER_ROLE);
-        this.rootProcessor = (Processor)this.cocoonBeanFactory.getBean(Processor.ROLE);
+        this.processor = (Processor)this.cocoonBeanFactory.getBean(Processor.ROLE);
         this.environmentContext = new HttpContext(this.servletContext);
         // get the optional request listener
         if (this.cocoonBeanFactory.containsBean(RequestListener.ROLE)) {
@@ -102,6 +102,10 @@
         }
     }
 
+    public void setProcessor(Processor processor) {
+        this.processor = processor;
+    }
+
     /**
      * Process the specified <code>HttpServletRequest</code> producing output
      * on the specified <code>HttpServletResponse</code>.
@@ -347,7 +351,7 @@
     protected boolean process(Environment environment) throws Exception {
         environment.startingProcessing();
         final int environmentDepth = EnvironmentHelper.markEnvironment();
-        EnvironmentHelper.enterProcessor(this.rootProcessor, environment);
+        EnvironmentHelper.enterProcessor(this.processor, environment);
         try {
             boolean result;
 
@@ -359,7 +363,7 @@
                             + e.getMessage());
                 }
             }
-            result = this.rootProcessor.process(environment);
+            result = this.processor.process(environment);
 
             if (this.requestListener != null) {
                 try {



Mime
View raw message