cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From reinh...@apache.org
Subject svn commit: r638787 - in /cocoon/trunk/blocks/cocoon-it/src/main: java/org/apache/cocoon/it/ java/org/apache/cocoon/micro/ resources/COB-INF/ resources/META-INF/cocoon/avalon/ resources/META-INF/cocoon/spring/
Date Wed, 19 Mar 2008 11:12:53 GMT
Author: reinhard
Date: Wed Mar 19 04:12:35 2008
New Revision: 638787

URL: http://svn.apache.org/viewvc?rev=638787&view=rev
Log:
. use correct namespaces (part II)
. add a sample for COCOON-2179
  (problem with exception generator)

Added:
    cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/it/AnotherCustomException.java
  (with props)
    cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/it/AnotherExceptionThrowingAction.java
  (with props)
    cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/it/CustomException.java
      - copied, changed from r638768, cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/micro/it/CustomException.java
    cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/it/DateGenerator.java
      - copied, changed from r638768, cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/micro/it/DateGenerator.java
    cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/it/ExceptionThrowingAction.java
      - copied, changed from r638768, cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/micro/it/ExceptionThrowingAction.java
    cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/it/ITController.java
      - copied, changed from r638768, cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/micro/it/ITController.java
    cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/it/ParameterPassingMatcher.java
      - copied, changed from r638768, cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/micro/it/ParameterPassingMatcher.java
    cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/it/RequestParametersGenerator.java
      - copied, changed from r638768, cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/micro/it/RequestParametersGenerator.java
Removed:
    cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/micro/
Modified:
    cocoon/trunk/blocks/cocoon-it/src/main/resources/COB-INF/sitemap.xmap
    cocoon/trunk/blocks/cocoon-it/src/main/resources/META-INF/cocoon/avalon/cocoon-micro-it-sitemap-components.xconf
    cocoon/trunk/blocks/cocoon-it/src/main/resources/META-INF/cocoon/spring/cocoon-micro-it-controller.xml
    cocoon/trunk/blocks/cocoon-it/src/main/resources/META-INF/cocoon/spring/cocoon-micro-it-sitemap-components.xml

Added: cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/it/AnotherCustomException.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/it/AnotherCustomException.java?rev=638787&view=auto
==============================================================================
--- cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/it/AnotherCustomException.java
(added)
+++ cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/it/AnotherCustomException.java
Wed Mar 19 04:12:35 2008
@@ -0,0 +1,26 @@
+package org.apache.cocoon.it;
+
+/*
+ * 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.
+ */
+
+public class AnotherCustomException extends Exception {
+
+    public AnotherCustomException() {
+        super("Another Custom Exception");
+    }
+
+}

Propchange: cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/it/AnotherCustomException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/it/AnotherCustomException.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/it/AnotherCustomException.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/it/AnotherExceptionThrowingAction.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/it/AnotherExceptionThrowingAction.java?rev=638787&view=auto
==============================================================================
--- cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/it/AnotherExceptionThrowingAction.java
(added)
+++ cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/it/AnotherExceptionThrowingAction.java
Wed Mar 19 04:12:35 2008
@@ -0,0 +1,34 @@
+package org.apache.cocoon.it;
+
+/*
+ * 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.
+ */
+
+import java.util.Map;
+
+import org.apache.avalon.framework.parameters.Parameters;
+import org.apache.cocoon.acting.AbstractAction;
+import org.apache.cocoon.environment.Redirector;
+import org.apache.cocoon.environment.SourceResolver;
+
+public class AnotherExceptionThrowingAction extends AbstractAction {
+
+    public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String
source, Parameters parameters)
+            throws Exception {
+        throw new AnotherCustomException();
+    }
+
+}

Propchange: cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/it/AnotherExceptionThrowingAction.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/it/AnotherExceptionThrowingAction.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/it/AnotherExceptionThrowingAction.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/it/CustomException.java
(from r638768, cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/micro/it/CustomException.java)
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/it/CustomException.java?p2=cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/it/CustomException.java&p1=cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/micro/it/CustomException.java&r1=638768&r2=638787&rev=638787&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/micro/it/CustomException.java
(original)
+++ cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/it/CustomException.java
Wed Mar 19 04:12:35 2008
@@ -1,4 +1,4 @@
-package org.apache.cocoon.micro.it;
+package org.apache.cocoon.it;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more

Copied: cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/it/DateGenerator.java
(from r638768, cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/micro/it/DateGenerator.java)
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/it/DateGenerator.java?p2=cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/it/DateGenerator.java&p1=cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/micro/it/DateGenerator.java&r1=638768&r2=638787&rev=638787&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/micro/it/DateGenerator.java
(original)
+++ cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/it/DateGenerator.java Wed
Mar 19 04:12:35 2008
@@ -1,4 +1,4 @@
-package org.apache.cocoon.micro.it;
+package org.apache.cocoon.it;
 
 import java.io.IOException;
 import java.io.Serializable;

Copied: cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/it/ExceptionThrowingAction.java
(from r638768, cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/micro/it/ExceptionThrowingAction.java)
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/it/ExceptionThrowingAction.java?p2=cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/it/ExceptionThrowingAction.java&p1=cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/micro/it/ExceptionThrowingAction.java&r1=638768&r2=638787&rev=638787&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/micro/it/ExceptionThrowingAction.java
(original)
+++ cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/it/ExceptionThrowingAction.java
Wed Mar 19 04:12:35 2008
@@ -1,4 +1,4 @@
-package org.apache.cocoon.micro.it;
+package org.apache.cocoon.it;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more

Copied: cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/it/ITController.java
(from r638768, cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/micro/it/ITController.java)
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/it/ITController.java?p2=cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/it/ITController.java&p1=cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/micro/it/ITController.java&r1=638768&r2=638787&rev=638787&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/micro/it/ITController.java
(original)
+++ cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/it/ITController.java Wed
Mar 19 04:12:35 2008
@@ -1,4 +1,4 @@
-package org.apache.cocoon.micro.it;
+package org.apache.cocoon.it;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more

Copied: cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/it/ParameterPassingMatcher.java
(from r638768, cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/micro/it/ParameterPassingMatcher.java)
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/it/ParameterPassingMatcher.java?p2=cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/it/ParameterPassingMatcher.java&p1=cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/micro/it/ParameterPassingMatcher.java&r1=638768&r2=638787&rev=638787&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/micro/it/ParameterPassingMatcher.java
(original)
+++ cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/it/ParameterPassingMatcher.java
Wed Mar 19 04:12:35 2008
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.cocoon.micro.it;
+package org.apache.cocoon.it;
 
 import java.util.HashMap;
 import java.util.Map;

Copied: cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/it/RequestParametersGenerator.java
(from r638768, cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/micro/it/RequestParametersGenerator.java)
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/it/RequestParametersGenerator.java?p2=cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/it/RequestParametersGenerator.java&p1=cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/micro/it/RequestParametersGenerator.java&r1=638768&r2=638787&rev=638787&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/micro/it/RequestParametersGenerator.java
(original)
+++ cocoon/trunk/blocks/cocoon-it/src/main/java/org/apache/cocoon/it/RequestParametersGenerator.java
Wed Mar 19 04:12:35 2008
@@ -1,4 +1,4 @@
-package org.apache.cocoon.micro.it;
+package org.apache.cocoon.it;
 
 import java.io.IOException;
 import java.util.Enumeration;

Modified: cocoon/trunk/blocks/cocoon-it/src/main/resources/COB-INF/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-it/src/main/resources/COB-INF/sitemap.xmap?rev=638787&r1=638786&r2=638787&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-it/src/main/resources/COB-INF/sitemap.xmap (original)
+++ cocoon/trunk/blocks/cocoon-it/src/main/resources/COB-INF/sitemap.xmap Wed Mar 19 04:12:35
2008
@@ -190,6 +190,11 @@
         <map:generate src="sax-pipeline/simple.xml"/>
         <map:serialize type="xml"/>
       </map:match>
+      <map:match pattern="error-handling/another-custom-error">
+        <map:act type="another-error-throwing"/>
+        <map:generate src="sax-pipeline/simple.xml"/>
+        <map:serialize type="xml"/>
+      </map:match>
     </map:pipeline>
     <!-- doesn't work: when this per pipeline error handler is active, it catches ALL
error and
          the per-sitemap error handler will never be reached. -->
@@ -215,8 +220,12 @@
           <map:generate src="error-handling/500.xml"/>
           <map:serialize type="xhtml" status-code="500"/>
         </map:when>
+        <map:when test="another-custom-exception">
+          <map:generate type="exception" />
+          <map:serialize type="xml" status-code="506"/>
+        </map:when>
         <map:otherwise>
-          <map:generate type="exception" src="error-handling/503.xml"/>
+          <map:generate src="error-handling/503.xml"/>
           <map:serialize type="xhtml" status-code="503"/>
         </map:otherwise>
       </map:select>

Modified: cocoon/trunk/blocks/cocoon-it/src/main/resources/META-INF/cocoon/avalon/cocoon-micro-it-sitemap-components.xconf
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-it/src/main/resources/META-INF/cocoon/avalon/cocoon-micro-it-sitemap-components.xconf?rev=638787&r1=638786&r2=638787&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-it/src/main/resources/META-INF/cocoon/avalon/cocoon-micro-it-sitemap-components.xconf
(original)
+++ cocoon/trunk/blocks/cocoon-it/src/main/resources/META-INF/cocoon/avalon/cocoon-micro-it-sitemap-components.xconf
Wed Mar 19 04:12:35 2008
@@ -21,7 +21,8 @@
     <map:selector logger="sitemap.selector.exception" name="custom-exception"
       src="org.apache.cocoon.selection.ExceptionSelector">
       <exception name="not-found" class="org.apache.cocoon.ResourceNotFoundException"/>
-      <exception name="custom-exception" class="org.apache.cocoon.micro.it.CustomException"/>
+      <exception name="custom-exception" class="org.apache.cocoon.it.CustomException"/>
+      <exception name="another-custom-exception" class="org.apache.cocoon.it.AnotherCustomException"/>
       <exception class="java.lang.Throwable" unroll="true"/>
     </map:selector>
   </map:selectors>

Modified: cocoon/trunk/blocks/cocoon-it/src/main/resources/META-INF/cocoon/spring/cocoon-micro-it-controller.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-it/src/main/resources/META-INF/cocoon/spring/cocoon-micro-it-controller.xml?rev=638787&r1=638786&r2=638787&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-it/src/main/resources/META-INF/cocoon/spring/cocoon-micro-it-controller.xml
(original)
+++ cocoon/trunk/blocks/cocoon-it/src/main/resources/META-INF/cocoon/spring/cocoon-micro-it-controller.xml
Wed Mar 19 04:12:35 2008
@@ -28,8 +28,8 @@
     http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
   ">
 
-  <!-- The REST controller -->
-  <bean name="org.apache.cocoon.components.flow.Interpreter/it-controller" class="org.apache.cocoon.micro.it.ITController"/>
+  <!-- The IT controller -->
+  <bean name="org.apache.cocoon.components.flow.Interpreter/it-controller" class="org.apache.cocoon.it.ITController"/>
 
 
 </beans>

Modified: cocoon/trunk/blocks/cocoon-it/src/main/resources/META-INF/cocoon/spring/cocoon-micro-it-sitemap-components.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-it/src/main/resources/META-INF/cocoon/spring/cocoon-micro-it-sitemap-components.xml?rev=638787&r1=638786&r2=638787&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-it/src/main/resources/META-INF/cocoon/spring/cocoon-micro-it-sitemap-components.xml
(original)
+++ cocoon/trunk/blocks/cocoon-it/src/main/resources/META-INF/cocoon/spring/cocoon-micro-it-sitemap-components.xml
Wed Mar 19 04:12:35 2008
@@ -22,14 +22,16 @@
   http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
   http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">
 
-  <bean name="org.apache.cocoon.acting.Action/error-throwing" class="org.apache.cocoon.micro.it.ExceptionThrowingAction"/>
+  <bean name="org.apache.cocoon.acting.Action/error-throwing" class="org.apache.cocoon.it.ExceptionThrowingAction"/>
 
-  <bean name="org.apache.cocoon.generation.Generator/date" class="org.apache.cocoon.micro.it.DateGenerator"/>
+  <bean name="org.apache.cocoon.acting.Action/another-error-throwing" class="org.apache.cocoon.it.AnotherExceptionThrowingAction"/>
+
+  <bean name="org.apache.cocoon.generation.Generator/date" class="org.apache.cocoon.it.DateGenerator"/>
 
   <bean name="org.apache.cocoon.generation.Generator/request-parameters"
-    class="org.apache.cocoon.micro.it.RequestParametersGenerator"/>
+    class="org.apache.cocoon.it.RequestParametersGenerator"/>
 
   <bean name="org.apache.cocoon.matching.Matcher/parameter-passing"
-    class="org.apache.cocoon.micro.it.ParameterPassingMatcher"/>
+    class="org.apache.cocoon.it.ParameterPassingMatcher"/>
 
 </beans>



Mime
View raw message