comparison 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
comparison
equal deleted inserted replaced
597:cf38b983d1f3 598:9681ac6b6527
51 /** 51 /**
52 * @author Tim Englich (tim.englich@intevation.de) 52 * @author Tim Englich (tim.englich@intevation.de)
53 * @author Ingo Weinzierl (ingo.weinzierl@intevation.de) 53 * @author Ingo Weinzierl (ingo.weinzierl@intevation.de)
54 * @author Sascha L. Teichmann (sascha.teichmann@intevation.de) 54 * @author Sascha L. Teichmann (sascha.teichmann@intevation.de)
55 */ 55 */
56 public abstract class GNVArtifactBase extends GNVDefaultArtifact { 56 public abstract class GNVArtifactBase extends GNVDefaultArtifact
57 implements PreSettingArtifact {
58
57 /** 59 /**
58 * the logger, used to log exceptions and additonaly information 60 * the logger, used to log exceptions and additonaly information
59 */ 61 */
60 private static Logger log = Logger.getLogger(GNVArtifactBase.class); 62 private static Logger log = Logger.getLogger(GNVArtifactBase.class);
61 /** 63 /**
102 /** 104 /**
103 * The Transitions which can switch between the different States. 105 * The Transitions which can switch between the different States.
104 */ 106 */
105 protected Collection<Transition> transitions = null; 107 protected Collection<Transition> transitions = null;
106 108
107
108 /** 109 /**
109 * The current product 110 * The current product
110 */ 111 */
111 protected Product product; 112 protected Product product;
112 113
113 /** 114 /**
114 * The Name of the Artifact 115 * The Name of the Artifact
115 */ 116 */
116 protected String name = null; 117 protected String name = null;
118
119 /**
120 * The Presettings of InputData which can be used to
121 * travel through the States in different Ways or
122 * manipulate the InputData
123 */
124 private Map<String, InputData> preSettings = null;
117 125
118 /** 126 /**
119 * Constructor 127 * Constructor
120 */ 128 */
121 public GNVArtifactBase() { 129 public GNVArtifactBase() {
155 next = states.get(targetState); 163 next = states.get(targetState);
156 164
157 // 2. Transfer Results 165 // 2. Transfer Results
158 next.putInputData(current.getInputData(), identifier); 166 next.putInputData(current.getInputData(), identifier);
159 next.setParent(current); 167 next.setParent(current);
168 next.setPreSettings(this.preSettings);
160 169
161 if (current != null) { 170 if (current != null) {
162 current.endOfLife(context.globalContext()); 171 current.endOfLife(context.globalContext());
163 } 172 }
164 173
832 return value; 841 return value;
833 } 842 }
834 843
835 844
836 public void setProduct(Product product) { 845 public void setProduct(Product product) {
837 this.product = product; 846 this.product = product;
838 } 847 }
839 848
840 public void endOfLife(Object globalContext) { 849 public void endOfLife(Object globalContext) {
841 super.endOfLife(globalContext); 850 super.endOfLife(globalContext);
842 851
843 if (current != null) { 852 if (current != null) {
844 current.endOfLife(globalContext); 853 current.endOfLife(globalContext);
845 } 854 }
846 } 855 }
856
857 /**
858 * @see de.intevation.gnv.artifacts.PreSettingArtifact#getPreSettings()
859 */
860 public Map<String, InputData> getPreSettings() {
861 return this.preSettings;
862 }
863
864 /**
865 * @see de.intevation.gnv.artifacts.PreSettingArtifact#setPreSettings(java.util.Map)
866 */
867 public void setPreSettings(Map<String, InputData> preSettings) {
868 this.preSettings = preSettings;
869 if (this.current != null){
870 this.current.setPreSettings(preSettings);
871 }
872 }
847 } 873 }
848 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8: 874 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:

http://dive4elements.wald.intevation.org