diff artifacts/src/main/java/org/dive4elements/river/artifacts/FLYSArtifact.java @ 5866:9a6741ccf6d4

FLYS artifacts: Renamed FLYSContext(Factory) to RiverContext(Factory).
author Sascha L. Teichmann <teichmann@intevation.de>
date Sun, 28 Apr 2013 15:14:30 +0200
parents 73da40528cf2
children
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/FLYSArtifact.java	Sun Apr 28 15:09:31 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/FLYSArtifact.java	Sun Apr 28 15:14:30 2013 +0200
@@ -51,7 +51,7 @@
 import org.dive4elements.artifacts.common.utils.XMLUtils;
 import org.dive4elements.artifacts.common.utils.XMLUtils.ElementCreator;
 import org.dive4elements.river.artifacts.cache.CacheFactory;
-import org.dive4elements.river.artifacts.context.FLYSContext;
+import org.dive4elements.river.artifacts.context.RiverContext;
 import org.dive4elements.river.artifacts.model.CalculationMessage;
 import org.dive4elements.river.artifacts.states.DefaultState;
 import org.dive4elements.river.artifacts.states.DefaultState.ComputeType;
@@ -139,9 +139,9 @@
     {
         List<String> stateIds = getPreviousStateIds();
 
-        FLYSContext flysContext = RiverUtils.getFlysContext(context);
+        RiverContext flysContext = RiverUtils.getFlysContext(context);
         StateEngine engine      = (StateEngine) flysContext.get(
-            FLYSContext.STATE_ENGINE_KEY);
+            RiverContext.STATE_ENGINE_KEY);
 
         boolean debug = log.isDebugEnabled();
 
@@ -191,7 +191,7 @@
 
         super.setup(identifier, factory, context, callMeta, data);
 
-        FLYSContext flysContext = RiverUtils.getFlysContext(context);
+        RiverContext flysContext = RiverUtils.getFlysContext(context);
 
         List<State> states = getStates(context);
 
@@ -447,13 +447,13 @@
             dumpArtifact();
         }
 
-        FLYSContext flysContext = RiverUtils.getFlysContext(context);
+        RiverContext flysContext = RiverUtils.getFlysContext(context);
 
         StateEngine stateEngine = (StateEngine) flysContext.get(
-            FLYSContext.STATE_ENGINE_KEY);
+            RiverContext.STATE_ENGINE_KEY);
 
         TransitionEngine transitionEngine = (TransitionEngine) flysContext.get(
-            FLYSContext.TRANSITION_ENGINE_KEY);
+            RiverContext.TRANSITION_ENGINE_KEY);
 
         List<State> reachable = transitionEngine.getReachableStates(
             this, getCurrentState(context), stateEngine);
@@ -704,9 +704,9 @@
      * @return list of states.
      */
     protected List<State> getStates(Object context) {
-        FLYSContext flysContext = RiverUtils.getFlysContext(context);
+        RiverContext flysContext = RiverUtils.getFlysContext(context);
         StateEngine engine      = (StateEngine) flysContext.get(
-            FLYSContext.STATE_ENGINE_KEY);
+            RiverContext.STATE_ENGINE_KEY);
         return engine.getStates(getName());
     }
 
@@ -718,9 +718,9 @@
      * @return state with given ID.
      */
     protected State getState(Object context, String stateID) {
-        FLYSContext flysContext = RiverUtils.getFlysContext(context);
+        RiverContext flysContext = RiverUtils.getFlysContext(context);
         StateEngine engine      = (StateEngine) flysContext.get(
-            FLYSContext.STATE_ENGINE_KEY);
+            RiverContext.STATE_ENGINE_KEY);
         return engine.getState(stateID);
     }
 
@@ -979,9 +979,9 @@
 
         DefaultState current = (DefaultState) getCurrentState(context);
 
-        FLYSContext flysContext = RiverUtils.getFlysContext(context);
+        RiverContext flysContext = RiverUtils.getFlysContext(context);
         StateEngine engine      = (StateEngine) flysContext.get(
-            FLYSContext.STATE_ENGINE_KEY);
+            RiverContext.STATE_ENGINE_KEY);
 
         for (int i = 0; i < count; i++) {
             Element node = (Element)nodes.item(i);
@@ -1031,14 +1031,14 @@
             log.debug("Determine if the state '" + stateId + "' is reachable.");
         }
 
-        FLYSContext flysContext = RiverUtils.getFlysContext(context);
+        RiverContext flysContext = RiverUtils.getFlysContext(context);
 
         State currentState  = getCurrentState(context);
         StateEngine sEngine = (StateEngine) flysContext.get(
-            FLYSContext.STATE_ENGINE_KEY);
+            RiverContext.STATE_ENGINE_KEY);
 
         TransitionEngine tEngine = (TransitionEngine) flysContext.get(
-            FLYSContext.TRANSITION_ENGINE_KEY);
+            RiverContext.TRANSITION_ENGINE_KEY);
 
         return tEngine.isStateReachable(this, stateId, currentState, sEngine);
     }
@@ -1534,7 +1534,7 @@
      * Calls endOfLife() for each state in the list <i>ids</i>.
      *
      * @param ids The State IDs that should be destroyed.
-     * @param context The FLYSContext.
+     * @param context The RiverContext.
      */
     protected void destroyStates(List<String> ids, Object context) {
         for (int i = 0, num = ids.size(); i < num; i++) {

http://dive4elements.wald.intevation.org