1 package org
.argeo
.slc
.execution
;
5 import org
.argeo
.slc
.process
.SlcExecution
;
6 import org
.eclipse
.osgi
.framework
.console
.CommandInterpreter
;
7 import org
.eclipse
.osgi
.framework
.console
.CommandProvider
;
9 public class ExecutionCommandProvider
implements CommandProvider
{
10 private List
<ExecutionModule
> executionModules
;
12 public Object
_slc_execute(CommandInterpreter ci
) {
13 String moduleName
= ci
.nextArgument();
14 String executionName
= ci
.nextArgument();
16 SlcExecution slcExecution
= new SlcExecution();
17 slcExecution
.getAttributes().put("slc.flows", executionName
);
19 ExecutionModule module
= null;
20 for (ExecutionModule moduleT
: executionModules
) {
21 if(moduleT
.getName().equals(moduleName
)){
22 // TODO: check version
29 module
.execute(slcExecution
);
34 public String
getHelp() {
35 StringBuffer buf
= new StringBuffer();
36 buf
.append("---SLC Execution Commands---\n");
37 buf
.append("\tslc_execute - Execute an execution flow\n");
38 return buf
.toString();
42 public void setExecutionModules(List
<ExecutionModule
> executionModules
) {
43 this.executionModules
= executionModules
;