Mercurial > dive4elements > framework
comparison artifacts-common/src/main/java/de/intevation/artifacts/common/utils/ClientProtocolUtils.java @ 261:f3d970a832ff
Bugfix: the document that is used to trigger the OUT operation of a collection will now contain the name of the output mode and its concrete subtype.
artifacts/trunk@1933 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 17 May 2011 09:57:10 +0000 |
parents | c41b300b02c3 |
children | 72de5c373c9b |
comparison
equal
deleted
inserted
replaced
260:7e6146f08c55 | 261:f3d970a832ff |
---|---|
344 /** | 344 /** |
345 * This function builds a document that is used as request document of the | 345 * This function builds a document that is used as request document of the |
346 * out() operation of Collections. | 346 * out() operation of Collections. |
347 * | 347 * |
348 * @param uuid The identifier of the collection. | 348 * @param uuid The identifier of the collection. |
349 * @param mode The name of the desired output mode. | |
349 * @param type The name of the desired output type. | 350 * @param type The name of the desired output type. |
350 * | 351 * |
351 * @return the request document. | 352 * @return the request document. |
352 */ | 353 */ |
353 public static Document newOutCollectionDocument(String uuid, String type) { | 354 public static Document newOutCollectionDocument( |
354 return newOutCollectionDocument(uuid, type, null); | 355 String uuid, |
356 String mode, | |
357 String type) { | |
358 return newOutCollectionDocument(uuid, mode, type, null); | |
355 } | 359 } |
356 | 360 |
357 | 361 |
358 /** | 362 /** |
359 * This function builds a document that is used as request document of the | 363 * This function builds a document that is used as request document of the |
360 * out() operation of Collections. The document <i>attr</i> might be used to | 364 * out() operation of Collections. The document <i>attr</i> might be used to |
361 * adjust some settings specific to the output. | 365 * adjust some settings specific to the output. |
362 * | 366 * |
363 * @param uuid The identifier of the collection. | 367 * @param uuid The identifier of the collection. |
368 * @param mode The name of the desired output mode. | |
364 * @param type The name of the desired output type. | 369 * @param type The name of the desired output type. |
365 * @param attr A document that contains settings specific to the output. | 370 * @param attr A document that contains settings specific to the output. |
366 * | 371 * |
367 * @return the request document. | 372 * @return the request document. |
368 */ | 373 */ |
369 public static Document newOutCollectionDocument( | 374 public static Document newOutCollectionDocument( |
370 String uuid, | 375 String uuid, |
376 String mode, | |
371 String type, | 377 String type, |
372 Document attr) | 378 Document attr) |
373 { | 379 { |
374 Document doc = XMLUtils.newDocument(); | 380 Document doc = XMLUtils.newDocument(); |
375 | 381 |
379 ArtifactNamespaceContext.NAMESPACE_PREFIX); | 385 ArtifactNamespaceContext.NAMESPACE_PREFIX); |
380 | 386 |
381 Element action = cr.create("action"); | 387 Element action = cr.create("action"); |
382 Element attributes = cr.create("attributes"); | 388 Element attributes = cr.create("attributes"); |
383 | 389 |
384 cr.addAttr(action, "name", type, true); | 390 cr.addAttr(action, "name", mode, true); |
385 cr.addAttr(action, "type", type, true); | 391 cr.addAttr(action, "type", type, true); |
386 | 392 |
387 doc.appendChild(action); | 393 doc.appendChild(action); |
388 | 394 |
389 if (attr != null) { | 395 if (attr != null) { |