summaryrefslogtreecommitdiff
path: root/bkucommon/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'bkucommon/src/main')
-rw-r--r--bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/InfoboxReadResultFileImpl.java22
1 files changed, 20 insertions, 2 deletions
diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/InfoboxReadResultFileImpl.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/InfoboxReadResultFileImpl.java
index 98c2432f..e43d99c6 100644
--- a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/InfoboxReadResultFileImpl.java
+++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/InfoboxReadResultFileImpl.java
@@ -29,6 +29,7 @@ import javax.xml.transform.dom.DOMResult;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.w3c.dom.Document;
+import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import at.buergerkarte.namespaces.securitylayer._1.Base64XMLContentType;
@@ -119,8 +120,25 @@ public class InfoboxReadResultFileImpl extends SLResultImpl implements
NodeList nodeList = xmlDocument.getElementsByTagNameNS(SLCommand.NAMESPACE_URI, "XMLContent");
return new DOMResult(nodeList.item(0));
- }
-
+ }
+
+ /**
+ * Creates a new <code>InfoboxReadResponse</code> document and appends
+ * the given <code>node</code> as child node of the <code>XMLContent</code> element.
+ *
+ * @param node the node to be appended as child node of the <code>XMLContnet</code> element
+ * @param preserveSpace if <code>true</code> the value of the <code>XMLContent</code>'s <code>space</code>
+ * attribute is set to <code>preserve</code>.
+ */
+ public void setResultXMLContent(Node node, boolean preserveSpace) {
+
+ xmlDocument = createResponseDocument(null, preserveSpace);
+
+ NodeList nodeList = xmlDocument.getElementsByTagNameNS(SLCommand.NAMESPACE_URI, "XMLContent");
+ nodeList.item(0).appendChild(node);
+
+ }
+
/**
* Creates a new result document for this <code>InfoboxReadResult</code>
* and sets the given <code>resultBytes</code> as content.