diff gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java @ 598:9681ac6b6527

Added the possibility to use the data which are send using the MapServer-Interface during the Workflow of the GNV-Artifacts. gnv-artifacts/trunk@656 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Tue, 02 Feb 2010 13:12:11 +0000
parents 5b9b74c08bbb
children 292fbcd5e9ac
line wrap: on
line diff
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java	Mon Feb 01 14:52:05 2010 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java	Tue Feb 02 13:12:11 2010 +0000
@@ -53,7 +53,9 @@
  * @author Ingo Weinzierl      (ingo.weinzierl@intevation.de)
  * @author Sascha L. Teichmann (sascha.teichmann@intevation.de)
  */
-public abstract class GNVArtifactBase extends GNVDefaultArtifact {
+public abstract class GNVArtifactBase extends GNVDefaultArtifact 
+                                      implements PreSettingArtifact {
+
     /**
      * the logger, used to log exceptions and additonaly information
      */
@@ -104,7 +106,6 @@
      */
     protected Collection<Transition> transitions = null;
 
-
     /**
      * The current product
      */
@@ -116,6 +117,13 @@
     protected String name = null;
 
     /**
+     * The Presettings of InputData which can be used to
+     * travel through the States in different Ways or
+     * manipulate the InputData
+     */
+    private Map<String, InputData> preSettings = null;
+
+    /**
      * Constructor
      */
     public GNVArtifactBase() {
@@ -157,6 +165,7 @@
                 // 2. Transfer Results
                 next.putInputData(current.getInputData(), identifier);
                 next.setParent(current);
+                next.setPreSettings(this.preSettings);
 
                 if (current != null) {
                     current.endOfLife(context.globalContext());
@@ -834,7 +843,7 @@
 
 
     public void setProduct(Product product) {
-        this.product = product;        
+        this.product = product;
     }
 
     public void endOfLife(Object globalContext) {
@@ -844,5 +853,22 @@
             current.endOfLife(globalContext);
         }
     }
+    
+    /**
+     * @see de.intevation.gnv.artifacts.PreSettingArtifact#getPreSettings()
+     */
+    public Map<String, InputData> getPreSettings() {
+        return this.preSettings;
+    }
+    
+    /**
+     * @see de.intevation.gnv.artifacts.PreSettingArtifact#setPreSettings(java.util.Map)
+     */
+    public void setPreSettings(Map<String, InputData> preSettings) {
+        this.preSettings = preSettings;
+        if (this.current != null){
+            this.current.setPreSettings(preSettings);
+        }
+    }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:

http://dive4elements.wald.intevation.org