Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java @ 624:929137ee8154
ISSUE-62 (part I/II) States are no longer filled with data - if a state needs user input, it needs to query the owner artifact.
flys-artifacts/trunk@1982 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 23 May 2011 15:11:55 +0000 |
parents | af1b64ec7250 |
children | acf3b49ec31f |
comparison
equal
deleted
inserted
replaced
623:aa64fe4df8ab | 624:929137ee8154 |
---|---|
73 * @return the description of this artifact. | 73 * @return the description of this artifact. |
74 */ | 74 */ |
75 public Document describe(Document data, CallContext context) { | 75 public Document describe(Document data, CallContext context) { |
76 logger.debug("Describe: the current state is: " + getCurrentStateId()); | 76 logger.debug("Describe: the current state is: " + getCurrentStateId()); |
77 | 77 |
78 if (logger.isDebugEnabled()) { | |
79 dumpArtifact(); | |
80 } | |
81 | |
78 FLYSContext flysContext = null; | 82 FLYSContext flysContext = null; |
79 if (context instanceof FLYSContext) { | 83 if (context instanceof FLYSContext) { |
80 flysContext = (FLYSContext) context; | 84 flysContext = (FLYSContext) context; |
81 } | 85 } |
82 else { | 86 else { |
176 logger.debug("Append output modes for state: " + stateId); | 180 logger.debug("Append output modes for state: " + stateId); |
177 State state = engine.getState(stateId); | 181 State state = engine.getState(stateId); |
178 | 182 |
179 List<Output> list = state.getOutputs(); | 183 List<Output> list = state.getOutputs(); |
180 if (list == null || list.size() == 0) { | 184 if (list == null || list.size() == 0) { |
185 logger.debug("-> No output modes for this state."); | |
181 continue; | 186 continue; |
182 } | 187 } |
183 | 188 |
184 ProtocolUtils.appendOutputModes(creator, outs, list); | 189 ProtocolUtils.appendOutputModes(creator, outs, list); |
185 } | 190 } |
224 FLYSContext.STATE_ENGINE_KEY); | 229 FLYSContext.STATE_ENGINE_KEY); |
225 | 230 |
226 for (String stateId: stateIds) { | 231 for (String stateId: stateIds) { |
227 logger.debug("Append static data for state: " + stateId); | 232 logger.debug("Append static data for state: " + stateId); |
228 DefaultState state = (DefaultState) engine.getState(stateId); | 233 DefaultState state = (DefaultState) engine.getState(stateId); |
229 state = (DefaultState) fillState(state); | 234 |
230 | 235 ui.appendChild(state.describeStatic(this, doc, ui, context, uuid)); |
231 ui.appendChild(state.describeStatic(doc, ui, context, uuid)); | |
232 } | 236 } |
233 } | 237 } |
234 | 238 |
235 | 239 |
236 // | 240 // |