X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=runtime%2Forg.argeo.slc.core%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fcore%2Fexecution%2FDefaultExecutionFlow.java;h=a25034e347a3e4dee381b9a2f0819102e91212f7;hb=75d76f02dc7524ebee6c1996f87222eee991f4e6;hp=497e6520e86177a7b1bf79748b1f1bb11298fb33;hpb=ee6c3543a0ff9403420ce6a9c647723269f14331;p=gpl%2Fargeo-slc.git diff --git a/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/DefaultExecutionFlow.java b/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/DefaultExecutionFlow.java index 497e6520e..a25034e34 100644 --- a/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/DefaultExecutionFlow.java +++ b/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/DefaultExecutionFlow.java @@ -15,13 +15,10 @@ import org.argeo.slc.structure.StructureAware; import org.argeo.slc.structure.StructureRegistry; import org.springframework.beans.factory.BeanNameAware; import org.springframework.beans.factory.InitializingBean; -import org.springframework.context.ResourceLoaderAware; -import org.springframework.core.io.Resource; -import org.springframework.core.io.ResourceLoader; import org.springframework.validation.MapBindingResult; public class DefaultExecutionFlow implements ExecutionFlow, InitializingBean, - BeanNameAware, StructureAware, ResourceLoaderAware { + BeanNameAware { private final ExecutionSpec executionSpec; private String name = null; @@ -31,8 +28,6 @@ public class DefaultExecutionFlow implements ExecutionFlow, InitializingBean, private String path; private StructureRegistry registry = new TreeSRegistry(); - private ResourceLoader resourceLoader = null; - public DefaultExecutionFlow() { this.executionSpec = new DefaultExecutionSpec(); } @@ -93,12 +88,18 @@ public class DefaultExecutionFlow implements ExecutionFlow, InitializingBean, } } + @SuppressWarnings(value = { "unchecked" }) public void afterPropertiesSet() throws Exception { if (path != null) { for (Runnable executable : executables) { if (executable instanceof StructureAware) { ((StructureAware) executable).notifyCurrentPath( registry, new TreeSPath(path)); + } else if (executable instanceof DefaultExecutionFlow) { + // so we don't need to have DefaultExecutionFlow + // implementing StructureAware + DefaultExecutionFlow flow = (DefaultExecutionFlow) executable; + flow.setPath(path + '/' + flow.getName()); } } } @@ -172,15 +173,4 @@ public class DefaultExecutionFlow implements ExecutionFlow, InitializingBean, this.registry = registry; } - public void notifyCurrentPath(StructureRegistry registry, - TreeSPath path) { - if (this.path == null) { - this.path = path.toString(); - } - } - - public void setResourceLoader(ResourceLoader resourceLoader) { - this.resourceLoader = resourceLoader; - } - }