diff gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java @ 208:a33d59f5791a

Use super.identifier as uuid. issue3 gnv-artifacts/trunk@264 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Fri, 23 Oct 2009 14:26:45 +0000
parents d87347142702
children 3dcd2b0b456e
line wrap: on
line diff
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java	Fri Oct 23 08:50:50 2009 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java	Fri Oct 23 14:26:45 2009 +0000
@@ -65,8 +65,6 @@
                                                               + XPATH_IDENTIFIER_REPLACE
                                                               + "']";
 
-    
-    protected String uuid = null;
     /**
      * The current Transition
      */
@@ -98,7 +96,6 @@
     @Override
     public Document advance(Document target, CallContext context) {
         log.debug("GNVArtifactBase.advance");
-        this.uuid = Config.getStringXPath(target, "action/uuid/@value");
         Document result = XMLUtils.newDocument();
         try {
             if (this.current != null) {
@@ -112,10 +109,10 @@
                             Transition nextStep = this.transitions
                                     .get(transitionName);
                             // 2.Ergebnisse Berechnen
-                            this.current.advance(uuid, context.getMeta());
+                            this.current.advance(super.identifier, context.getMeta());
                             // 3. Ergebnisse Übergeben
-                            nextStep.putInputData(this.current.getInputData(),
-                                    uuid);
+                            nextStep.putInputData(this.current.getInputData(), 
+                                                  super.identifier);
                             // 4. Umschalten auf neue Transistion
                             this.current = nextStep;
                             result = new ArtifactXMLUtilities()
@@ -209,11 +206,10 @@
         Document result = XMLUtils.newDocument();
         try {
             if (this.current != null) {
-                this.uuid = Config.getStringXPath(target,"action/uuid/@value");
                 Collection<InputData> inputData = this.parseInputData(target,
                                                                       "/action/data/input");
                 if (!inputData.isEmpty()){
-                    this.current.putInputData(inputData, uuid);
+                    this.current.putInputData(inputData, super.identifier);
                     result = new ArtifactXMLUtilities().createSuccessReport(
                             "Feed success", XMLUtils.newDocument());
                 }else{
@@ -463,11 +459,10 @@
         try {
 
             if (current != null && current instanceof OutputTransition) {
-                this.uuid = Config.getStringXPath(format,"action/uuid/@value");
                 ((OutputTransition) current)
                         .out(this.readOutputType(format), this.parseInputData(
                                 format, "/action/out/params/input"),
-                                outputStream, uuid, context.getMeta());
+                                outputStream, super.identifier, context.getMeta());
             }
         } catch (TransitionException e) {
             log.error(e, e);

http://dive4elements.wald.intevation.org