Mercurial > dive4elements > gnv-client
comparison gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java @ 220:ee2d4134d0b3
General CodecCleanup:
Remove deprecated TODOS.
Organize some Imports.
Remove Bug setting the returned Value of MinMaxTransitions in feedCall.
gnv-artifacts/trunk@281 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Mon, 02 Nov 2009 10:58:03 +0000 |
parents | 3dcd2b0b456e |
children | 3e82b4f1c455 |
comparison
equal
deleted
inserted
replaced
219:f8cb64d5fe4f | 220:ee2d4134d0b3 |
---|---|
100 try { | 100 try { |
101 if (this.current != null) { | 101 if (this.current != null) { |
102 String transitionName = this.readTransitionName(target); | 102 String transitionName = this.readTransitionName(target); |
103 log.debug("Transitionsname: " + transitionName); | 103 log.debug("Transitionsname: " + transitionName); |
104 if (this.current.isTransitionReachable(transitionName)) { | 104 if (this.current.isTransitionReachable(transitionName)) { |
105 // 1. Prüfung ob Transition valide ist | 105 try { |
106 if (this.current.validate()) { | 106 Transition nextStep = this.transitions |
107 | 107 .get(transitionName); |
108 try { | 108 // 1.Ergebnisse Berechnen |
109 Transition nextStep = this.transitions | 109 this.current.advance(super.identifier, context.getMeta()); |
110 .get(transitionName); | 110 // 2. Ergebnisse Übergeben |
111 // 2.Ergebnisse Berechnen | 111 nextStep.putInputData(this.current.getInputData(), |
112 this.current.advance(super.identifier, context.getMeta()); | 112 super.identifier); |
113 // 3. Ergebnisse Übergeben | 113 // 3. Umschalten auf neue Transistion |
114 nextStep.putInputData(this.current.getInputData(), | 114 this.current = nextStep; |
115 super.identifier); | |
116 // 4. Umschalten auf neue Transistion | |
117 this.current = nextStep; | |
118 result = new ArtifactXMLUtilities() | |
119 .createSuccessReport("Advance success", | |
120 XMLUtils.newDocument()); | |
121 } catch (TransitionException e) { | |
122 log.error(e, e); | |
123 result = new ArtifactXMLUtilities() | |
124 .createExceptionReport(e | |
125 .getLocalizedMessage(), XMLUtils | |
126 .newDocument()); | |
127 } | |
128 | |
129 } else { | |
130 String msg = "Advance nicht möglich, da die Bedingungen für den Übergang " | |
131 + "in den neuen Zustand noch nicht gegeben ist."; | |
132 log.error(msg); | |
133 result = new ArtifactXMLUtilities() | 115 result = new ArtifactXMLUtilities() |
134 .createExceptionReport(msg, XMLUtils | 116 .createSuccessReport("Advance success", |
117 XMLUtils.newDocument()); | |
118 } catch (TransitionException e) { | |
119 log.error(e, e); | |
120 result = new ArtifactXMLUtilities() | |
121 .createExceptionReport(e | |
122 .getLocalizedMessage(), XMLUtils | |
135 .newDocument()); | 123 .newDocument()); |
136 } | 124 } |
137 | |
138 } else { | 125 } else { |
139 String msg = "Transitionsübergang wird nicht unterstützt."; | 126 String msg = "Transitionsübergang wird nicht unterstützt."; |
140 log.error(msg); | 127 log.error(msg); |
141 result = new ArtifactXMLUtilities().createExceptionReport( | 128 result = new ArtifactXMLUtilities().createExceptionReport( |
142 msg, XMLUtils.newDocument()); | 129 msg, XMLUtils.newDocument()); |