Mercurial > dive4elements > gnv-client
diff gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/fis/FISArtifact.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 | 158e89c2263b |
line wrap: on
line diff
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/fis/FISArtifact.java Thu Sep 24 10:45:24 2009 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/fis/FISArtifact.java Thu Sep 24 11:03:31 2009 +0000 @@ -189,20 +189,24 @@ */ @Override public Document feed(Document target, CallContext context) { + log.debug("FISArtifact.feed"); + Document result = null; if (this.productArtifact == null){ String productName = Config.getStringXPath(target, "action/data/input[@name='product']/@value"); + log.debug("Looking for ProductArtifact "+productName); if (this.products.containsKey(productName)) { this.current = this.products.get(productName); - // TODO : success-Dokument erzeugen - return null; + result = new ArtifactXMLUtilities().createSuccessReport("Feed success New ProductArtifact created", XMLUtils.newDocument()); }else{ String msg = "Product does not exists for "+productName; log.error(msg); - return new ArtifactXMLUtilities().createExceptionReport(msg, XMLUtils.newDocument()); + result = new ArtifactXMLUtilities().createExceptionReport(msg, XMLUtils.newDocument()); } }else{ - return this.productArtifact.feed(target, context); + log.debug("Feed a Productartifact"); + result = this.productArtifact.feed(target, context); } + return result; } /** @@ -257,8 +261,6 @@ this.products.put(productName, new DefaultProduct(productName, parameter,artifactFactory)); } } - - } }