Mercurial > dive4elements > framework
changeset 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 | a8d62eb93cd4 |
children | b0a949d3fe09 |
files | ChangeLog artifacts-common/src/main/java/de/intevation/artifacts/common/utils/ClientProtocolUtils.java |
diffstat | 2 files changed, 24 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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 <ingo@intevation.de> + + * 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 <teichmann@intevation.de> * artifacts/src/main/java/de/intevation/artifacts/Service.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);