comparison artifacts-common/src/main/java/de/intevation/artifacts/common/utils/ClientProtocolUtils.java @ 220:ecfc33a4ba3d

Bugfix: Creating new ArtifactCollection will create artifact collections with empty - but not null - attributes. artifacts/trunk@1563 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 24 Mar 2011 17:43:45 +0000
parents fc435da7f471
children 91333a41b234
comparison
equal deleted inserted replaced
219:cabe4c02ab64 220:ecfc33a4ba3d
209 ArtifactNamespaceContext.NAMESPACE_PREFIX); 209 ArtifactNamespaceContext.NAMESPACE_PREFIX);
210 210
211 Element action = cr.create("action"); 211 Element action = cr.create("action");
212 Element type = cr.create("type"); 212 Element type = cr.create("type");
213 Element collection = cr.create("collection"); 213 Element collection = cr.create("collection");
214 Element attribute = cr.create("attribute");
214 215
215 cr.addAttr(type, "name", "create"); 216 cr.addAttr(type, "name", "create");
216 cr.addAttr(collection, "name", name != null ? name : ""); 217 cr.addAttr(collection, "name", name != null ? name : "");
217 218
218 action.appendChild(type); 219 action.appendChild(type);
219 type.appendChild(collection); 220 type.appendChild(collection);
221 collection.appendChild(attribute);
220 222
221 doc.appendChild(action); 223 doc.appendChild(action);
222 224
223 return doc; 225 return doc;
224 } 226 }

http://dive4elements.wald.intevation.org