changeset 1165:3b034bb5fce7

Add status message for queued WSPLGEN jobs to notify users. flys-artifacts/trunk@2705 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Mon, 12 Sep 2011 13:03:27 +0000
parents 0398c2b8dbaf
children 865ee1e19c62
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FloodMapState.java flys-artifacts/src/main/resources/messages.properties flys-artifacts/src/main/resources/messages_de.properties flys-artifacts/src/main/resources/messages_de_DE.properties flys-artifacts/src/main/resources/messages_en.properties
diffstat 6 files changed, 31 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Mon Sep 12 11:40:04 2011 +0000
+++ b/flys-artifacts/ChangeLog	Mon Sep 12 13:03:27 2011 +0000
@@ -1,3 +1,15 @@
+2011-09-12  Ingo Weinzierl <ingo@intevation.de>
+
+	* src/main/java/de/intevation/flys/artifacts/states/FloodMapState.java:
+	  Add a first WSPLGEN status message (notifies the user about a
+	  queued job) after the job has been added to the Scheduler.
+
+	* src/main/resources/messages.properties,
+	  src/main/resources/messages_de_DE.properties,
+	  src/main/resources/messages_en.properties,
+	  src/main/resources/messages_de.properties: Added english and german
+	  status message text.
+
 2011-09-12  Ingo Weinzierl <ingo@intevation.de>
 
 	* src/main/java/de/intevation/flys/utils/GeometryUtils.java: Write
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FloodMapState.java	Mon Sep 12 11:40:04 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FloodMapState.java	Mon Sep 12 13:03:27 2011 +0000
@@ -35,6 +35,7 @@
 import de.intevation.flys.model.RiverAxis;
 
 import de.intevation.flys.artifacts.FLYSArtifact;
+import de.intevation.flys.artifacts.model.CalculationMessage;
 import de.intevation.flys.artifacts.model.CalculationResult;
 import de.intevation.flys.artifacts.model.FacetTypes;
 import de.intevation.flys.artifacts.model.WQKms;
@@ -42,11 +43,13 @@
 import de.intevation.flys.artifacts.model.WSPLGENCalculation;
 import de.intevation.flys.artifacts.model.WSPLGENJob;
 import de.intevation.flys.artifacts.model.WSPLGENReportFacet;
+import de.intevation.flys.artifacts.resources.Resources;
 import de.intevation.flys.artifacts.states.DefaultState.ComputeType;
 import de.intevation.flys.exports.WstWriter;
 import de.intevation.flys.utils.FLYSUtils;
 import de.intevation.flys.utils.GeometryUtils;
 import de.intevation.flys.utils.MapfileGenerator;
+import de.intevation.flys.wsplgen.JobObserver;
 import de.intevation.flys.wsplgen.Scheduler;
 
 
@@ -209,6 +212,14 @@
         facets.addAll(facetCreator.getFacets());
 
         context.afterCall(CallContext.BACKGROUND);
+        context.addBackgroundMessage(new CalculationMessage(
+            JobObserver.STEPS.length,
+            0,
+            Resources.getMsg(
+                context.getMeta(),
+                "wsplgen.job.queued",
+                "wsplgen.job.queued")
+        ));
 
         return null;
     }
--- a/flys-artifacts/src/main/resources/messages.properties	Mon Sep 12 11:40:04 2011 +0000
+++ b/flys-artifacts/src/main/resources/messages.properties	Mon Sep 12 13:03:27 2011 +0000
@@ -75,3 +75,5 @@
 
 floodmap.wmsbackground = Background Map
 floodmap.riveraxis = River Axis
+
+wsplgen.job.queued = WSPLGEN job in queue.
--- a/flys-artifacts/src/main/resources/messages_de.properties	Mon Sep 12 11:40:04 2011 +0000
+++ b/flys-artifacts/src/main/resources/messages_de.properties	Mon Sep 12 13:03:27 2011 +0000
@@ -76,3 +76,5 @@
 
 floodmap.wmsbackground = Hintergrundkarte
 floodmap.riveraxis = Flussachse
+
+wsplgen.job.queued = WSPLGEN Berechnung befindet sich in Warteschlange.
--- a/flys-artifacts/src/main/resources/messages_de_DE.properties	Mon Sep 12 11:40:04 2011 +0000
+++ b/flys-artifacts/src/main/resources/messages_de_DE.properties	Mon Sep 12 13:03:27 2011 +0000
@@ -75,3 +75,5 @@
 
 floodmap.wmsbackground = Hintergrundkarte
 floodmap.riveraxis = Flussachse
+
+wsplgen.job.queued = WSPLGEN Berechnung befindet sich in Warteschlange.
--- a/flys-artifacts/src/main/resources/messages_en.properties	Mon Sep 12 11:40:04 2011 +0000
+++ b/flys-artifacts/src/main/resources/messages_en.properties	Mon Sep 12 13:03:27 2011 +0000
@@ -73,3 +73,5 @@
 
 floodmap.wmsbackground = Background Map
 floodmap.riveraxis = River Axis
+
+wsplgen.job.queued = WSPLGEN job in queue.

http://dive4elements.wald.intevation.org