- public Object _slc_execute(CommandInterpreter ci) {
- String moduleName = ci.nextArgument();
- String executionName = ci.nextArgument();
-
- SlcExecution slcExecution = new SlcExecution();
- slcExecution.getAttributes().put("slc.flows", executionName);
-
- ExecutionModule module = null;
- for (ExecutionModule moduleT : executionModules) {
- if(moduleT.getName().equals(moduleName)){
- // TODO: check version
- module = moduleT;
- break;
+ private final static String SLC_WITH_REFRESH = "slc";
+ private final static String SLC_NO_REFRESH = "slcnr";
+
+ private OsgiExecutionModulesManager modulesManager;
+
+ private RealizedFlow lastLaunch = null;
+
+ public Object _slc(CommandInterpreter ci) {
+ return exec(SLC_WITH_REFRESH, ci);
+ }
+
+ public Object _slcnr(CommandInterpreter ci) {
+ return exec(SLC_NO_REFRESH, ci);
+ }
+
+ protected Object exec(String slcCommand, CommandInterpreter ci) {
+ // TODO: check version
+ String firstArg = ci.nextArgument();
+ if (firstArg == null) {
+ if (lastLaunch != null) {
+ String cmd = slcCommand + " " + lastLaunch.getModuleName()
+ + " " + lastLaunch.getFlowDescriptor().getName();
+ if (log.isDebugEnabled())
+ log.debug("Execute again last command: " + cmd);
+ return ci.execute(cmd);
+ } else {
+ ci.execute("help");
+ throw new SlcException("Command not properly formatted");