changeset 261:f3d970a832ff

Bugfix: the document that is used to trigger the OUT operation of a collection will now contain the name of the output mode and its concrete subtype. artifacts/trunk@1933 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 17 May 2011 09:57:10 +0000
parents 7e6146f08c55
children 5cab846eb2a3
files ChangeLog artifacts-common/src/main/java/de/intevation/artifacts/common/utils/ClientProtocolUtils.java
diffstat 2 files changed, 16 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue May 17 09:02:00 2011 +0000
+++ b/ChangeLog	Tue May 17 09:57:10 2011 +0000
@@ -1,4 +1,10 @@
-2011-04-17	Sascha L. Teichmann	<sascha.teichmann@intevation.de>	
+2011-05-17  Ingo Weinzierl <ingo@intevation.de>
+
+	* artifacts-common/src/main/java/de/intevation/artifacts/common/utils/ClientProtocolUtils.java:
+	  Bugfix: The output name and its concrete type are both written into the
+	  document that is used to trigger the OUT operation of a collection.
+
+2011-04-17	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	* artifact-database/pom.xml: Bumped restlet to version 2.0.7 in hope
 	  to mitigate flys/issue65.
--- a/artifacts-common/src/main/java/de/intevation/artifacts/common/utils/ClientProtocolUtils.java	Tue May 17 09:02:00 2011 +0000
+++ b/artifacts-common/src/main/java/de/intevation/artifacts/common/utils/ClientProtocolUtils.java	Tue May 17 09:57:10 2011 +0000
@@ -346,12 +346,16 @@
      * out() operation of Collections.
      *
      * @param uuid The identifier of the collection.
+     * @param mode The name of the desired output mode.
      * @param type The name of the desired output type.
      *
      * @return the request document.
      */
-    public static Document newOutCollectionDocument(String uuid, String type) {
-        return newOutCollectionDocument(uuid, type, null);
+    public static Document newOutCollectionDocument(
+        String uuid,
+        String mode,
+        String type) {
+        return newOutCollectionDocument(uuid, mode, type, null);
     }
 
 
@@ -361,6 +365,7 @@
      * adjust some settings specific to the output.
      *
      * @param uuid The identifier of the collection.
+     * @param mode The name of the desired output mode.
      * @param type The name of the desired output type.
      * @param attr A document that contains settings specific to the output.
      *
@@ -368,6 +373,7 @@
      */
     public static Document newOutCollectionDocument(
         String   uuid,
+        String   mode,
         String   type,
         Document attr)
     {
@@ -381,7 +387,7 @@
         Element action     = cr.create("action");
         Element attributes = cr.create("attributes");
 
-        cr.addAttr(action, "name", type, true);
+        cr.addAttr(action, "name", mode, true);
         cr.addAttr(action, "type", type, true);
 
         doc.appendChild(action);

http://dive4elements.wald.intevation.org