changeset 504:efab67e68bba

Trigger the calculation of the "Horizontalschnitt" when the output state is initialized. gnv-artifacts/trunk@587 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Wed, 20 Jan 2010 16:05:52 +0000
parents b951b14425fa
children 7ff916744f40
files gnv-artifacts/ChangeLog gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/horizontalcrosssection/HorizontalCrossSectionMeshOutputState.java
diffstat 2 files changed, 18 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/gnv-artifacts/ChangeLog	Wed Jan 20 15:48:31 2010 +0000
+++ b/gnv-artifacts/ChangeLog	Wed Jan 20 16:05:52 2010 +0000
@@ -1,3 +1,8 @@
+2010-01-20	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
+
+	* src/main/java/de/intevation/gnv/state/profile/horizontalcrosssection/HorizontalCrossSectionMeshOutputState.java:
+	  Trigger the calculation when the state is initialized.
+
 2010-01-20  Ingo Weinzierl <ingo.weinzierl@intevation.de>
 
 	  Issue129
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/horizontalcrosssection/HorizontalCrossSectionMeshOutputState.java	Wed Jan 20 15:48:31 2010 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/horizontalcrosssection/HorizontalCrossSectionMeshOutputState.java	Wed Jan 20 16:05:52 2010 +0000
@@ -97,6 +97,16 @@
     public HorizontalCrossSectionMeshOutputState() {
     }
 
+    public void initialize(String uuid, CallContext callContext)
+    throws StateException { 
+        super.initialize(uuid, callContext);
+        if (log.isDebugEnabled()) {
+            log.debug("initialize output state " + uuid);
+        }
+        // fill the cache
+        getResult(uuid, callContext);
+    }
+
     public String getShapeFilePath() {
         synchronized (shapeFileLock) {
             return shapeFilePath;
@@ -169,7 +179,9 @@
 
         outputMode = outputMode.toLowerCase();
 
-        log.debug("---- asking for: " + outputMode);
+        if (log.isDebugEnabled()) {
+            log.debug("---- asking for: " + outputMode);
+        }
 
         if ("zip".equals(outputMode)) {
             writeZip(uuid, callContext, outputStream);

http://dive4elements.wald.intevation.org