Mercurial > dive4elements > gnv-client
comparison gnv-artifacts/src/main/java/de/intevation/gnv/state/OutputStateBase.java @ 815:22c18083225e
Removed compiler warnings while JavaDoc generation.
gnv-artifacts/trunk@900 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 12 Apr 2010 06:59:33 +0000 |
parents | feae2f9d6c6f |
children | 8dc820099306 |
comparison
equal
deleted
inserted
replaced
814:9d427dd2a96a | 815:22c18083225e |
---|---|
54 */ | 54 */ |
55 public abstract class OutputStateBase | 55 public abstract class OutputStateBase |
56 extends StateBase | 56 extends StateBase |
57 implements OutputState | 57 implements OutputState |
58 { | 58 { |
59 /** | |
60 * | |
61 */ | |
62 public static final String XPATH_OUTPUT_MODE = | 59 public static final String XPATH_OUTPUT_MODE = |
63 "/art:action/art:out/@name"; | 60 "/art:action/art:out/@name"; |
64 | 61 |
65 /** | |
66 * | |
67 */ | |
68 public static final String XPATH_EXPORT_MODE = | 62 public static final String XPATH_EXPORT_MODE = |
69 "/art:action/art:out/art:export/@name"; | 63 "/art:action/art:out/art:export/@name"; |
70 | 64 |
71 /** | |
72 * | |
73 */ | |
74 public static final String XPATH_MIME_TYPE = | 65 public static final String XPATH_MIME_TYPE = |
75 "/art:action/art:out/art:mime-type/@value"; | 66 "/art:action/art:out/art:mime-type/@value"; |
76 | 67 |
77 /** | |
78 * | |
79 */ | |
80 public static final String XPATH_EXPORTS = | 68 public static final String XPATH_EXPORTS = |
81 "exportModes/export"; | 69 "exportModes/export"; |
82 | 70 |
83 /** | 71 /** |
84 * The UID of this Class | 72 * The UID of this Class |
93 /** | 81 /** |
94 * The different Outputmodes which are provided by an OutputState | 82 * The different Outputmodes which are provided by an OutputState |
95 */ | 83 */ |
96 protected Collection<OutputMode> outputModes = null; | 84 protected Collection<OutputMode> outputModes = null; |
97 | 85 |
98 /** | |
99 * | |
100 */ | |
101 protected String queryODVID = null; | 86 protected String queryODVID = null; |
102 | 87 |
103 /** | 88 /** |
104 * Constructor | 89 * Constructor |
105 */ | 90 */ |
106 public OutputStateBase() { | 91 public OutputStateBase() { |
107 super(); | 92 super(); |
108 } | 93 } |
109 | 94 |
110 /** | |
111 * | |
112 * @return | |
113 */ | |
114 public Collection<OutputMode> getOutputModes() { | 95 public Collection<OutputMode> getOutputModes() { |
115 log.debug("OutputStateBase.getOutputModes"); | 96 log.debug("OutputStateBase.getOutputModes"); |
116 return this.outputModes; | 97 return this.outputModes; |
117 } | 98 } |
118 | 99 |
119 /** | 100 |
120 * @param configuration | |
121 */ | |
122 @Override | 101 @Override |
123 public void setup(Node configuration) { | 102 public void setup(Node configuration) { |
124 log.debug("OutputStateBase.setup"); | 103 log.debug("OutputStateBase.setup"); |
125 super.setup(configuration); | 104 super.setup(configuration); |
126 | 105 |
183 | 162 |
184 } | 163 } |
185 } | 164 } |
186 } | 165 } |
187 | 166 |
188 /** | 167 |
189 * @param uuid | |
190 * @param context | |
191 * @throws StateException | |
192 */ | |
193 @Override | 168 @Override |
194 public void advance(String uuid, CallContext context) | 169 public void advance(String uuid, CallContext context) |
195 throws StateException | 170 throws StateException |
196 { | 171 { |
197 } | 172 } |
198 | 173 |
199 /** | 174 |
200 * | |
201 * @param uuid | |
202 * @param context | |
203 * @throws StateException | |
204 */ | |
205 @Override | 175 @Override |
206 public void initialize(String uuid, CallContext context) | 176 public void initialize(String uuid, CallContext context) |
207 throws StateException | 177 throws StateException |
208 { | 178 { |
209 } | 179 } |
210 | 180 |
211 /** | 181 /** |
212 * This method needs to be defined by concrete subclasses. Nothing is done | 182 * This method needs to be defined by concrete subclasses. Nothing is done |
213 * here. | 183 * here. |
214 * | |
215 * @param format | |
216 * @param inputData | |
217 * @param outputStream | |
218 * @param uuid | |
219 * @param callMeta | |
220 * @throws StateException | |
221 */ | 184 */ |
222 public void out( | 185 public void out( |
223 Document format, | 186 Document format, |
224 Collection<InputData> inputData, | 187 Collection<InputData> inputData, |
225 OutputStream outputStream, | 188 OutputStream outputStream, |
231 } | 194 } |
232 | 195 |
233 /** | 196 /** |
234 * This method needs to be defined by concrete subclasses. Nothing is done | 197 * This method needs to be defined by concrete subclasses. Nothing is done |
235 * here. | 198 * here. |
236 * | |
237 * @param outputMode | |
238 * @param inputData | |
239 * @param outputStream | |
240 * @throws StateException | |
241 * @see de.intevation.gnv.state.OutputState#out(java.lang.String, | |
242 * java.util.Collection, java.io.OutputStream) | |
243 */ | 199 */ |
244 public void out(String outputMode, Collection<InputData> inputData, | 200 public void out(String outputMode, Collection<InputData> inputData, |
245 OutputStream outputStream) throws StateException { | 201 OutputStream outputStream) throws StateException { |
246 } | 202 } |
247 | 203 |
289 | 245 |
290 /** | 246 /** |
291 * This method should no longer be used, because it is not good to put a | 247 * This method should no longer be used, because it is not good to put a |
292 * chart into cache. Parameter changes done by the user wouldn't be detected | 248 * chart into cache. Parameter changes done by the user wouldn't be detected |
293 * proper. | 249 * proper. |
294 * | |
295 * @param uuid | |
296 * @param callContext | |
297 * @return | |
298 * @deprecated | 250 * @deprecated |
299 */ | 251 */ |
300 protected Object getChartFromCache(String uuid, CallContext callContext) { | 252 protected Object getChartFromCache(String uuid, CallContext callContext) { |
301 log.debug("Fetch chart [" + uuid + "] from cache"); | 253 log.debug("Fetch chart [" + uuid + "] from cache"); |
302 CacheFactory cacheFactory = CacheFactory.getInstance(); | 254 CacheFactory cacheFactory = CacheFactory.getInstance(); |
355 } | 307 } |
356 | 308 |
357 /** | 309 /** |
358 * This method removes the data used for creating charts from cache. | 310 * This method removes the data used for creating charts from cache. |
359 * | 311 * |
360 * @param uuid | |
361 */ | 312 */ |
362 protected void removeChartResult(String uuid) { | 313 protected void removeChartResult(String uuid) { |
363 log.debug("OutputStateBase.getChartResult"); | 314 log.debug("OutputStateBase.getChartResult"); |
364 if (CacheFactory.getInstance().isInitialized()) { | 315 if (CacheFactory.getInstance().isInitialized()) { |
365 String key = "chart_" + getHash(); | 316 String key = "chart_" + getHash(); |
372 } | 323 } |
373 | 324 |
374 /** | 325 /** |
375 * This method should no longer be used. It removes a chart from cache. | 326 * This method should no longer be used. It removes a chart from cache. |
376 * | 327 * |
377 * @param uuid | |
378 * @deprecated | 328 * @deprecated |
379 */ | 329 */ |
380 protected void removeChart(String uuid) { | 330 protected void removeChart(String uuid) { |
381 log.debug("OutputStateBase.removeChart from cache"); | 331 log.debug("OutputStateBase.removeChart from cache"); |
382 | 332 |
389 } | 339 } |
390 } | 340 } |
391 | 341 |
392 /** | 342 /** |
393 * This is an internal method used while database query. | 343 * This is an internal method used while database query. |
394 * | |
395 * @param chart | |
396 * @param uuid | |
397 */ | 344 */ |
398 protected void purifyChart(Object chart, String uuid) { | 345 protected void purifyChart(Object chart, String uuid) { |
399 log.debug("Prufify chart [" + uuid + "]"); | 346 log.debug("Prufify chart [" + uuid + "]"); |
400 CacheFactory cacheFactory = CacheFactory.getInstance(); | 347 CacheFactory cacheFactory = CacheFactory.getInstance(); |
401 if (cacheFactory.isInitialized()) { | 348 if (cacheFactory.isInitialized()) { |
405 } | 352 } |
406 | 353 |
407 | 354 |
408 /** | 355 /** |
409 * Use this method to feed a state with new data. | 356 * Use this method to feed a state with new data. |
410 * | |
411 * @param context | |
412 * @param inputData | |
413 * @param uuid | |
414 * @return | |
415 * @throws StateException | |
416 */ | 357 */ |
417 @Override | 358 @Override |
418 public Document feed( | 359 public Document feed( |
419 CallContext context, | 360 CallContext context, |
420 Collection<InputData> inputData, | 361 Collection<InputData> inputData, |
429 /** | 370 /** |
430 * This method is used to put new data into a next state. The difference | 371 * This method is used to put new data into a next state. The difference |
431 * between this method and feed is, that this method should be used to | 372 * between this method and feed is, that this method should be used to |
432 * transfer some old input data required by this state. New data need to be | 373 * transfer some old input data required by this state. New data need to be |
433 * inserted via feed! | 374 * inserted via feed! |
434 * | |
435 * @param inputData | |
436 * @param uuid | |
437 * @throws StateException | |
438 */ | 375 */ |
439 @Override | 376 @Override |
440 @SuppressWarnings({"static-access", "static-access", "static-access", "static-access"}) | 377 @SuppressWarnings({"static-access", "static-access", "static-access", "static-access"}) |
441 public void putInputData(Collection<InputData> inputData, | 378 public void putInputData(Collection<InputData> inputData, |
442 String uuid) | 379 String uuid) |
533 } else { | 470 } else { |
534 log.warn("No Inputdata given"); | 471 log.warn("No Inputdata given"); |
535 } | 472 } |
536 } | 473 } |
537 | 474 |
538 /** | 475 |
539 * | |
540 * @param outputMode | |
541 * @param inputData | |
542 * @param outputStream | |
543 * @param uuid | |
544 * @param callMeta | |
545 * @throws StateException | |
546 */ | |
547 public void out( | 476 public void out( |
548 String outputMode, | 477 String outputMode, |
549 Collection<InputData> inputData, | 478 Collection<InputData> inputData, |
550 OutputStream outputStream, | 479 OutputStream outputStream, |
551 String uuid, | 480 String uuid, |