cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From reinh...@apache.org
Subject svn commit: r643425 - in /cocoon/whiteboard/corona/trunk: corona-core/ corona-core/src/main/java/org/apache/cocoon/corona/pipeline/ corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/ corona-core/src/main/java/org/apache/cocoon/coron...
Date Tue, 01 Apr 2008 14:58:05 GMT
Author: reinhard
Date: Tue Apr  1 07:57:28 2008
New Revision: 643425

URL: http://svn.apache.org/viewvc?rev=643425&view=rev
Log:
move sitemap classes to sitemap module; move http specific classes to servlet module (test-cases
that test setting of status-codes don't work ATM -> some more refactoring is needed) [doing
pair programming together with Steven Dolg]

Added:
    cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/cocoon/corona/servlet/component/
    cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/cocoon/corona/servlet/component/RedirectorComponent.java
      - copied, changed from r643396, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/RedirectorComponent.java
    cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/cocoon/corona/servlet/component/RequestParametersGenerator.java
      - copied, changed from r643396, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/RequestParametersGenerator.java
    cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/cocoon/corona/servlet/util/
    cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/cocoon/corona/servlet/util/HttpContextHelper.java
  (with props)
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/ComponentProvider.java
      - copied unchanged from r639645, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/ComponentProvider.java
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/CustomException.java
      - copied unchanged from r639645, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/CustomException.java
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/Invocation.java
      - copied unchanged from r643396, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/Invocation.java
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/InvocationException.java
      - copied unchanged from r639645, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/InvocationException.java
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/InvocationImpl.java
      - copied unchanged from r643396, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/InvocationImpl.java
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/NoMatchingPipelineException.java
      - copied unchanged from r639645, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/NoMatchingPipelineException.java
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/SitemapBuilder.java
      - copied unchanged from r639645, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/SitemapBuilder.java
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/SitemapParameters.java
      - copied unchanged from r639645, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/SitemapParameters.java
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/SpringComponentProvider.java
      - copied unchanged from r639716, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/SpringComponentProvider.java
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/expression/
      - copied from r639645, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/expression/
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/expression/LanguageInterpreter.java
      - copied unchanged from r643421, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/expression/LanguageInterpreter.java
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/expression/LanguageInterpreterFactory.java
      - copied unchanged from r643421, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/expression/LanguageInterpreterFactory.java
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/expression/PrototypeLanguageInterpreterFactory.java
      - copied unchanged from r643421, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/expression/PrototypeLanguageInterpreterFactory.java
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/expression/SitemapLanguageInterpreter.java
      - copied unchanged from r643421, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/expression/SitemapLanguageInterpreter.java
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/node/
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/node/AbstractSitemapNode.java
      - copied unchanged from r639716, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/AbstractSitemapNode.java
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/node/ActNode.java
      - copied unchanged from r639645, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/ActNode.java
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/node/CallNode.java
      - copied unchanged from r639645, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/CallNode.java
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/node/ErrorNode.java
      - copied unchanged from r639645, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/ErrorNode.java
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/node/FlowNode.java
      - copied unchanged from r639645, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/FlowNode.java
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/node/GenerateNode.java
      - copied unchanged from r639645, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/GenerateNode.java
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/node/InvocationResult.java
      - copied unchanged from r639645, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/InvocationResult.java
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/node/MatchNode.java
      - copied unchanged from r639716, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/MatchNode.java
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/node/OtherwiseNode.java
      - copied unchanged from r639645, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/OtherwiseNode.java
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/node/ParameterNode.java
      - copied unchanged from r639645, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/ParameterNode.java
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/node/PipelineNode.java
      - copied unchanged from r639645, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/PipelineNode.java
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/node/PipelinesNode.java
      - copied unchanged from r639716, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/PipelinesNode.java
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/node/ReadNode.java
      - copied unchanged from r639645, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/ReadNode.java
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/node/RedirectNode.java
      - copied unchanged from r639645, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/RedirectNode.java
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/node/SelectNode.java
      - copied unchanged from r639645, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/SelectNode.java
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/node/SerializeNode.java
      - copied, changed from r643396, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/SerializeNode.java
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/node/Sitemap.java
      - copied unchanged from r639716, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/Sitemap.java
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/node/SitemapNode.java
      - copied unchanged from r639645, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/SitemapNode.java
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/node/SitemapNodeFactory.java
      - copied unchanged from r639645, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/SitemapNodeFactory.java
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/node/TransformNode.java
      - copied unchanged from r639645, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/TransformNode.java
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/node/WhenNode.java
      - copied unchanged from r639645, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/WhenNode.java
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/node/annotations/
      - copied from r639645, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/annotations/
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/node/annotations/NodeChild.java
      - copied unchanged from r643421, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/annotations/NodeChild.java
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/node/annotations/Parameter.java
      - copied unchanged from r643421, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/annotations/Parameter.java
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/resource/
      - copied from r639645, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/resource/
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/resource/ClassPathResourceResolver.java
      - copied unchanged from r643421, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/resource/ClassPathResourceResolver.java
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/resource/ResourceResolver.java
      - copied unchanged from r643421, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/resource/ResourceResolver.java
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/util/
      - copied from r639645, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/util/
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/util/ExceptionHandler.java
      - copied unchanged from r643421, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/util/ExceptionHandler.java
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/util/WildcardMatcherHelper.java
      - copied unchanged from r643421, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/util/WildcardMatcherHelper.java
Removed:
    cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/RedirectorComponent.java
    cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/RequestParametersGenerator.java
    cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/util/HttpContextHelper.java
Modified:
    cocoon/whiteboard/corona/trunk/corona-core/pom.xml
    cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/CachingPipeline.java
    cocoon/whiteboard/corona/trunk/corona-core/src/main/resources/META-INF/cocoon/spring/applicationContext.xml
    cocoon/whiteboard/corona/trunk/corona-core/src/main/resources/META-INF/cocoon/spring/corona-pipeline-component.xml
    cocoon/whiteboard/corona/trunk/corona-servlet/pom.xml
    cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/cocoon/corona/servlet/SitemapServlet.java
    cocoon/whiteboard/corona/trunk/corona-servlet/src/test/java/org/apache/cocoon/corona/sitemap/SitemapBuilderTest.java

Modified: cocoon/whiteboard/corona/trunk/corona-core/pom.xml
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-core/pom.xml?rev=643425&r1=643424&r2=643425&view=diff
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-core/pom.xml (original)
+++ cocoon/whiteboard/corona/trunk/corona-core/pom.xml Tue Apr  1 07:57:28 2008
@@ -46,11 +46,6 @@
       <artifactId>commons-lang</artifactId>
     </dependency>
     <dependency>
-      <groupId>javax.servlet</groupId>
-      <artifactId>servlet-api</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
       <scope>test</scope>

Modified: cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/CachingPipeline.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/CachingPipeline.java?rev=643425&r1=643424&r2=643425&view=diff
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/CachingPipeline.java
(original)
+++ cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/CachingPipeline.java
Tue Apr  1 07:57:28 2008
@@ -29,7 +29,6 @@
 import org.apache.cocoon.corona.pipeline.caching.PipelineCache;
 import org.apache.cocoon.corona.pipeline.component.CachingPipelineComponent;
 import org.apache.cocoon.corona.pipeline.component.PipelineComponent;
-import org.apache.cocoon.corona.sitemap.Invocation;
 
 public class CachingPipeline extends AbstractPipeline {
 

Modified: cocoon/whiteboard/corona/trunk/corona-core/src/main/resources/META-INF/cocoon/spring/applicationContext.xml
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-core/src/main/resources/META-INF/cocoon/spring/applicationContext.xml?rev=643425&r1=643424&r2=643425&view=diff
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-core/src/main/resources/META-INF/cocoon/spring/applicationContext.xml
(original)
+++ cocoon/whiteboard/corona/trunk/corona-core/src/main/resources/META-INF/cocoon/spring/applicationContext.xml
Tue Apr  1 07:57:28 2008
@@ -34,4 +34,5 @@
   <bean name="org.apache.cocoon.corona.sitemap.Invocation" class="org.apache.cocoon.corona.sitemap.InvocationImpl"
scope="prototype">
     <property name="componentProvider" ref="org.apache.cocoon.corona.sitemap.ComponentProvider"
/>
   </bean>
+
 </beans>

Modified: cocoon/whiteboard/corona/trunk/corona-core/src/main/resources/META-INF/cocoon/spring/corona-pipeline-component.xml
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-core/src/main/resources/META-INF/cocoon/spring/corona-pipeline-component.xml?rev=643425&r1=643424&r2=643425&view=diff
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-core/src/main/resources/META-INF/cocoon/spring/corona-pipeline-component.xml
(original)
+++ cocoon/whiteboard/corona/trunk/corona-core/src/main/resources/META-INF/cocoon/spring/corona-pipeline-component.xml
Tue Apr  1 07:57:28 2008
@@ -26,7 +26,7 @@
     class="org.apache.cocoon.corona.pipeline.component.ReflectionPipelineComponentFactory">
     <property name="types">
     <map>
-    <entry key="redirector" value="org.apache.cocoon.corona.pipeline.component.RedirectorComponent"
/>
+    <entry key="redirector" value="org.apache.cocoon.corona.servlet.component.RedirectorComponent"
/>
     <entry key="generator:file" value="org.apache.cocoon.corona.pipeline.component.FileGenerator"
/>
     <entry key="serializer:xml" value="org.apache.cocoon.corona.pipeline.component.XMLSerializer"
/>
     <entry key="reader:file" value="org.apache.cocoon.corona.pipeline.component.FileReaderComponent"
/>
@@ -53,10 +53,10 @@
 
   <bean name="generator:file" class="org.apache.cocoon.corona.pipeline.component.FileGenerator"
scope="prototype" />
 
-  <bean name="generator:request-parameters" class="org.apache.cocoon.corona.pipeline.component.RequestParametersGenerator"
scope="prototype" />
+  <bean name="generator:request-parameters" class="org.apache.cocoon.corona.servlet.component.RequestParametersGenerator"
scope="prototype" />
 
   <bean name="reader:file" class="org.apache.cocoon.corona.pipeline.component.FileReaderComponent"
scope="prototype" />
 
-  <bean name="redirector" class="org.apache.cocoon.corona.pipeline.component.RedirectorComponent"
scope="prototype" />
+  <bean name="redirector" class="org.apache.cocoon.corona.servlet.component.RedirectorComponent"
scope="prototype" />
 
 </beans>

Modified: cocoon/whiteboard/corona/trunk/corona-servlet/pom.xml
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-servlet/pom.xml?rev=643425&r1=643424&r2=643425&view=diff
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-servlet/pom.xml (original)
+++ cocoon/whiteboard/corona/trunk/corona-servlet/pom.xml Tue Apr  1 07:57:28 2008
@@ -59,6 +59,7 @@
     <dependency>
       <groupId>javax.servlet</groupId>
       <artifactId>servlet-api</artifactId>
+      <scope>provided</scope>
     </dependency>
 
     <!-- Excalibur dependencies (Source Resolving) -->

Modified: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/cocoon/corona/servlet/SitemapServlet.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/cocoon/corona/servlet/SitemapServlet.java?rev=643425&r1=643424&r2=643425&view=diff
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/cocoon/corona/servlet/SitemapServlet.java
(original)
+++ cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/cocoon/corona/servlet/SitemapServlet.java
Tue Apr  1 07:57:28 2008
@@ -31,11 +31,11 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import org.apache.cocoon.corona.servlet.util.HttpContextHelper;
 import org.apache.cocoon.corona.sitemap.Invocation;
 import org.apache.cocoon.corona.sitemap.InvocationImpl;
 import org.apache.cocoon.corona.sitemap.SitemapBuilder;
 import org.apache.cocoon.corona.sitemap.node.Sitemap;
-import org.apache.cocoon.corona.sitemap.util.HttpContextHelper;
 import org.springframework.beans.BeansException;
 import org.springframework.beans.factory.BeanFactory;
 import org.springframework.beans.factory.BeanFactoryAware;

Copied: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/cocoon/corona/servlet/component/RedirectorComponent.java
(from r643396, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/RedirectorComponent.java)
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/cocoon/corona/servlet/component/RedirectorComponent.java?p2=cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/cocoon/corona/servlet/component/RedirectorComponent.java&p1=cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/RedirectorComponent.java&r1=643396&r2=643425&rev=643425&view=diff
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/RedirectorComponent.java
(original)
+++ cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/cocoon/corona/servlet/component/RedirectorComponent.java
Tue Apr  1 07:57:28 2008
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.cocoon.corona.pipeline.component;
+package org.apache.cocoon.corona.servlet.component;
 
 import java.io.IOException;
 import java.io.OutputStream;
@@ -24,7 +24,9 @@
 
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.cocoon.corona.sitemap.util.HttpContextHelper;
+import org.apache.cocoon.corona.pipeline.component.Finisher;
+import org.apache.cocoon.corona.pipeline.component.Starter;
+import org.apache.cocoon.corona.servlet.util.HttpContextHelper;
 
 public class RedirectorComponent implements Starter, Finisher {
 

Copied: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/cocoon/corona/servlet/component/RequestParametersGenerator.java
(from r643396, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/RequestParametersGenerator.java)
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/cocoon/corona/servlet/component/RequestParametersGenerator.java?p2=cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/cocoon/corona/servlet/component/RequestParametersGenerator.java&p1=cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/RequestParametersGenerator.java&r1=643396&r2=643425&rev=643425&view=diff
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/pipeline/component/RequestParametersGenerator.java
(original)
+++ cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/cocoon/corona/servlet/component/RequestParametersGenerator.java
Tue Apr  1 07:57:28 2008
@@ -16,15 +16,17 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.cocoon.corona.pipeline.component;
+package org.apache.cocoon.corona.servlet.component;
 
 import java.util.Enumeration;
 import java.util.Map;
 
 import javax.servlet.http.HttpServletRequest;
 
+import org.apache.cocoon.corona.pipeline.component.AbstractXMLProducer;
+import org.apache.cocoon.corona.pipeline.component.Starter;
+import org.apache.cocoon.corona.servlet.util.HttpContextHelper;
 import org.apache.cocoon.corona.sitemap.InvocationException;
-import org.apache.cocoon.corona.sitemap.util.HttpContextHelper;
 import org.xml.sax.SAXException;
 import org.xml.sax.helpers.AttributesImpl;
 

Added: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/cocoon/corona/servlet/util/HttpContextHelper.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/cocoon/corona/servlet/util/HttpContextHelper.java?rev=643425&view=auto
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/cocoon/corona/servlet/util/HttpContextHelper.java
(added)
+++ cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/cocoon/corona/servlet/util/HttpContextHelper.java
Tue Apr  1 07:57:28 2008
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cocoon.corona.servlet.util;
+
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+
+public class HttpContextHelper {
+
+    private static final String HTTP_SERVLET_REQUEST_KEY = HttpServletRequest.class.getName();
+
+    private static final String HTTP_SERVLET_RESPONSE_KEY = HttpServletResponse.class.getName();
+
+    public static HttpServletRequest getRequest(Map<String, ? extends Object> parameters)
{
+        Object parameter = parameters.get(HTTP_SERVLET_REQUEST_KEY);
+        if (parameter instanceof HttpServletRequest) {
+            return (HttpServletRequest) parameter;
+        }
+
+        throw new IllegalStateException(
+                "A HttpServletRequest is not available. This might indicate an invocation
outside a servlet.");
+    }
+
+    public static HttpServletResponse getResponse(Map<String, ? extends Object> parameters)
{
+        Object parameter = parameters.get(HTTP_SERVLET_RESPONSE_KEY);
+        if (parameter instanceof HttpServletResponse) {
+            return (HttpServletResponse) parameter;
+        }
+
+        throw new IllegalStateException(
+                "A HttpServletResponse is not available. This might indicate an invocation
outside a servlet.");
+    }
+
+    public static void storeRequest(HttpServletRequest httpServletRequest, Map<String,
Object> parameters) {
+        parameters.put(HTTP_SERVLET_REQUEST_KEY, httpServletRequest);
+    }
+
+    public static void storeResponse(HttpServletResponse httpServletResponse, Map<String,
Object> parameters) {
+        parameters.put(HTTP_SERVLET_RESPONSE_KEY, httpServletResponse);
+    }
+}

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/cocoon/corona/servlet/util/HttpContextHelper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/cocoon/corona/servlet/util/HttpContextHelper.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/cocoon/corona/servlet/util/HttpContextHelper.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: cocoon/whiteboard/corona/trunk/corona-servlet/src/test/java/org/apache/cocoon/corona/sitemap/SitemapBuilderTest.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-servlet/src/test/java/org/apache/cocoon/corona/sitemap/SitemapBuilderTest.java?rev=643425&r1=643424&r2=643425&view=diff
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-servlet/src/test/java/org/apache/cocoon/corona/sitemap/SitemapBuilderTest.java
(original)
+++ cocoon/whiteboard/corona/trunk/corona-servlet/src/test/java/org/apache/cocoon/corona/sitemap/SitemapBuilderTest.java
Tue Apr  1 07:57:28 2008
@@ -26,9 +26,9 @@
 
 import junit.framework.TestCase;
 
+import org.apache.cocoon.corona.servlet.util.HttpContextHelper;
 import org.apache.cocoon.corona.sitemap.node.InvocationResult;
 import org.apache.cocoon.corona.sitemap.node.Sitemap;
-import org.apache.cocoon.corona.sitemap.util.HttpContextHelper;
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 

Copied: cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/node/SerializeNode.java
(from r643396, cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/SerializeNode.java)
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/node/SerializeNode.java?p2=cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/node/SerializeNode.java&p1=cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/SerializeNode.java&r1=643396&r2=643425&rev=643425&view=diff
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-core/src/main/java/org/apache/cocoon/corona/sitemap/node/SerializeNode.java
(original)
+++ cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/node/SerializeNode.java
Tue Apr  1 07:57:28 2008
@@ -18,25 +18,19 @@
  */
 package org.apache.cocoon.corona.sitemap.node;
 
-import javax.servlet.http.HttpServletResponse;
-
 import org.apache.cocoon.corona.sitemap.Invocation;
 import org.apache.cocoon.corona.sitemap.node.annotations.Parameter;
-import org.apache.cocoon.corona.sitemap.util.HttpContextHelper;
 
 public class SerializeNode extends AbstractSitemapNode {
 
     private static final String SERIALIZER_CATEGORY = "serializer:";
 
     @Parameter
-    private String statusCode;
-
-    @Parameter
     private String type;
 
     /**
      * {@inheritDoc}
-     * 
+     *
      * @see org.apache.cocoon.corona.sitemap.node.AbstractSitemapNode#invoke(org.apache.cocoon.corona.sitemap.Invocation)
      */
     @Override
@@ -44,24 +38,17 @@
         // install the component
         invocation.installComponent(SERIALIZER_CATEGORY + this.type, this.getParameters());
 
-        if (this.statusCode != null) {
-            HttpServletResponse response = HttpContextHelper.getResponse(invocation.getParameters());
-            if (response != null) {
-                response.setStatus(Integer.parseInt(this.statusCode));
-            }
-        }
-
         // signal that we did some processing
         return InvocationResult.PROCESSED;
     }
 
     /**
      * {@inheritDoc}
-     * 
+     *
      * @see org.apache.cocoon.corona.sitemap.node.AbstractSitemapNode#toString()
      */
     @Override
     public String toString() {
-        return "SerializeNode(type=" + this.type + ", status-code=" + this.statusCode + ")";
+        return "SerializeNode(type=" + this.type + ")";
     }
 }



Mime
View raw message