Mercurial > dive4elements > gnv-client
annotate gnv-artifacts/src/main/java/de/intevation/gnv/state/PreSettingsTransferCoordinateSelectionState.java @ 780:c4156275c1e1
Bring @author javadoc tags in form '@author <a href="john.doe@example.com">John Doe</a>'
gnv-artifacts/trunk@857 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Mon, 29 Mar 2010 09:35:44 +0000 |
parents | b1f5f2a8840f |
children | a5526908f92f |
rev | line source |
---|---|
747
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.gnv.state; |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
2 |
779
b1f5f2a8840f
Ordered imports. Removed needless imports. Removed empty headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
778
diff
changeset
|
3 import de.intevation.artifactdatabase.Config; |
b1f5f2a8840f
Ordered imports. Removed needless imports. Removed empty headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
778
diff
changeset
|
4 |
b1f5f2a8840f
Ordered imports. Removed needless imports. Removed empty headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
778
diff
changeset
|
5 import de.intevation.artifacts.CallContext; |
b1f5f2a8840f
Ordered imports. Removed needless imports. Removed empty headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
778
diff
changeset
|
6 |
b1f5f2a8840f
Ordered imports. Removed needless imports. Removed empty headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
778
diff
changeset
|
7 import de.intevation.gnv.state.exception.StateException; |
b1f5f2a8840f
Ordered imports. Removed needless imports. Removed empty headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
778
diff
changeset
|
8 |
747
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
9 import java.util.ArrayList; |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
10 import java.util.Collection; |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
11 import java.util.Map; |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
12 |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
13 import org.w3c.dom.Element; |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
14 import org.w3c.dom.Node; |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
15 |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
16 /** |
780
c4156275c1e1
Bring @author javadoc tags in form '@author <a href="john.doe@example.com">John Doe</a>'
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
779
diff
changeset
|
17 * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a> |
747
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
18 * |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
19 */ |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
20 public class PreSettingsTransferCoordinateSelectionState extends CoordinateSelectionState { |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
21 |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
22 |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
23 /** |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
24 * The UID of this Class. |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
25 */ |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
26 private static final long serialVersionUID = -3972304838976884048L; |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
27 |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
28 private String transferPreSettingsName = null; |
778
9a828e5a2390
Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
747
diff
changeset
|
29 |
747
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
30 private String transferInputDataname = null; |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
31 /** |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
32 * Constructor |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
33 */ |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
34 public PreSettingsTransferCoordinateSelectionState() { |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
35 super(); |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
36 } |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
37 |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
38 /** |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
39 * @see de.intevation.gnv.state.StateBase#initialize(java.lang.String, de.intevation.artifacts.CallContext) |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
40 */ |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
41 @Override |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
42 public void initialize(String uuid, CallContext context) |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
43 throws StateException { |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
44 Map<String, InputData> preSettings = this.getPreSettings(); |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
45 if (preSettings != null){ |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
46 InputData ip = preSettings.get(transferPreSettingsName); |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
47 if (ip != null){ |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
48 Collection<InputData> localInputdata = new ArrayList<InputData>(1); |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
49 localInputdata.add(new DefaultInputData(transferInputDataname, |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
50 ip.getValue())); |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
51 this.putInputData(localInputdata, uuid); |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
52 } |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
53 } |
778
9a828e5a2390
Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
747
diff
changeset
|
54 |
747
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
55 super.initialize(uuid, context); |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
56 } |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
57 |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
58 /** |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
59 * @see de.intevation.gnv.state.StateBase#setup(org.w3c.dom.Node) |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
60 */ |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
61 @Override |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
62 public void setup(Node configuration) { |
778
9a828e5a2390
Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
747
diff
changeset
|
63 |
747
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
64 Element preSettingsNode = (Element)Config.getNodeXPath(configuration, |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
65 "presettings-transfer"); |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
66 if (preSettingsNode != null){ |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
67 this.transferPreSettingsName = preSettingsNode.getAttribute("presetting"); |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
68 this.transferInputDataname = preSettingsNode.getAttribute("inputvalue"); |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
69 } |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
70 super.setup(configuration); |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
71 } |
778
9a828e5a2390
Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
747
diff
changeset
|
72 |
9a828e5a2390
Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
747
diff
changeset
|
73 |
747
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
74 |
a5e860f17a52
Added an new State wich will handle the Display of Coordinatevalues and fetch given Inputparameters from the Presettings and copy them to the InputValues.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
75 } |