changeset 4497:a2735a4bf75e

Change facets member variable to private Don't allow direct access to the facets member variable. Use the addFacets and getFacets methods instead.
author Björn Ricks <bjoern.ricks@intevation.de>
date Wed, 14 Nov 2012 11:15:57 +0100
parents d8992459b408
children 04f144c42da5
files flys-artifacts/src/main/java/de/intevation/flys/artifacts/AnnotationArtifact.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/AreaArtifact.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/BedHeightsArtifact.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/ChartArtifact.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/CrossSectionArtifact.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/ExternalWMSArtifact.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/FlowVelocityMeasurementArtifact.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/GaugeDischargeArtifact.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/HYKArtifact.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/MainValuesArtifact.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/ManualPointsArtifact.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/MapArtifact.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/QSectorArtifact.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/RiverAxisArtifact.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/StaticFLYSArtifact.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/StaticWKmsArtifact.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/StaticWQKmsArtifact.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSBackgroundArtifact.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSBuildingsArtifact.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSCatchmentArtifact.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSDBArtifact.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSFixpointsArtifact.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSFloodmapsArtifact.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSFloodplainArtifact.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSGaugeLocationArtifact.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSHwsArtifact.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSHydrBoundaryArtifact.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSHydrBoundaryPolyArtifact.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSKmArtifact.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSLineArtifact.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSQPSArtifact.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/WQKmsInterpolArtifact.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/WaterlevelArtifact.java
diffstat 34 files changed, 45 insertions(+), 81 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/AnnotationArtifact.java	Wed Nov 14 11:11:04 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/AnnotationArtifact.java	Wed Nov 14 11:15:57 2012 +0100
@@ -106,7 +106,7 @@
 
         if (!fs.isEmpty()) {
             logger.debug("Facets to add in AnnotationsArtifact.initialize .");
-            facets.put(getCurrentStateId(), fs);
+            addFacets(getCurrentStateId(), fs);
         }
         else {
             logger.debug("No facets to add in AnnotationsArtifact.initialize .");
@@ -213,7 +213,7 @@
                 continue;
             }
 
-            List<Facet> fs = facets.get(stateId);
+            List<Facet> fs = getFacets(stateId);
             if (fs == null || fs.isEmpty()) {
                 logger.debug("No facets found.");
                 continue;
@@ -234,7 +234,7 @@
                     logger.debug(
                         "Append output modes for state: " + cur.getID());
 
-                    List<Facet> fs = facets.get(cur.getID());
+                    List<Facet> fs = getFacets(cur.getID());
                     if (fs != null && fs.size() > 0) {
                         List<Output> generated = generateOutputs(list, fs);
 
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/AreaArtifact.java	Wed Nov 14 11:11:04 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/AreaArtifact.java	Wed Nov 14 11:15:57 2012 +0100
@@ -84,7 +84,7 @@
         AreaCreationState state = (AreaCreationState) getCurrentState(context);
 
         if (!fs.isEmpty()) {
-            facets.put(getCurrentStateId(), fs);
+            addFacets(getCurrentStateId(), fs);
         }
     }
 
@@ -148,7 +148,7 @@
      */
     @Override
     public State getCurrentState(Object cc) {
-        final List<Facet> fs = facets.get(getCurrentStateId());
+        final List<Facet> fs = getFacets(getCurrentStateId());
 
         AreaCreationState state = new AreaCreationState();
 
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/BedHeightsArtifact.java	Wed Nov 14 11:11:04 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/BedHeightsArtifact.java	Wed Nov 14 11:15:57 2012 +0100
@@ -116,42 +116,6 @@
     }
 
     /**
-     * Get the "current" state (there is but one).
-     * @param cc ignored.
-     * @return the "current" (only possible) state.
-     */
-    @Override
-    public State getCurrentState(Object cc) {
-        return getState();
-    }
-
-
-    /**
-     * Get the only possible state.
-     * @return the state.
-     */
-    protected State getState() {
-        return getState(null, null);
-    }
-
-
-    /**
-     * Get the state.
-     * @param context ignored.
-     * @param stateID ignored.
-     * @return the state.
-     */
-    @Override
-    protected State getState(Object context, String stateID) {
-        return (state != null)
-            ? state
-            : new StaticState(STATIC_STATE_NAME);
-    }
-
-    /**
-     * Get WKms from factory.
-     * @param idx param is not needed (TODO?)
-     * @return WKms according to parameterization (can be null);
      */
     public BedHeight getHeight() {
         return BedHeightFactory.getHeight(
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/ChartArtifact.java	Wed Nov 14 11:11:04 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/ChartArtifact.java	Wed Nov 14 11:15:57 2012 +0100
@@ -95,7 +95,7 @@
                 continue;
             }
 
-            List<Facet> fs = facets.get(stateId);
+            List<Facet> fs = getFacets(stateId);
 
             if (fs == null || fs.isEmpty()) {
                 logger.debug("No facets for previous state found.");
@@ -116,7 +116,7 @@
                 logger.debug(
                     "Append output modes for current state: " + cur.getID());
 
-                List<Facet> fs = facets.get(cur.getID());
+                List<Facet> fs = getFacets(cur.getID());
 
                 if (fs != null && fs.size() > 0) {
                     List<Output> generated = generateOutputs(list, fs);
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/CrossSectionArtifact.java	Wed Nov 14 11:11:04 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/CrossSectionArtifact.java	Wed Nov 14 11:15:57 2012 +0100
@@ -141,7 +141,7 @@
         StaticState state = (StaticState) getCurrentState(context);
 
         if (!fs.isEmpty()) {
-            facets.put(getCurrentStateId(), fs);
+            addFacets(getCurrentStateId(), fs);
         }
     }
 
@@ -180,7 +180,7 @@
      */
     @Override
     public State getCurrentState(Object cc) {
-        final List<Facet> fs = facets.get(getCurrentStateId());
+        final List<Facet> fs = getFacets(getCurrentStateId());
 
         StaticState state = new StaticState(STATIC_STATE_NAME) {
             @Override
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/ExternalWMSArtifact.java	Wed Nov 14 11:11:04 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/ExternalWMSArtifact.java	Wed Nov 14 11:15:57 2012 +0100
@@ -59,7 +59,7 @@
         s.computeInit(this, hash(), context, callMeta, fs);
 
         if (!fs.isEmpty()) {
-            facets.put(getCurrentStateId(), fs);
+            addFacets(getCurrentStateId(), fs);
         }
     }
 
@@ -78,7 +78,7 @@
     public State getCurrentState(Object cc) {
         State s = new ExternalWMSState(this);
 
-        List<Facet> fs = facets.get(getCurrentStateId());
+        List<Facet> fs = getFacets(getCurrentStateId());
 
         DefaultOutput o = new DefaultOutput(
             "floodmap",
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java	Wed Nov 14 11:11:04 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java	Wed Nov 14 11:15:57 2012 +0100
@@ -95,7 +95,7 @@
     private Map<String, StateData> data;
 
     /** Mapping of state names to created facets. */
-    protected Map<String, List<Facet>> facets;
+    private Map<String, List<Facet>> facets;
 
     /**
      * Used to generates "view" on the facets (hides facets not matching the
@@ -1223,7 +1223,7 @@
 
         String stateId = state.getID();
 
-        List<Facet> fs = facets.get(stateId);
+        List<Facet> fs = getFacets(stateId);
 
         if (fs == null || fs.isEmpty()) {
             if (debug) {
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/FlowVelocityMeasurementArtifact.java	Wed Nov 14 11:11:04 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/FlowVelocityMeasurementArtifact.java	Wed Nov 14 11:15:57 2012 +0100
@@ -68,7 +68,7 @@
     /** Create a new state with bogus output. */
     protected State spawnState() {
         state = new StaticState(STATIC_STATE_NAME);
-        List<Facet> fs = facets.get(STATIC_STATE_NAME);
+        List<Facet> fs = getFacets(STATIC_STATE_NAME);
         DefaultOutput output = new DefaultOutput(
             "general",
             "general",
@@ -111,7 +111,7 @@
                 FLOW_VELOCITY_MEASUREMENT,
                 "flowvelocity-name");
             fs.add(facet);
-            facets.put(state.getID(), fs);
+            addFacets(state.getID(), fs);
             addStringData(DATA_NAME, code);
         }
 
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/GaugeDischargeArtifact.java	Wed Nov 14 11:11:04 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/GaugeDischargeArtifact.java	Wed Nov 14 11:15:57 2012 +0100
@@ -102,7 +102,7 @@
         if (!fs.isEmpty()) {
             logger.debug("Facets to add in GaugeDischargeArtifact.initialize. ("
                 + state.getID() + "/ " + getCurrentStateId() + ").");
-            facets.put(getCurrentStateId(), fs);
+            addFacets(getCurrentStateId(), fs);
         }
         else {
             logger.debug("No facets to add in GaugeDischargeArtifact.initialize ("
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/HYKArtifact.java	Wed Nov 14 11:11:04 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/HYKArtifact.java	Wed Nov 14 11:15:57 2012 +0100
@@ -113,7 +113,7 @@
         state.computeInit(this, hash(), context, callMeta, fs);
         if (!fs.isEmpty()) {
             logger.debug("Facets to add in HYKArtifact.initialize .");
-            facets.put(getCurrentStateId(), fs);
+            addFacets(getCurrentStateId(), fs);
         }
         else {
             logger.debug("No facets to add in HYKArtifact.initialize ("
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/MainValuesArtifact.java	Wed Nov 14 11:11:04 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/MainValuesArtifact.java	Wed Nov 14 11:15:57 2012 +0100
@@ -97,7 +97,7 @@
         state = new StaticState(STATIC_STATE_NAME);
 
         List<Facet> fs = new ArrayList<Facet>();
-        facets.put(state.getID(), fs);
+        addFacets(state.getID(), fs);
         spawnState();
         super.setup(identifier, factory, context, callMeta, data);
         String restriction = getDatacageIDValue(data);
@@ -156,7 +156,7 @@
      */
     protected State spawnState() {
         state = new StaticState(STATIC_STATE_NAME);
-        List<Facet> fs = (List<Facet>) facets.get(STATIC_STATE_NAME);
+        List<Facet> fs = (List<Facet>) getFacets(STATIC_STATE_NAME);
 
         DefaultOutput mainValuesOutput = new DefaultOutput(
             "computed_discharge_curve",
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/ManualPointsArtifact.java	Wed Nov 14 11:11:04 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/ManualPointsArtifact.java	Wed Nov 14 11:15:57 2012 +0100
@@ -95,7 +95,7 @@
         state.computeInit(this, hash(), context, meta, fs);
         if (!fs.isEmpty()) {
             logger.debug("Facets to add in ManualPointsArtifact.initialize .");
-            facets.put(getCurrentStateId(), fs);
+            addFacets(getCurrentStateId(), fs);
         }
         else {
             logger.debug("No facets to add in ManualPointsArtifact.initialize ("
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/MapArtifact.java	Wed Nov 14 11:11:04 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/MapArtifact.java	Wed Nov 14 11:15:57 2012 +0100
@@ -94,7 +94,7 @@
                 continue;
             }
 
-            List<Facet> fs = facets.get(stateId);
+            List<Facet> fs = getFacets(stateId);
 
             if (fs == null || fs.isEmpty()) {
                 logger.debug("No facets for previous state found.");
@@ -116,7 +116,7 @@
                     logger.debug(
                         "Append output modes for current state: " + cur.getID());
 
-                    List<Facet> fs = facets.get(cur.getID());
+                    List<Facet> fs = getFacets(cur.getID());
 
                     if (fs != null && fs.size() > 0) {
                         List<Output> generated = generateOutputs(list, fs);
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/QSectorArtifact.java	Wed Nov 14 11:11:04 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/QSectorArtifact.java	Wed Nov 14 11:15:57 2012 +0100
@@ -120,7 +120,7 @@
         state.computeInit(this, hash(), context, meta, fs);
         if (!fs.isEmpty()) {
             logger.debug("Facets to add in QSectorArtifact.initialize .");
-            facets.put(getCurrentStateId(), fs);
+            addFacets(getCurrentStateId(), fs);
         }
         else {
             logger.debug("No facets to add in QSectorArtifact.initialize ("
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/RiverAxisArtifact.java	Wed Nov 14 11:11:04 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/RiverAxisArtifact.java	Wed Nov 14 11:15:57 2012 +0100
@@ -57,7 +57,7 @@
     public State getCurrentState(Object cc) {
         State s = new RiverAxisState(this);
 
-        List<Facet> fs = facets.get(getCurrentStateId());
+        List<Facet> fs = getFacets(getCurrentStateId());
 
         DefaultOutput o = new DefaultOutput(
             "floodmap",
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/StaticFLYSArtifact.java	Wed Nov 14 11:11:04 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/StaticFLYSArtifact.java	Wed Nov 14 11:15:57 2012 +0100
@@ -109,7 +109,7 @@
         List<Output> list = state.getOutputs();
 
         if (list != null && list.size() > 0) {
-            List<Facet> fs = facets.get(state.getID());
+            List<Facet> fs = getFacets(state.getID());
             if (fs != null && fs.size() > 0) {
                 List<Output> generated = generateOutputs(list, fs);
 
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/StaticWKmsArtifact.java	Wed Nov 14 11:11:04 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/StaticWKmsArtifact.java	Wed Nov 14 11:15:57 2012 +0100
@@ -156,7 +156,7 @@
                 fs.add(wKmsFacet);
                 fs.add(csFacet);
                 fs.add(rpFacet);
-                facets.put(state.getID(), fs);
+                addFacets(state.getID(), fs);
             }
         }
 
@@ -171,7 +171,7 @@
      */
     protected State spawnState() {
         state = new StaticState(STATIC_STATE_NAME);
-        List<Facet> fs = facets.get(STATIC_STATE_NAME);
+        List<Facet> fs = getFacets(STATIC_STATE_NAME);
         DefaultOutput output = new DefaultOutput(
             "general",
             "general", "image/png",
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/StaticWQKmsArtifact.java	Wed Nov 14 11:11:04 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/StaticWQKmsArtifact.java	Wed Nov 14 11:15:57 2012 +0100
@@ -117,7 +117,7 @@
         state.computeInit(this, hash(), context, meta, fs);
         if (!fs.isEmpty()) {
             logger.debug("Facets to add in StaticWQKmsArtifact.initialize .");
-            facets.put(getCurrentStateId(), fs);
+            addFacets(getCurrentStateId(), fs);
         }
         else {
             logger.debug("No facets to add in StaticWQKmsArtifact.initialize ("
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSBackgroundArtifact.java	Wed Nov 14 11:11:04 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSBackgroundArtifact.java	Wed Nov 14 11:15:57 2012 +0100
@@ -41,7 +41,7 @@
         state.computeInit(this, hash(), context, meta, fs);
 
         if (!fs.isEmpty()) {
-            facets.put(getCurrentStateId(), fs);
+            addFacets(getCurrentStateId(), fs);
         }
     }
 }
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSBuildingsArtifact.java	Wed Nov 14 11:11:04 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSBuildingsArtifact.java	Wed Nov 14 11:15:57 2012 +0100
@@ -57,7 +57,7 @@
     public State getCurrentState(Object cc) {
         State s = new BuildingsState(this);
 
-        List<Facet> fs = facets.get(getCurrentStateId());
+        List<Facet> fs = getFacets(getCurrentStateId());
 
         DefaultOutput o = new DefaultOutput(
             "floodmap",
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSCatchmentArtifact.java	Wed Nov 14 11:11:04 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSCatchmentArtifact.java	Wed Nov 14 11:15:57 2012 +0100
@@ -57,7 +57,7 @@
     public State getCurrentState(Object cc) {
         State s = new CatchmentState(this);
 
-        List<Facet> fs = facets.get(getCurrentStateId());
+        List<Facet> fs = getFacets(getCurrentStateId());
 
         DefaultOutput o = new DefaultOutput(
             "floodmap",
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSDBArtifact.java	Wed Nov 14 11:11:04 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSDBArtifact.java	Wed Nov 14 11:15:57 2012 +0100
@@ -74,7 +74,7 @@
         state.computeInit(this, hash(), context, callMeta, fs);
 
         if (!fs.isEmpty()) {
-            facets.put(getCurrentStateId(), fs);
+            addFacets(getCurrentStateId(), fs);
         }
     }
 
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSFixpointsArtifact.java	Wed Nov 14 11:11:04 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSFixpointsArtifact.java	Wed Nov 14 11:15:57 2012 +0100
@@ -57,7 +57,7 @@
     public State getCurrentState(Object cc) {
         State s = new FixpointsState(this);
 
-        List<Facet> fs = facets.get(getCurrentStateId());
+        List<Facet> fs = getFacets(getCurrentStateId());
 
         DefaultOutput o = new DefaultOutput(
             "floodmap",
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSFloodmapsArtifact.java	Wed Nov 14 11:11:04 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSFloodmapsArtifact.java	Wed Nov 14 11:15:57 2012 +0100
@@ -57,7 +57,7 @@
     public State getCurrentState(Object cc) {
         State s = new FloodmapsState(this);
 
-        List<Facet> fs = facets.get(getCurrentStateId());
+        List<Facet> fs = getFacets(getCurrentStateId());
 
         DefaultOutput o = new DefaultOutput(
             "floodmap",
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSFloodplainArtifact.java	Wed Nov 14 11:11:04 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSFloodplainArtifact.java	Wed Nov 14 11:15:57 2012 +0100
@@ -57,7 +57,7 @@
     public State getCurrentState(Object cc) {
         State s = new FloodplainState(this);
 
-        List<Facet> fs = facets.get(getCurrentStateId());
+        List<Facet> fs = getFacets(getCurrentStateId());
 
         DefaultOutput o = new DefaultOutput(
             "floodmap",
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSGaugeLocationArtifact.java	Wed Nov 14 11:11:04 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSGaugeLocationArtifact.java	Wed Nov 14 11:15:57 2012 +0100
@@ -59,7 +59,7 @@
     public State getCurrentState(Object cc) {
         State s = new WMSGaugeLocationState(this);
 
-        List<Facet> fs = facets.get(getCurrentStateId());
+        List<Facet> fs = getFacets(getCurrentStateId());
 
         DefaultOutput o = new DefaultOutput(
             "floodmap",
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSHwsArtifact.java	Wed Nov 14 11:11:04 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSHwsArtifact.java	Wed Nov 14 11:15:57 2012 +0100
@@ -57,7 +57,7 @@
     public State getCurrentState(Object cc) {
         State s = new HwsState(this);
 
-        List<Facet> fs = facets.get(getCurrentStateId());
+        List<Facet> fs = getFacets(getCurrentStateId());
 
         DefaultOutput o = new DefaultOutput(
             "floodmap",
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSHydrBoundaryArtifact.java	Wed Nov 14 11:11:04 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSHydrBoundaryArtifact.java	Wed Nov 14 11:15:57 2012 +0100
@@ -57,7 +57,7 @@
     public State getCurrentState(Object cc) {
         State s = new HydrBoundaryState(this);
 
-        List<Facet> fs = facets.get(getCurrentStateId());
+        List<Facet> fs = getFacets(getCurrentStateId());
 
         DefaultOutput o = new DefaultOutput(
             "floodmap",
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSHydrBoundaryPolyArtifact.java	Wed Nov 14 11:11:04 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSHydrBoundaryPolyArtifact.java	Wed Nov 14 11:15:57 2012 +0100
@@ -57,7 +57,7 @@
     public State getCurrentState(Object cc) {
         State s = new HydrBoundaryPolyState(this);
 
-        List<Facet> fs = facets.get(getCurrentStateId());
+        List<Facet> fs = getFacets(getCurrentStateId());
 
         DefaultOutput o = new DefaultOutput(
             "floodmap",
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSKmArtifact.java	Wed Nov 14 11:11:04 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSKmArtifact.java	Wed Nov 14 11:15:57 2012 +0100
@@ -58,7 +58,7 @@
     public State getCurrentState(Object cc) {
         State s = new WMSKmState(this);
 
-        List<Facet> fs = facets.get(getCurrentStateId());
+        List<Facet> fs = getFacets(getCurrentStateId());
 
         DefaultOutput o = new DefaultOutput(
             "floodmap",
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSLineArtifact.java	Wed Nov 14 11:11:04 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSLineArtifact.java	Wed Nov 14 11:15:57 2012 +0100
@@ -57,7 +57,7 @@
     public State getCurrentState(Object cc) {
         State s = new LineState(this);
 
-        List<Facet> fs = facets.get(getCurrentStateId());
+        List<Facet> fs = getFacets(getCurrentStateId());
 
         DefaultOutput o = new DefaultOutput(
             "floodmap",
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSQPSArtifact.java	Wed Nov 14 11:11:04 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSQPSArtifact.java	Wed Nov 14 11:15:57 2012 +0100
@@ -57,7 +57,7 @@
     public State getCurrentState(Object cc) {
         State s = new WMSQPSState(this);
 
-        List<Facet> fs = facets.get(getCurrentStateId());
+        List<Facet> fs = getFacets(getCurrentStateId());
 
         DefaultOutput o = new DefaultOutput(
             "floodmap",
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WQKmsInterpolArtifact.java	Wed Nov 14 11:11:04 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WQKmsInterpolArtifact.java	Wed Nov 14 11:15:57 2012 +0100
@@ -133,7 +133,7 @@
                         wkmsName,
                         wkmsName));
                 fs.add(wQFacet);
-                facets.put(state.getID(), fs);
+                addFacets(state.getID(), fs);
             }
         }
         else {
@@ -151,7 +151,7 @@
      */
     protected State spawnState() {
         state = new StaticState(STATIC_STATE_NAME);
-        List<Facet> fs = facets.get(STATIC_STATE_NAME);
+        List<Facet> fs = getFacets(STATIC_STATE_NAME);
         DefaultOutput output = new DefaultOutput(
             "general",
             "general",
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WaterlevelArtifact.java	Wed Nov 14 11:11:04 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WaterlevelArtifact.java	Wed Nov 14 11:15:57 2012 +0100
@@ -96,7 +96,7 @@
         state.computeInit(this, hash(), context, meta, fs);
         if (!fs.isEmpty()) {
             logger.debug("Facets to add in WaterlevelArtifact.initialize .");
-            facets.put(getCurrentStateId(), fs);
+            addFacets(getCurrentStateId(), fs);
         }
         else {
             logger.debug("No facets to add in WaterlevelArtifact.initialize ("

http://dive4elements.wald.intevation.org