changeset 489:665613c35cab 3.0.7

Add newCreateDocument call that accepts targetOut parameter
author Andre Heinecke <aheinecke@intevation.de>
date Fri, 31 May 2013 15:00:08 +0200
parents 83ee2c6a53b6
children e34058d7a17c
files artifacts-common/src/main/java/org/dive4elements/artifacts/common/utils/ClientProtocolUtils.java
diffstat 1 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts-common/src/main/java/org/dive4elements/artifacts/common/utils/ClientProtocolUtils.java	Fri May 31 14:59:39 2013 +0200
+++ b/artifacts-common/src/main/java/org/dive4elements/artifacts/common/utils/ClientProtocolUtils.java	Fri May 31 15:00:08 2013 +0200
@@ -114,6 +114,16 @@
         String         ids,
         CreationFilter filter
     ) {
+        return newCreateDocument(factory, uuid, ids, filter, null);
+    }
+
+    public static Document newCreateDocument(
+        String         factory,
+        String         uuid,
+        String         ids,
+        CreationFilter filter,
+        String         targetOut
+    ) {
         Document doc = XMLUtils.newDocument();
 
         XMLUtils.ElementCreator cr = new XMLUtils.ElementCreator(
@@ -147,6 +157,12 @@
             action.appendChild(filter.toXML(cr));
         }
 
+        if (targetOut != null) {
+            Element to = cr.create("target_out");
+            to.setAttribute("value", targetOut);
+            action.appendChild(to);
+        }
+
         doc.appendChild(action);
 
         return doc;

http://dive4elements.wald.intevation.org