X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=runtime%2Forg.argeo.slc.support.simple%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fcore%2Fexecution%2FDefaultExecutionFlow.java;h=16105e241ef0e4ea10a14270831d500bf9550a3d;hb=5ae9dc81ad1c3ddfa99a8456b0c5263dd483642d;hp=f2c26f225db5ba724df8f02d589c8bc2a63a4c41;hpb=6cf17228b46378d64c21276d3f7fe6cf966ffe39;p=gpl%2Fargeo-slc.git diff --git a/runtime/org.argeo.slc.support.simple/src/main/java/org/argeo/slc/core/execution/DefaultExecutionFlow.java b/runtime/org.argeo.slc.support.simple/src/main/java/org/argeo/slc/core/execution/DefaultExecutionFlow.java index f2c26f225..16105e241 100644 --- a/runtime/org.argeo.slc.support.simple/src/main/java/org/argeo/slc/core/execution/DefaultExecutionFlow.java +++ b/runtime/org.argeo.slc.support.simple/src/main/java/org/argeo/slc/core/execution/DefaultExecutionFlow.java @@ -10,7 +10,6 @@ import org.apache.commons.logging.LogFactory; import org.argeo.slc.SlcException; import org.argeo.slc.core.structure.tree.TreeSPath; import org.argeo.slc.core.structure.tree.TreeSRegistry; -import org.argeo.slc.execution.Executable; import org.argeo.slc.execution.ExecutionFlow; import org.argeo.slc.execution.ExecutionSpec; import org.argeo.slc.execution.ExecutionSpecAttribute; @@ -32,7 +31,7 @@ public class DefaultExecutionFlow implements ExecutionFlow, InitializingBean, private final ExecutionSpec executionSpec; private String name = null; private Map parameters = new HashMap(); - private List executables = new ArrayList(); + private List executables = new ArrayList(); private String path; private StructureRegistry registry = new TreeSRegistry(); @@ -93,15 +92,15 @@ public class DefaultExecutionFlow implements ExecutionFlow, InitializingBean, } - public void execute() { - for (Executable executable : executables) { - executable.execute(); + public void run() { + for (Runnable executable : executables) { + executable.run(); } } public void afterPropertiesSet() throws Exception { if (path != null) { - for (Executable executable : executables) { + for (Runnable executable : executables) { if (executable instanceof StructureAware) { ((StructureAware) executable).notifyCurrentPath( registry, new TreeSPath(path)); @@ -114,7 +113,7 @@ public class DefaultExecutionFlow implements ExecutionFlow, InitializingBean, this.name = name; } - public void setExecutables(List executables) { + public void setExecutables(List executables) { this.executables = executables; } @@ -144,8 +143,10 @@ public class DefaultExecutionFlow implements ExecutionFlow, InitializingBean, Object paramValue = parameters.get(parameterName); if (specAttr instanceof ResourceSpecAttribute) { // deal with resources - Resource resource = resourceLoader.getResource(paramValue.toString()); - return ((ResourceSpecAttribute) specAttr).convertResource(resource); + Resource resource = resourceLoader.getResource(paramValue + .toString()); + return ((ResourceSpecAttribute) specAttr) + .convertResource(resource); } else { return paramValue; }