diff flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java @ 1050:eccf966fb677

State engine: Removed CallContext from state validation. flys-artifacts/trunk@2512 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 19 Aug 2011 14:10:18 +0000
parents 799c7108ea6d
children 61c051e53f9b
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java	Fri Aug 19 11:46:40 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java	Fri Aug 19 14:10:18 2011 +0000
@@ -471,7 +471,7 @@
         }
 
         DefaultState current = (DefaultState) getCurrentState(context);
-        current.validate(this, context);
+        current.validate(this);
     }
 
 
@@ -1121,7 +1121,7 @@
     }
 
 
-    public List<Output> getOutputs(CallContext context) {
+    public List<Output> getOutputs(Object context) {
         List<String> stateIds  = getPreviousStateIds();
         List<Output> generated = new ArrayList<Output>();
 
@@ -1140,11 +1140,11 @@
     }
 
 
-    public List<Output> getCurrentOutputs(CallContext context) {
+    public List<Output> getCurrentOutputs(Object context) {
         DefaultState cur = (DefaultState) getCurrentState(context);
 
         try {
-            if (cur.validate(this, context)) {
+            if (cur.validate(this)) {
                 return getOutputForState(cur);
             }
         }
@@ -1153,10 +1153,6 @@
         return new ArrayList<Output>();
     }
 
-    public List<Output> getCurrentOutputs(Object context) {
-        return getOutputForState((DefaultState)getCurrentState(context));
-    }
-
     protected List<Output> getOutputForState(DefaultState state) {
         List<Output> list = state.getOutputs();
         if (list == null || list.size() == 0) {

http://dive4elements.wald.intevation.org