# HG changeset patch # User Ingo Weinzierl # Date 1311260749 0 # Node ID 0035e2511342879410d618f3c9f896ea73c8f300 # Parent a8d62eb93cd42bd724e383a36024266f1baf5e58 CREATE documents for Artifact creation might contain db-ids now. artifacts/trunk@2388 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r a8d62eb93cd4 -r 0035e2511342 ChangeLog --- a/ChangeLog Thu Jul 21 14:39:45 2011 +0000 +++ b/ChangeLog Thu Jul 21 15:05:49 2011 +0000 @@ -1,3 +1,8 @@ +2011-07-21 Ingo Weinzierl + + * artifacts-common/src/main/java/de/intevation/artifacts/common/utils/ClientProtocolUtils.java: + New CREATE documents for Artifact creation might contain db-ids now. + 2011-07-21 Sascha L. Teichmann * artifacts/src/main/java/de/intevation/artifacts/Service.java, diff -r a8d62eb93cd4 -r 0035e2511342 artifacts-common/src/main/java/de/intevation/artifacts/common/utils/ClientProtocolUtils.java --- 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);