cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: rev 54830 - in cocoon/branches/BRANCH_2_1_X: lib src/blocks/tour/java/org/apache/cocoon/samples/tour/shapes src/blocks/tour/samples/bean-editor/docs src/blocks/tour/samples/flow src/blocks/tour/samples/flow/docs src/blocks/tour/samples/flow/java-shapes src/blocks/tour/samples/flow/number-guess src/blocks/tour/samples/intro/docs src/blocks/tour/samples/intro/presentation src/blocks/webdav/java/org/apache/cocoon/components/source/impl src/blocks/webdav/lib src/blocks/webdav/test/org/apache/cocoon/components/source/impl
Date Fri, 15 Oct 2004 07:33:49 GMT
Author: cziegeler
Date: Fri Oct 15 00:33:47 2004
New Revision: 54830

Added:
   cocoon/branches/BRANCH_2_1_X/src/blocks/tour/java/org/apache/cocoon/samples/tour/shapes/
   cocoon/branches/BRANCH_2_1_X/src/blocks/tour/java/org/apache/cocoon/samples/tour/shapes/Circle.java
   cocoon/branches/BRANCH_2_1_X/src/blocks/tour/java/org/apache/cocoon/samples/tour/shapes/Rectangular.java
   cocoon/branches/BRANCH_2_1_X/src/blocks/tour/java/org/apache/cocoon/samples/tour/shapes/Shape.java
   cocoon/branches/BRANCH_2_1_X/src/blocks/tour/java/org/apache/cocoon/samples/tour/shapes/Square.java
   cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/flow/docs/java-shapes.xml
   cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/flow/java-shapes/
   cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/flow/java-shapes/circle.xml
   cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/flow/java-shapes/java-shapes.js
   cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/flow/java-shapes/rectangular.xml
   cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/flow/java-shapes/results.xml
   cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/flow/java-shapes/select.xml
   cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/flow/java-shapes/square.xml
   cocoon/branches/BRANCH_2_1_X/src/blocks/webdav/lib/jakarta-slide-webdavlib-2.0.jar   (contents, props changed)
Removed:
   cocoon/branches/BRANCH_2_1_X/src/blocks/webdav/lib/jakarta-slide-webdavlib-2.0rc1.jar
Modified:
   cocoon/branches/BRANCH_2_1_X/lib/jars.xml
   cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/bean-editor/docs/forms.xml
   cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/bean-editor/docs/index.xml
   cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/bean-editor/docs/javabeans.xml
   cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/bean-editor/docs/tasklist.xml
   cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/flow/docs/index.xml
   cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/flow/docs/multi-page.xml
   cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/flow/docs/number-guess.xml
   cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/flow/number-guess/guess.xml
   cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/flow/sitemap.xmap
   cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/intro/docs/bizlayer.xml
   cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/intro/docs/facts.xml
   cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/intro/docs/toc.xml
   cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/intro/docs/use-cases.xml
   cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/intro/presentation/tour.css
   cocoon/branches/BRANCH_2_1_X/src/blocks/webdav/java/org/apache/cocoon/components/source/impl/WebDAVSource.java
   cocoon/branches/BRANCH_2_1_X/src/blocks/webdav/test/org/apache/cocoon/components/source/impl/WebDAVSourceTestCase.java
Log:
Sync tour and webdav block with 2.2

Modified: cocoon/branches/BRANCH_2_1_X/lib/jars.xml
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/lib/jars.xml	(original)
+++ cocoon/branches/BRANCH_2_1_X/lib/jars.xml	Fri Oct 15 00:33:47 2004
@@ -804,7 +804,7 @@
     <title>Slide WebDAV Client library</title>
     <description>The Jakarta Slide WebDAV client library.</description>
     <used-by>WebDAV block</used-by>
-    <lib>webdav/lib/jakarta-slide-webdavlib-2.0rc1.jar</lib>
+    <lib>webdav/lib/jakarta-slide-webdavlib-2.0.jar</lib>
     <homepage>http://jakarta.apache.org/slide/</homepage>
   </file>
 

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/tour/java/org/apache/cocoon/samples/tour/shapes/Circle.java
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/tour/java/org/apache/cocoon/samples/tour/shapes/Circle.java	Fri Oct 15 00:33:47 2004
@@ -0,0 +1,42 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed 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.samples.tour.shapes;
+
+/**
+ *  Circle Shape for tour block java-shapes sample
+ */
+public class Circle implements Shape{
+    double _r;
+
+    public String getName() {
+        return "Circle";
+    }
+
+    /** Creates a new instance of Circle */
+    public Circle(double r) {
+        _r = r;
+    }
+    
+    public double area() {
+        return 3.14 * _r * _r;
+    }
+    
+    public double perimeter() {
+        return 2 * 3.14 * _r;
+    }
+    
+}

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/tour/java/org/apache/cocoon/samples/tour/shapes/Rectangular.java
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/tour/java/org/apache/cocoon/samples/tour/shapes/Rectangular.java	Fri Oct 15 00:33:47 2004
@@ -0,0 +1,43 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed 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.samples.tour.shapes;
+
+/**
+ *  Rectangular Shape for tour block java-shapes sample
+ */
+public class Rectangular implements Shape{
+    double _h;
+    double _b;
+    /** Creates a new instance of StrCount */
+    public Rectangular(double h, double b) {
+    	_h = h;
+    	_b = b;
+    }
+    
+    public String getName() {
+        return "Rectangular";
+    }
+
+    public double area(){
+    	return _h * _b;
+    }
+    
+    public double perimeter(){
+        return (_h + _b) * 2;
+    }
+	    
+}

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/tour/java/org/apache/cocoon/samples/tour/shapes/Shape.java
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/tour/java/org/apache/cocoon/samples/tour/shapes/Shape.java	Fri Oct 15 00:33:47 2004
@@ -0,0 +1,26 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed 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.samples.tour.shapes;
+
+/**
+ *  Shape interface for tour block java-shapes sample
+ */
+public interface Shape {
+    String getName();
+    abstract double area();
+    abstract double perimeter();
+}

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/tour/java/org/apache/cocoon/samples/tour/shapes/Square.java
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/tour/java/org/apache/cocoon/samples/tour/shapes/Square.java	Fri Oct 15 00:33:47 2004
@@ -0,0 +1,41 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed 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.samples.tour.shapes;
+
+/**
+ *  Square Shape for tour block java-shapes sample
+ */
+public class Square implements Shape {
+    float _b;
+    /** Creates a new instance of Square */
+    public Square(float b) {
+        _b = b;
+    }
+    
+    public String getName() {
+        return "Square";
+    }
+
+    public double area() {
+        return _b*_b;
+    }
+    
+    public double perimeter() {
+        return 4*_b;
+    }
+    
+}

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/bean-editor/docs/forms.xml
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/bean-editor/docs/forms.xml	(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/bean-editor/docs/forms.xml	Fri Oct 15 00:33:47 2004
@@ -124,7 +124,7 @@
         <p>
             This model is independent from the way the form
             is going to look in HTML (or WML, or XUL, or whatever), and
-            also independent of the internal structure of our java beans.
+            also independent of the internal structure of our Java beans.
         </p>
         <p>
             Here we use constants for the widget labels (field names),
@@ -137,7 +137,7 @@
         <p>
             Here's the <em>binding</em> definition, which allows the Forms
             subsystem to automatically move data from our Form's internal model
-            to our java beans.
+            to our Java beans.
         </p>
         <p>
             This looks simple enough: for example, we tell the Forms
@@ -180,7 +180,7 @@
         </p>
         <p>
             Another important feature of the Cocoon Forms subsystem is its extensibility:
-            a clean design makes it fairly easy to add custom java classes for custom formatting,
+            a clean design makes it fairly easy to add custom Java classes for custom formatting,
             validation and bindings.
         </p>
     </content>

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/bean-editor/docs/index.xml
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/bean-editor/docs/index.xml	(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/bean-editor/docs/index.xml	Fri Oct 15 00:33:47 2004
@@ -34,7 +34,7 @@
         </p>
         <p>
             Our Java beans are trivial and uninteresting: what we're looking for is an understanding of
-            how Cocoon Pipelines, Forms and Flow play together with java code, and for this a very simple
+            how Cocoon Pipelines, Forms and Flow play together with Java code, and for this a very simple
             application is certainly good.
         </p>
         <p>
@@ -60,7 +60,7 @@
         </p>
         <h2>Running the application</h2>
         <p>
-            To run the bean editor application, Cocoon must be able to load the required java classes.
+            To run the bean editor application, Cocoon must be able to load the required Java classes.
         </p>
         <p>
             If you're running this tutorial from the standard Cocoon distribution this should be

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/bean-editor/docs/javabeans.xml
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/bean-editor/docs/javabeans.xml	(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/bean-editor/docs/javabeans.xml	Fri Oct 15 00:33:47 2004
@@ -26,7 +26,7 @@
         <h2>Interfaces</h2>
         <p>
             Here's the interface of the DatabaseFacade class, which is used by our
-            Flowscript code to "talk" to the java beans:
+            Flowscript code to "talk" to the Java beans:
             <pre class="code">
 /** access the Database */
 public static DatabaseFacade getInstance();
@@ -72,7 +72,7 @@
 
         <h2>Access from Flowscript</h2>
         <p>
-            Here's a code excerpt showing how Flowscript code can access java classes.
+            Here's a code excerpt showing how Flowscript code can access Java classes.
         </p>
         <pre class="code">
 var db = Packages.org.apache.cocoon.samples.tour.beans.DatabaseFacade.getInstance();
@@ -80,7 +80,7 @@
 list = db.getTasks();
         </pre>
         <p>
-            Simple enough. The "official" way of accessing java components in a Cocoon
+            Simple enough. The "official" way of accessing Java components in a Cocoon
             application would be to use the Avalon lookup mechanisms, but this wouldn't
             add much to our example so we took the easy way here.
         </p>

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/bean-editor/docs/tasklist.xml
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/bean-editor/docs/tasklist.xml	(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/bean-editor/docs/tasklist.xml	Fri Oct 15 00:33:47 2004
@@ -78,7 +78,7 @@
         <p>
             We're not using continuations here (there's no <em>sendPageAndWait</em>),
             Flowscript serves only as a thin layer of glue
-            between our java objects and our JXTemplate view page.
+            between our Java objects and our JXTemplate view page.
         </p>
 
         <h2>JXTemplate page</h2>
@@ -98,12 +98,12 @@
             <ol>
                 <li>A request for <em>view/allTasks</em> comes in</li>
                 <li>
-                    The <em>query_allTasks()</em> Flowscript function is called and uses the java <em>DatabaseFacade</em>
-                    to retrieve a java List of <em>TaskBean</em> objects.
+                    The <em>query_allTasks()</em> Flowscript function is called and uses the Java <em>DatabaseFacade</em>
+                    to retrieve a Java List of <em>TaskBean</em> objects.
                 </li>
                 <li>
                     Flowscript uses the <em>cocoon.sendPage()</em> function to trigger the execution of a sitemap
-                    pipeline, passing to it some data as javascript variables.
+                    pipeline, passing to it some data as JavaScript variables.
                 </li>
                 <li>
                     The pipeline uses the JXTemplate generator to dynamically insert data in an XML template

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/flow/docs/index.xml
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/flow/docs/index.xml	(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/flow/docs/index.xml	Fri Oct 15 00:33:47 2004
@@ -25,7 +25,7 @@
         </p>
         <p>
             A <em>continuation</em> saves the state of execution of the currently
-            running flowscript, and allows this state to be "resurrected" later on,
+            running Flowscript, and allows this state to be "resurrected" later on,
             typically when the user submits an HTML form that was sent with the
             <em>cocoon.sendPageAndWait</em> instruction.
         </p>
@@ -36,10 +36,10 @@
             show how little code is used to manage typical interactions.
         </p>
         <p>
-            Having to use javascript to write the Flow scripts might seem strange
+            Having to use JavaScript to write the Flow scripts might seem strange
             at first, but in practice only a few lines of Flow code will be required
             for a typical application, so this doesn't matter much. The reason is that
-            javascript (through a modified version of the mozilla Rhino interpreter)
+            JavaScript (through a modified version of the mozilla Rhino interpreter)
             is currently the only continuations-enabled language that can be
             distributed with Cocoon.
         </p>

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/flow/docs/java-shapes.xml
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/flow/docs/java-shapes.xml	Fri Oct 15 00:33:47 2004
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+
+<page
+    xmlns:cinclude="http://apache.org/cocoon/include/1.0"
+>
+    <content>
+		<p>
+            In this example, java classes are used to calculate the area and perimeter of shapes.
+            Various Java classes are instantiated and used from Flow.
+        </p>
+	<p>
+            Start the example <a href="../java-shapes/startShape">here</a>.
+        </p>
+        <h2>The sitemap</h2>
+        <p>
+            There's nothing new in the sitemap, our use of
+            variables allows the exact same sitemap to be reused for
+            both our Flow examples.
+        </p>
+        <p>
+            The only specific thing is the importing of the java-shapes.js
+            flowscript, but this was already present for the previous
+            example:
+            <cinclude:include element="xml-code" src="cocoon:/xml-element/flow/sitemap.xmap/flow"/>
+        </p>
+
+        <h2>Java code</h2>
+        <p>
+            The java code (interface Shape, classes Rectangular, Square, Circle) is fairly trivial,
+            and the computations could easily be done in javascript for such a simple case.
+        </p>
+        <p>
+            However, our goal is to show interactions between Flow and java classes, so you shouldn't pay
+            too much attention to the java code, except to note that it has no knowledge of Avalon - our java
+            objects are just POJOs: Plain Old Java Objects.
+        </p>
+
+        <h2>Flowscript code</h2>
+        <p>
+            Here's the Flowscript which has three steps.
+            <ol>
+            <li>Get the selected shape from user and prepare the next page.</li>
+            <li>Get shape's informations (width, height or radius) and instantiate the correct java class for the selected shape.</li>
+            <li>Use java class to calculate area and perimeter and display the results</li>
+            </ol>
+            <cinclude:include element="flowscript-code" src="cocoon:/text-file/flow/java-shapes/java-shapes.js"/>
+        </p>
+
+        <h2>JXTemplate view</h2>
+        <p>
+		Shape selection
+        </p>
+        <cinclude:include element="xml-code" src="cocoon:/xml-element/flow/java-shapes/select.xml/page"/>
+        <p>
+            Here the user can select a shape.
+        </p>
+    </content>
+</page>

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/flow/docs/multi-page.xml
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/flow/docs/multi-page.xml	(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/flow/docs/multi-page.xml	Fri Oct 15 00:33:47 2004
@@ -35,7 +35,7 @@
             working on a tiny mobile device for a minute.
         </p>
         <p>
-            We won't use Cocoon Forms here, but simply bind a javascript object
+            We won't use Cocoon Forms here, but simply bind a JavaScript object
             to our form manually.
         </p>
         <p>
@@ -51,7 +51,7 @@
         </p>
         <p>
             The only specific thing is the importing of the multi-page.js
-            flowscript, but this was already present for the previous
+            Flowscript, but this was already present for the previous
             example:
             <cinclude:include element="xml-code" src="cocoon:/xml-element/flow/sitemap.xmap/flow"/>
         </p>

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/flow/docs/number-guess.xml
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/flow/docs/number-guess.xml	(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/flow/docs/number-guess.xml	Fri Oct 15 00:33:47 2004
@@ -35,7 +35,7 @@
         <p>
             At the sitemap level, Flowscript applications need four things:
             <ul>
-                <li>The flowscript code must be made available to the sitemap</li>
+                <li>The Flowscript code must be made available to the sitemap</li>
                 <li>
                     A <em>map:call function</em> instruction must start
                     the Flowscript function when the "application start"
@@ -46,14 +46,14 @@
                     continuations when their IDs are received in requests
                 </li>
                 <li>
-                    A "view" pipeline must use the (flowscript-aware) JXTemplate generator
+                    A "view" pipeline must use the (Flowscript-aware) JXTemplate generator
                     to insert data provided by Flowscript into pages.
                 </li>
             </ul>
             The corresponding excerpts of our sitemap are shown below.
         </p>
         <h3>Flowscript declaration</h3>
-        <p>Note that this already contains the declaration of the next example's flowscript.</p>
+        <p>Note that this already contains the declaration of the next example's Flowscript.</p>
         <cinclude:include element="xml-code" src="cocoon:/xml-element/flow/sitemap.xmap/flow"/>
 
         <h3>map:call function</h3>
@@ -77,7 +77,7 @@
         <h3>View pipeline using JXTemplageGenerator</h3>
         <p>
             To be able to include data provided by Flowscript in our forms and views, we
-            use the flowscript-aware JXTemplateGenerator
+            use the Flowscript-aware JXTemplateGenerator
         </p>
         <p>Here's the pipeline</p>
         <cinclude:include element="xml-code" src="cocoon:/xml-element/flow/sitemap.xmap/views"/>
@@ -104,14 +104,14 @@
         </p>
         <p>
             Here's the page definition for our number-guessing form.
-            JXTemplate codes like <em>${continuation.id}</em>, will by replaced
-            by values provided in the FlowScript <em>sendPageAndWait</em> function call.
+            JXTemplate codes like <em>${cocoon.continuation.id}</em>, will by replaced
+            by values provided in the Flowscript <em>sendPageAndWait</em> function call.
         </p>
         <cinclude:include element="xml-code" src="cocoon:/xml-element/flow/number-guess/guess.xml/page"/>
 
         <h2>That's it!</h2>
         <p>
-            We have now seen the complete code of our flowscript application:
+            We have now seen the complete code of our Flowscript application:
             <ul>
                 <li>A few sitemap declarations, which will be very similar for other Flowscript-based applications</li>
                 <li>A JXTemplate-based view, a "normal" page with some substitution codes</li>

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/flow/java-shapes/circle.xml
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/flow/java-shapes/circle.xml	Fri Oct 15 00:33:47 2004
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+<!--
+    Shape's area and perimeter calculation example.
+
+    Use JXTemplateTransformer to generate an HTML form
+    showing values set by Flowscript
+ -->
+<page id="page" xmlns:c="http://apache.org/cocoon/templates/jx/1.0">
+    <title>Flow example: Circle shape (id=${shapeId})</title>
+	<content>
+		<h2>Please enter circle radius</h2>
+		<form method="post" action="${continuation.id}.continue">
+			r:<input type="text" name="r"/>
+			<br/>
+			<br/>
+			<input type="submit"/>
+		</form>
+		<p class="footer">
+			<a href="../docs/index.html">Flow examples</a>
+		</p>
+	</content>
+</page>

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/flow/java-shapes/java-shapes.js
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/flow/java-shapes/java-shapes.js	Fri Oct 15 00:33:47 2004
@@ -0,0 +1,53 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+// Shape's area and perimeter calculation example.
+
+var calculator = Packages.org.apache.cocoon.samples.supersonic.shapes.Shape;
+
+function public_startShape() {
+    var hint = "Calculate shape's area and perimeter using logic in java. ";
+
+    // let user select shape
+    cocoon.sendPageAndWait("java-shapes/views/select", {"hint" : hint});
+    var shapeId = cocoon.request.get("shape");
+
+    // send shape-specific view
+    cocoon.sendPageAndWait("java-shapes/views/" + shapeId, {"shapeId" : shapeId});
+
+    // instantiate appropriate calculator
+    switch (shapeId){
+        case "square":
+            var b      = parseInt( cocoon.request.get("b") );
+            calculator = new Packages.org.apache.cocoon.samples.tour.shapes.Square(b);
+            break;
+        case "rectangular":
+            var h      = parseInt( cocoon.request.get("h") );
+            var b      = parseInt( cocoon.request.get("b") );
+            calculator = new Packages.org.apache.cocoon.samples.tour.shapes.Rectangular(b,h);
+            break;
+        case "circle":
+            var r      = parseInt( cocoon.request.get("r") );
+            calculator = new Packages.org.apache.cocoon.samples.tour.shapes.Circle(r);
+            break;
+    }
+
+    // compute results
+    var a = calculator.area();
+    var p = calculator.perimeter();
+
+    cocoon.sendPage("java-shapes/views/results", {"area" : a, "perimeter" : p, "shape" : shapeId} );
+}
\ No newline at end of file

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/flow/java-shapes/rectangular.xml
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/flow/java-shapes/rectangular.xml	Fri Oct 15 00:33:47 2004
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+<!--
+    Shape's area and perimeter calculation example.
+
+    Use JXTemplateTransformer to generate an HTML form
+    showing values set by Flowscript
+ -->
+<page id="page" xmlns:c="http://apache.org/cocoon/templates/jx/1.0">
+    <title>Flow example: Rectangular shape (id=${shapeId})</title>
+	<content>
+		<h2>Please enter rectangle dimensions</h2>
+		<form method="post" action="${continuation.id}.continue">
+			width:<input type="text" name="b"/>
+			<br/>
+			height:<input type="text" name="h"/>
+			<br/>
+			<br/>
+			<input type="submit"/>
+		</form>
+		<p class="footer">
+			<a href="../docs/index.html">Flow examples</a>
+		</p>
+	</content>
+</page>

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/flow/java-shapes/results.xml
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/flow/java-shapes/results.xml	Fri Oct 15 00:33:47 2004
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+<!--
+    Shape's area and perimeter calculation example.
+
+    Use JXTemplateTransformer to generate an HTML form
+    showing values set by Flowscript
+ -->
+<page xmlns:c="http://apache.org/cocoon/templates/jx/1.0">
+	<title>Flow example: Shapes</title>
+	<content>
+		<h2>Results!</h2>
+		<p>
+            Area and perimeter of selected shape: <b>${shape}</b></p>
+		<p>
+            area: <b>${area}</b> <br/>
+            perimeter: <b>${perimeter}</b><br/>
+		</p>
+		<p class="footer">
+			<a href="startShape">Restart with a new shape</a>
+			<br/>
+			<a href="../docs/index.html">Flow examples</a>
+		</p>
+	</content>
+</page>

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/flow/java-shapes/select.xml
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/flow/java-shapes/select.xml	Fri Oct 15 00:33:47 2004
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+<!--
+    Shape's area and perimeter calculation example.
+
+    Use JXTemplateTransformer to generate an HTML form
+    showing values set by Flowscript
+ -->
+<page id="page" xmlns:c="http://apache.org/cocoon/templates/jx/1.0">
+	<title>Flow example: Shapes</title>
+	<content>
+		<h2>${hint}</h2>
+		<form method="post" action="${continuation.id}.continue">
+			<p>Select shape</p>
+			<select name="shape">
+				<optgroup label="Select shape">
+					<option value="square">Square</option>
+					<option value="rectangular">Rectangular</option>
+					<option value="circle">Circle</option>
+				</optgroup>
+			</select>
+			<input type="submit"/>
+		</form>
+		<p class="footer">
+			<a href="../docs/index.html">Flow examples</a>
+		</p>
+	</content>
+</page>

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/flow/java-shapes/square.xml
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/flow/java-shapes/square.xml	Fri Oct 15 00:33:47 2004
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+<!--
+    Shape's area and perimeter calculation example.
+
+    Use JXTemplateTransformer to generate an HTML form
+    showing values set by Flowscript
+ -->
+<page id="page" xmlns:c="http://apache.org/cocoon/templates/jx/1.0">
+	<title>Flow example: Square shape (id=${shapeId})</title>
+	<content>
+		<h2>Please enter the side-length of the square</h2>
+		<form method="post" action="${continuation.id}.continue">
+			side-length:<input type="text" name="b"/>
+			<br/>
+			<br/>
+			<input type="submit"/>
+		</form>
+		<p class="footer">
+			<a href="../docs/index.html">Flow examples</a>
+		</p>
+	</content>
+</page>

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/flow/number-guess/guess.xml
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/flow/number-guess/guess.xml	(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/flow/number-guess/guess.xml	Fri Oct 15 00:33:47 2004
@@ -29,7 +29,7 @@
 
     <content>
         <h2>${hint}</h2>
-        <form method="post" action="${continuation.id}.continue">
+        <form method="post" action="${cocoon.continuation.id}.continue">
             <input type="text" name="answer"/>
             <input type="submit"/>
         </form>

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/flow/sitemap.xmap
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/flow/sitemap.xmap	(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/flow/sitemap.xmap	Fri Oct 15 00:33:47 2004
@@ -31,6 +31,7 @@
     <map:flow id="flow" language="javascript">
         <map:script src="number-guess/guess-number.js"/>
         <map:script src="multi-page/multi-page.js"/>
+        <map:script src="java-shapes/java-shapes.js"/>
     </map:flow>
 
     <!-- reusable parts of pipelines -->

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/intro/docs/bizlayer.xml
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/intro/docs/bizlayer.xml	(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/intro/docs/bizlayer.xml	Fri Oct 15 00:33:47 2004
@@ -20,7 +20,7 @@
     <content>
         <p>
             A question which often comes when starting with Cocoon
-            is <em>how to implement my business layer</em>.
+            is, <em>"How do I implement my business layer?"</em>
         </p>
         <p>
             The short answer: <em>it is up to you</em> ;-)
@@ -31,6 +31,12 @@
             business processes or apply business rules.
         </p>
         <p>
+            Similarly, people often ask about "best practices" with Cocoon --
+            that is, "What's the best way to implement X or Y?"  While we
+            generally don't have a set list of best practices, we can provide 
+            some simple guidance to help you along your way.
+        </p>
+        <p>
             Here's a brief discussion of possible options. Some are real
             today and some are still - as we like to say here -
             <em>in the pipeline</em>.
@@ -46,9 +52,9 @@
             and its design and future evolution will stay targeted to small glue modules.
         </p>
 
-        <h2>Independent java code</h2>
+        <h2>Independent Java code</h2>
         <p>
-            As we'll see in our example, it is very easy to access java
+            As we'll see in our example, it is very easy to access Java
             objects from Flowscript code.
             Such objects do not necessarily need to know about Cocoon or
             Avalon classes, which means that legacy code could be easily integrated,
@@ -64,7 +70,7 @@
             and Cocoon.
         </p>
 
-        <h2>Avalon-based java code</h2>
+        <h2>Avalon-based Java code</h2>
         <p>
             The next step would be to write first-class Cocoon components based on
             the Avalon framework, allowing your components to use all of the Avalon

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/intro/docs/facts.xml
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/intro/docs/facts.xml	(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/intro/docs/facts.xml	Fri Oct 15 00:33:47 2004
@@ -20,7 +20,7 @@
     <content>
         <h2>Architecture</h2>
         <p>
-            Cocoon is written in java and based on the
+            Cocoon is written in Java and based on the
             <a href="http://avalon.apache.org/">Apache Avalon</a> components framework.
         </p>
         <p>

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/intro/docs/toc.xml
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/intro/docs/toc.xml	(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/intro/docs/toc.xml	Fri Oct 15 00:33:47 2004
@@ -25,7 +25,7 @@
 
     <toc-section name="Introduction">
         <toc-item id="toc" name="Supersonic Tour of Apache Cocoon" href="intro/docs/index"/>
-        <toc-item name="What is Cocoon" href="intro/docs/what-is-cocoon"/>
+        <toc-item name="What is Cocoon?" href="intro/docs/what-is-cocoon"/>
         <toc-item name="Use cases" href="intro/docs/use-cases"/>
         <toc-item name="Facts" href="intro/docs/facts"/>
         <toc-item name="Resources" href="intro/docs/resources"/>
@@ -48,6 +48,7 @@
         <toc-item name="Flow examples" href="flow/docs/index"/>
         <toc-item name="Number guessing game" href="flow/docs/number-guess"/>
         <toc-item name="Multi-page form" href="flow/docs/multi-page"/>
+        <toc-item name="Java shapes: using Java objects from Flow" href="flow/docs/java-shapes"/>
     </toc-section>
 
     <toc-section name="Cocoon Forms sample application">
@@ -59,4 +60,4 @@
         <toc-item name="Flowscript" href="bean-editor/docs/flowscript"/>
     </toc-section>
 
-</toc>
\ No newline at end of file
+</toc>

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/intro/docs/use-cases.xml
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/intro/docs/use-cases.xml	(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/intro/docs/use-cases.xml	Fri Oct 15 00:33:47 2004
@@ -37,7 +37,7 @@
                 <li>Build a multi-language website using XML dictionaries to translate menus and messages</li>
                 <li>Build web portals using the latest JSR-168 standard</li>
                 <li>Write web applications with little code and no state management code using the Flow subsystem</li>
-                <li>Allow java objects to be edited from a WAP device</li>
+                <li>Allow Java objects to be edited from a WAP device</li>
             </ul>
             The combination of components available in Cocoon applies
             to widely varied types of applications. This explains why more and more companies are making Cocoon

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/intro/presentation/tour.css
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/intro/presentation/tour.css	(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/tour/samples/intro/presentation/tour.css	Fri Oct 15 00:33:47 2004
@@ -17,13 +17,18 @@
 /** simple CSS stylesheet for supersonic tour example app */
 
 body {
-    font-family: Georgia, Verdana, Arial, SansSerif;
+    font-family: Georgia, Verdana, Arial, sans-serif;
 }
 
 .note {
     font-size: 80%;
 }
 
+a:hover {
+    background-color: #ffff99;
+    text-decoration: none;
+}
+
 td.navigation {
     font-size: 80%;
 }
@@ -32,6 +37,7 @@
     background: #FFCC00;
     font-size: 80%;
     padding: 0.5em;
+    font-family: verdana, helvetica, arial, sans-serif;
 }
 
 #navigation a {

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/webdav/java/org/apache/cocoon/components/source/impl/WebDAVSource.java
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/webdav/java/org/apache/cocoon/components/source/impl/WebDAVSource.java	(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/webdav/java/org/apache/cocoon/components/source/impl/WebDAVSource.java	Fri Oct 15 00:33:47 2004
@@ -85,7 +85,7 @@
  *  </ul>
  * <p>
  * 
- * @version $Id: WebDAVSource.java,v 1.28 2004/04/13 17:13:29 stephan Exp $
+ * @version $Id$
 */
 public class WebDAVSource extends AbstractLogEnabled 
 implements Source, TraversableSource, ModifiableSource, ModifiableTraversableSource, InspectableSource, MoveableSource {
@@ -602,8 +602,13 @@
      * @see org.apache.excalibur.source.TraversableSource#getParent()
      */
     public Source getParent() throws SourceException {
-        String path = isCollection()?"..":".";
-      
+        String path;
+        if (this.url.getEscapedPath().endsWith("/")) {
+            path = "..";
+        }
+        else {
+            path = ".";
+        }
         try {
             HttpURL parentURL;
             if (url instanceof HttpsURL) {
@@ -749,8 +754,19 @@
         try {
             if (!this.resource.mkcolMethod()) {
                 int status = this.resource.getStatusCode();
+                if (status == 409) {
+                    // parent does not exist, create it and try again
+                    ((ModifiableTraversableSource) getParent()).makeCollection();
+                    makeCollection();
+                }
+                else if (status == 404) {
+                    // apparently mod_dav_svn wrongly returns 404
+                    // on MKCOL when parent does not exist
+                    ((ModifiableTraversableSource) getParent()).makeCollection();
+                    makeCollection();
+                }
                 // Ignore status 405 - Not allowed: collection already exists
-                if (status != 405) {
+                else if (status != 405) {
                     final String msg = 
                         "Unable to create collection " + getSecureURI()
                         + ". Server responded " + this.resource.getStatusCode()
@@ -938,7 +954,9 @@
      */
     public void moveTo(Source source) throws SourceException {
         if (source instanceof WebDAVSource) {
+            initResource(WebdavResource.NOACTION, DepthSupport.DEPTH_0);
             WebDAVSource destination = (WebDAVSource)source;
+            destination.initResource(WebdavResource.BASIC, DepthSupport.DEPTH_0);
             try {            
                  this.resource.moveMethod(destination.resource.getHttpURL().getPath());
             } catch (HttpException e) {
@@ -960,7 +978,9 @@
      */
     public void copyTo(Source source) throws SourceException {
         if (source instanceof WebDAVSource) {
+            initResource(WebdavResource.BASIC, DepthSupport.DEPTH_0);
             WebDAVSource destination = (WebDAVSource)source;
+            destination.initResource(WebdavResource.NOACTION, DepthSupport.DEPTH_0);
             try {
                 this.resource.copyMethod(destination.resource.getHttpURL().getPath());
             } catch (HttpException e) {

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/webdav/lib/jakarta-slide-webdavlib-2.0.jar
==============================================================================
Binary file. No diff available.

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/webdav/test/org/apache/cocoon/components/source/impl/WebDAVSourceTestCase.java
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/webdav/test/org/apache/cocoon/components/source/impl/WebDAVSourceTestCase.java	(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/webdav/test/org/apache/cocoon/components/source/impl/WebDAVSourceTestCase.java	Fri Oct 15 00:33:47 2004
@@ -21,13 +21,14 @@
 
 import org.apache.avalon.excalibur.testcase.ExcaliburTestCase;
 import org.apache.cocoon.components.source.impl.WebDAVSource;
+import org.apache.commons.httpclient.HttpURL;
 import org.apache.excalibur.source.ModifiableTraversableSource;
 import org.apache.excalibur.source.SourceResolver;
 import org.apache.excalibur.source.TraversableSource;
 import org.apache.webdav.lib.WebdavResource;
 
 /**
- * @version $Id: WebDAVSourceTestCase.java,v 1.3 2004/03/27 17:40:11 unico Exp $
+ * @version $Id$
  */
 public class WebDAVSourceTestCase extends ExcaliburTestCase {
     
@@ -36,10 +37,9 @@
     private String m_authority = "localhost:8888";
     private String m_path = "/webdav/";
     private String m_name = "files";
-    private String m_qs = "?foo=bar";
-    private String m_location = m_scheme + "://" + m_credentials + "@" + m_authority + m_path + m_name + m_qs;
-    private String m_secure = m_scheme + "://" + m_authority + m_path + m_name + m_qs;
-    private String m_options = "&cocoon:webdav-action=" + WebdavResource.NOACTION + "&cocoon:webdav-depth=0";
+    private String m_location = m_scheme + "://" + m_credentials + "@" + m_authority + m_path + m_name;
+    private String m_secure = m_scheme + "://" + m_authority + m_path + m_name;
+    private String m_options = "?cocoon:webdav-action=" + WebdavResource.NOACTION + "&cocoon:webdav-depth=0";
     
     
     public WebDAVSourceTestCase(String name) {
@@ -73,26 +73,22 @@
 //            assertTrue(parent.isCollection());
 //            resolver.release(child);
 //        }
+//
+//        TraversableSource child = (TraversableSource) source.getChild("childcollection");
+//        assertEquals(child.getURI(), m_location + "/childcollection");
+//
+//        TraversableSource parent = (TraversableSource) child.getParent();
+//        assertEquals(m_name, parent.getName());
+//        
 //        resolver.release(source);
     }
 
     public void testModification() throws Exception {
 //        SourceResolver resolver = (SourceResolver) lookup(SourceResolver.ROLE);
 //        String uri = m_location + m_options;
-//        ModifiableTraversableSource source = (ModifiableTraversableSource) resolver.resolveURI(uri);
-//        ModifiableTraversableSource child = (ModifiableTraversableSource) source.getChild("newcol");
-//        
-//        assertTrue(!child.exists());
-//        child.makeCollection();
-//        assertTrue(child.exists());
-//        child.delete();
-//        assertTrue(!child.exists());
-//        
-//        resolver.release(child);
-//        resolver.release(source);
 //        
-//        source = (ModifiableTraversableSource) resolver.resolveURI(uri);
-//        child = (ModifiableTraversableSource) source.getChild("newdoc.txt");
+//        ModifiableTraversableSource source = (ModifiableTraversableSource) resolver.resolveURI(uri);
+//        ModifiableTraversableSource child = (ModifiableTraversableSource) source.getChild("newdoc.txt");
 //        assertTrue(!child.exists());
 //        
 //        // create document
@@ -116,5 +112,25 @@
 //        
 //        resolver.release(source);
 //        resolver.release(child);
+    }
+    
+    public void testMakeCollection() throws Exception {
+//        SourceResolver resolver = (SourceResolver) lookup(SourceResolver.ROLE);
+//        String uri = m_location + m_options;
+//        ModifiableTraversableSource source = (ModifiableTraversableSource) resolver.resolveURI(uri);
+//        ModifiableTraversableSource child = (ModifiableTraversableSource) source.getChild("child");
+//        ModifiableTraversableSource descendant = (ModifiableTraversableSource) source.getChild("child/decendant");
+//        
+//        assertTrue(!child.exists());
+//        descendant.makeCollection();
+//        assertTrue(child.exists());
+//        assertTrue(descendant.exists());
+//        child.delete();
+//        assertTrue(!child.exists());
+//        descendant.refresh();
+//        assertTrue(!descendant.exists());
+//        
+//        resolver.release(child);
+//        resolver.release(source);
     }
 }

Mime
View raw message