- // Find module
- ExecutionModule module = null;
- if (moduleName != null) {
- for (Iterator<ExecutionModule> it = executionModules.iterator(); it
- .hasNext();) {
- ExecutionModule moduleT = it.next();
- if (moduleT.getName().equals(moduleName)) {
- module = moduleT;
- break;
- }
+ 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");