Mercurial > dive4elements > framework
diff artifacts-common/src/main/java/de/intevation/artifacts/common/utils/ClientProtocolUtils.java @ 325:4022ea69d1cb
Write filters to create document if they are given.
artifacts/trunk@2567 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Wed, 24 Aug 2011 14:35:27 +0000 |
parents | ee6e1b2f137a |
children | e0efa2c28d19 |
line wrap: on
line diff
--- a/artifacts-common/src/main/java/de/intevation/artifacts/common/utils/ClientProtocolUtils.java Wed Aug 24 13:49:59 2011 +0000 +++ b/artifacts-common/src/main/java/de/intevation/artifacts/common/utils/ClientProtocolUtils.java Wed Aug 24 14:35:27 2011 +0000 @@ -84,6 +84,13 @@ return newCreateDocument(factory, uuid, null); } + public static Document newCreateDocument( + String factory, + String uuid, + String ids + ) { + return newCreateDocument(factory, uuid, ids, null); + } /** * This method creates a new CREATE document. @@ -91,10 +98,11 @@ * @return the CREATE document. */ public static Document newCreateDocument( - String factory, - String uuid, - String ids) - { + String factory, + String uuid, + String ids, + CreationFilter filter + ) { Document doc = XMLUtils.newDocument(); XMLUtils.ElementCreator cr = new XMLUtils.ElementCreator( @@ -124,6 +132,10 @@ action.appendChild(id); } + if (filter != null) { + action.appendChild(filter.toXML(cr)); + } + doc.appendChild(action); return doc;