diff flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/ReportFacet.java @ 929:960dc6328e70

Facets created by the WaterlevelState store information about state's id and artifact's hash value now. flys-artifacts/trunk@2286 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 06 Jul 2011 09:18:31 +0000
parents 69c8541edcc7
children b1b0a0b61845
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/ReportFacet.java	Tue Jul 05 17:28:57 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/ReportFacet.java	Wed Jul 06 09:18:31 2011 +0000
@@ -19,6 +19,8 @@
     private static Logger logger = Logger.getLogger(ReportFacet.class);
 
     protected ComputeType type;
+    protected String      hash;
+    protected String      stateId;
 
     public ReportFacet() {
         this(ComputeType.ADVANCE);
@@ -29,13 +31,21 @@
         this.type = type;
     }
 
+
+    public ReportFacet(ComputeType type, String hash, String stateId) {
+        super(0, REPORT, "report");
+        this.type    = type;
+        this.hash    = hash;
+        this.stateId = stateId;
+    }
+
     public Object getData(Artifact artifact, CallContext context) {
         logger.debug("get report data");
 
         WINFOArtifact winfo = (WINFOArtifact)artifact;
 
         CalculationResult cr = (CalculationResult)winfo.compute(
-            context, type, false);
+            context, stateId, hash, type, false);
 
         return cr.getReport();
     }

http://dive4elements.wald.intevation.org