diff artifacts-common/src/main/java/de/intevation/artifacts/common/utils/ClientProtocolUtils.java @ 300:0035e2511342

CREATE documents for Artifact creation might contain db-ids now. artifacts/trunk@2388 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 21 Jul 2011 15:05:49 +0000
parents a367a0d011af
children ee6e1b2f137a
line wrap: on
line diff
--- a/artifacts-common/src/main/java/de/intevation/artifacts/common/utils/ClientProtocolUtils.java	Thu Jul 21 14:39:45 2011 +0000
+++ b/artifacts-common/src/main/java/de/intevation/artifacts/common/utils/ClientProtocolUtils.java	Thu Jul 21 15:05:49 2011 +0000
@@ -81,6 +81,20 @@
      * @return the CREATE document.
      */
     public static Document newCreateDocument(String factory, String uuid) {
+        return newCreateDocument(factory, uuid, null);
+    }
+
+
+    /**
+     * This method creates a new CREATE document.
+     *
+     * @return the CREATE document.
+     */
+    public static Document newCreateDocument(
+        String  factory,
+        String  uuid,
+        String  ids)
+    {
         Document doc = XMLUtils.newDocument();
 
         XMLUtils.ElementCreator cr = new XMLUtils.ElementCreator(
@@ -104,7 +118,11 @@
             action.appendChild(templ);
         }
 
-
+        if (ids != null) {
+            Element id = cr.create("db-ids");
+            id.setAttribute("value", ids);
+            action.appendChild(id);
+        }
 
         doc.appendChild(action);
 

http://dive4elements.wald.intevation.org