comparison gnv-artifacts/src/main/java/de/intevation/gnv/utils/ArtifactXMLUtilities.java @ 89:cde042a0a395

Successreporting added gnv-artifacts/trunk@126 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Thu, 24 Sep 2009 11:03:31 +0000
parents 1b12021905b9
children 7fb9441dd8af
comparison
equal deleted inserted replaced
88:1b12021905b9 89:cde042a0a395
103 103
104 public Document reInitDocument(Document document){ 104 public Document reInitDocument(Document document){
105 try { 105 try {
106 byte[] barray = this.writeDocument2String(document).getBytes("UTF-8"); 106 byte[] barray = this.writeDocument2String(document).getBytes("UTF-8");
107 InputStream inputStream = new ByteArrayInputStream(barray); 107 InputStream inputStream = new ByteArrayInputStream(barray);
108 //StringBufferInputStream inputStream = new StringBufferInputStream();
109 return this.readDocument(inputStream); 108 return this.readDocument(inputStream);
110 } catch (UnsupportedEncodingException e) { 109 } catch (UnsupportedEncodingException e) {
111 log.error(e,e); 110 log.error(e,e);
112 } 111 }
113 return document; 112 return document;
127 exceptionNode.setTextContent(message); 126 exceptionNode.setTextContent(message);
128 exceptionReportNode.appendChild(exceptionNode); 127 exceptionReportNode.appendChild(exceptionNode);
129 return document; 128 return document;
130 } 129 }
131 130
131 public Document createSuccessReport(String message, Document document){
132 log.debug("ArtifactXMLUtilities.creatSuccessReport");
133 Element reportNode = this.createArtifactElement(document, "result");
134 document.appendChild(reportNode);
135 Element successNode = this.createArtifactElement(document, "success");
136 successNode.setTextContent(message);
137 reportNode.appendChild(successNode);
138 return document;
139 }
140
132 141
133 } 142 }

http://dive4elements.wald.intevation.org