changeset 8351:0d3d018fc632

Never ever set current km via RiverUtils.
author Tom Gottfried <tom@intevation.de>
date Wed, 01 Oct 2014 13:40:30 +0200
parents 427a813b1791
children 24d044866c2a
files artifacts/src/main/java/org/dive4elements/river/exports/DiagramGenerator.java artifacts/src/main/java/org/dive4elements/river/utils/RiverUtils.java
diffstat 2 files changed, 0 insertions(+), 28 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/DiagramGenerator.java	Wed Oct 01 13:37:43 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/DiagramGenerator.java	Wed Oct 01 13:40:30 2014 +0200
@@ -48,7 +48,6 @@
 import org.dive4elements.river.jfree.XYMetaSeriesCollection;
 
 import org.dive4elements.river.themes.ThemeDocument;
-import org.dive4elements.river.utils.RiverUtils;
 
 import org.jfree.chart.ChartFactory;
 import org.jfree.chart.JFreeChart;
@@ -152,8 +151,6 @@
         CallContext  context
     ) {
         super.init(outName, request, out, context);
-
-        RiverUtils.setKMFromRequestInContext(request, context);
     }
 
     private void setInvertedFromConfig() {
--- a/artifacts/src/main/java/org/dive4elements/river/utils/RiverUtils.java	Wed Oct 01 13:37:43 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/utils/RiverUtils.java	Wed Oct 01 13:40:30 2014 +0200
@@ -890,30 +890,5 @@
         return q;
     }
 
-    /** Parses the request and checks if it contains a currentKM setting.
-     * If this is the case the currentKM is added to the context.*/
-    public static void setKMFromRequestInContext(Document request,
-            CallContext context) {
-        Double dKm;
-        String km = XMLUtils.xpathString(
-            request,
-            XPATH_CHART_CURRENTKM,
-            ArtifactNamespaceContext.INSTANCE);
-
-        if (km == null) {
-            return;
-        }
-
-        try {
-            dKm = Double.valueOf(km);
-        } catch (NumberFormatException nfe) {
-            return;
-        }
-
-        if (log.isDebugEnabled()) {
-            log.debug("currentKm = " + dKm);
-        }
-        context.putContextValue(CURRENT_KM, dKm);
-    }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org