Mercurial > dive4elements > gnv-client
diff gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java @ 207:d87347142702
Store the Results of an Artifact not in the Artifact but in an ehcache instance. issue3
gnv-artifacts/trunk@263 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Fri, 23 Oct 2009 08:50:50 +0000 |
parents | 734ac082c8d1 |
children | a33d59f5791a |
line wrap: on
line diff
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java Fri Oct 23 07:37:39 2009 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java Fri Oct 23 08:50:50 2009 +0000 @@ -65,6 +65,8 @@ + XPATH_IDENTIFIER_REPLACE + "']"; + + protected String uuid = null; /** * The current Transition */ @@ -96,7 +98,7 @@ @Override public Document advance(Document target, CallContext context) { log.debug("GNVArtifactBase.advance"); - String uuid = Config.getStringXPath(target, "action/uuid/@value"); + this.uuid = Config.getStringXPath(target, "action/uuid/@value"); Document result = XMLUtils.newDocument(); try { if (this.current != null) { @@ -112,8 +114,6 @@ // 2.Ergebnisse Berechnen this.current.advance(uuid, context.getMeta()); // 3. Ergebnisse Übergeben - nextStep.setDescibeData(this.current - .getDescibeData()); nextStep.putInputData(this.current.getInputData(), uuid); // 4. Umschalten auf neue Transistion @@ -209,8 +209,7 @@ Document result = XMLUtils.newDocument(); try { if (this.current != null) { - String uuid = Config.getStringXPath(target, - "action/uuid/@value"); + this.uuid = Config.getStringXPath(target,"action/uuid/@value"); Collection<InputData> inputData = this.parseInputData(target, "/action/data/input"); if (!inputData.isEmpty()){ @@ -275,7 +274,7 @@ } } - protected Document createDescibeOutput(CallMeta callMeta) { + protected Document createDescibeOutput(CallMeta callMeta, String uuid) { log.debug("GNVArtifactBase.createDescibeOutput"); Document document = XMLUtils.newDocument(); Element rootNode = this.createRootNode(document); @@ -284,7 +283,7 @@ this.createCurrentState(rootNode, document); this.createReachableStates(rootNode, document); this.createModel(rootNode, document); - this.createUserInterface(rootNode, document, callMeta); + this.createUserInterface(rootNode, document, callMeta, uuid); return document; } @@ -360,11 +359,11 @@ } protected void createUserInterface(Element parent, Document document, - CallMeta callMeta) { + CallMeta callMeta, String uuid) { Element uiNode = xmlUtilities.createArtifactElement(document, "ui"); if (this.current != null) { - this.current.describe(document, uiNode, callMeta); + this.current.describe(document, uiNode, callMeta, uuid); } parent.appendChild(uiNode); @@ -464,8 +463,7 @@ try { if (current != null && current instanceof OutputTransition) { - String uuid = Config.getStringXPath(format, - "action/uuid/@value"); + this.uuid = Config.getStringXPath(format,"action/uuid/@value"); ((OutputTransition) current) .out(this.readOutputType(format), this.parseInputData( format, "/action/out/params/input"),