Mercurial > dive4elements > gnv-client
comparison gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java @ 194:00c1a931b9c3
Catch Exception that the Calling Program could not put no InputData
into the feed Request.issue56
gnv-artifacts/trunk@244 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Mon, 19 Oct 2009 12:18:08 +0000 |
parents | 7fb9441dd8af |
children | 734ac082c8d1 |
comparison
equal
deleted
inserted
replaced
193:34f233123a6f | 194:00c1a931b9c3 |
---|---|
179 Document result = XMLUtils.newDocument(); | 179 Document result = XMLUtils.newDocument(); |
180 try { | 180 try { |
181 if (this.current != null) { | 181 if (this.current != null) { |
182 String uuid = Config.getStringXPath(target, | 182 String uuid = Config.getStringXPath(target, |
183 "action/uuid/@value"); | 183 "action/uuid/@value"); |
184 this.current.putInputData(this.parseInputData(target, | 184 Collection<InputData> inputData = this.parseInputData(target, |
185 "/action/data/input"), uuid); | 185 "/action/data/input"); |
186 result = new ArtifactXMLUtilities().createSuccessReport( | 186 if (!inputData.isEmpty()){ |
187 "Feed success", XMLUtils.newDocument()); | 187 this.current.putInputData(inputData, uuid); |
188 result = new ArtifactXMLUtilities().createSuccessReport( | |
189 "Feed success", XMLUtils.newDocument()); | |
190 }else{ | |
191 String msg = "No Inputdata given. Please select at least one Entry."; | |
192 log.warn(msg); | |
193 result = new ArtifactXMLUtilities().createExceptionReport(msg, | |
194 XMLUtils.newDocument()); | |
195 } | |
188 } else { | 196 } else { |
189 String msg = "No Transition instantiated"; | 197 String msg = "No Transition instantiated"; |
190 log.warn(msg); | 198 log.warn(msg); |
191 result = new ArtifactXMLUtilities().createExceptionReport(msg, | 199 result = new ArtifactXMLUtilities().createExceptionReport(msg, |
192 XMLUtils.newDocument()); | 200 XMLUtils.newDocument()); |