diff gnv-artifacts/src/main/java/de/intevation/gnv/state/timeseries/TimeSeriesOutputState.java @ 830:3ab5754e72e3

Extract ODV-Generation into its own method that it is possible to override it in subclasses. gnv-artifacts/trunk@924 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Tue, 13 Apr 2010 14:35:30 +0000
parents 499cfbbb61bc
children 2423cefe7d39
line wrap: on
line diff
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/state/timeseries/TimeSeriesOutputState.java	Tue Apr 13 14:26:21 2010 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/state/timeseries/TimeSeriesOutputState.java	Tue Apr 13 14:35:30 2010 +0000
@@ -481,8 +481,7 @@
 
             }
             else if (outputMode.equalsIgnoreCase("odv")) {
-                Collection<Result> odvResult = this.getODVResult(uuid);
-                this.createODV(outputStream, odvResult,uuid);
+                createODV(outputStream, uuid, callContext);
             }
         } catch (IOException e) {
             log.error(e, e);
@@ -498,6 +497,22 @@
 
 
     /**
+     * @param outputStream
+     * @param uuid
+     * @throws IOException
+     * @throws StateException
+     */
+    protected void createODV(OutputStream outputStream, 
+                             String uuid, 
+                             CallContext callContext)
+                                                    throws IOException,
+                                                    StateException {
+        Collection<Result> odvResult = this.getODVResult(uuid);
+        this.createODV(outputStream, odvResult,uuid);
+    }
+
+
+    /**
      * Retrieves the export format (e.g. png, gif, jpeg).
      *
      * @param mime Export format specified by the incoming  request.

http://dive4elements.wald.intevation.org