diff flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java @ 693:af393c5eb2c8 facets-slt

Write computed facets into artifacts describe document. flys-artifacts/branches/facets-slt@2133 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 16 Jun 2011 13:24:00 +0000
parents 22e4bffbe240
children 708b270dfd30
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java	Thu Jun 16 10:05:44 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java	Thu Jun 16 13:24:00 2011 +0000
@@ -246,6 +246,9 @@
 
             setCurrentStateId(targetState);
 
+            logger.debug("Compute data for state: " + targetState);
+            compute(context, ComputeType.ADVANCE);
+
             return describe(target, context);
         }
         else if (isPreviousState(targetState, context)) {
@@ -264,8 +267,6 @@
 
             setCurrentStateId(targetState);
 
-            compute(context, ComputeType.ADVANCE);
-
             return describe(target, context);
         }
 
@@ -1071,9 +1072,9 @@
      * @return the computed data.
      */
     public Object compute(CallContext context, String hash, ComputeType type) {
-        String calc = (String) getData(CalculationSelect.FIELD_MODE).getValue();
+        DefaultState current = (DefaultState) getCurrentState(context);
 
-        DefaultState current = (DefaultState) getCurrentState(context);
+        logger.debug("Create ComputeCallback for state: " + current.getID());
 
         ComputeCallback callback = current.createComputeCallback(hash(), this);
 

http://dive4elements.wald.intevation.org