509510511512513514515516517518
} @Override public boolean addActorStep(String stepName, String comment, Map<String, String> parameters) { Step step = new Step(StepType.ACTOR, stepName); step.setParameters(parameters); step.setComment(comment); return addStep(step, true); }
553554555556557558559560561562563
public void insertStepsAt(List<Step> steps, int index) { if (batch != null) { for (int i = 0; i < steps.size(); i++) { Step step = steps.get(i); batch.insertStepAt(step, index + i); } } setCurrentBatchSaved( false ); setChangedAndNotify();
583584585586587588589590591592593
setChangedAndNotify(); } public void moveStepUp(int stepIndex) { if (stepIndex > 0 && stepIndex < batch.size()) { Step stepToMove = batch.getStep(stepIndex); if (stepToMove != null) { batch.removeStepAt(stepIndex); batch.insertStepAt(stepToMove, stepIndex - 1); setCurrentBatchSaved( false ); setChangedAndNotify();
595596597598599600601602603604605
} } public void moveStepdown(int stepIndex) { if (stepIndex < batch.size() - 1) { Step stepToMove = batch.getStep(stepIndex); if (stepToMove != null) { batch.removeStepAt(stepIndex); batch.insertStepAt(stepToMove, stepIndex + 1); setCurrentBatchSaved( false ); setChangedAndNotify();
606607608609610611612613614615616617618
} } } public void modifyIterationCountForStepAt(int stepIndex, int iterationCount) { Step step = getBatch().getStep(stepIndex); if (step != null) { step.setIterationCount(iterationCount); setCurrentBatchSaved( false ); setChangedAndNotify(); } }
617618619620621622623624625626627628629630631632
} } public void modifyTypeAndNameForStepAt(int stepIndex, String name, StepType stepType) { Step step = getBatch().getStep(stepIndex); if (step != null) { step.setFlow(null); step.setName(name); step.setType(stepType); // TODO REFACTOR that's weird BossaNovaData.getSingleton().getApplication().getMainScreen().changeStep(); setCurrentBatchSaved( false ); setChangedAndNotify(); }
631632633634635636637638639640641
setChangedAndNotify(); } } public void modifyCommentForStepAt(int stepIndex, String comment) { Step step = getBatch().getStep(stepIndex); if (step != null) { step.setComment(comment); } }
639640641642643644645646647648649
step.setComment(comment); } } public void modifyEnableForStepAt(int stepIndex, boolean enable) { Step step = getBatch().getStep(stepIndex); if (step != null) { step.setEnable(enable); } }
654655656657658659660661662663664
* @param enable */ public void modifyEnableForAllStep(boolean enable) { for (int i = 0; i < getBatch().size(); i++) { Step step = getBatch().getStep(i); step.setEnable(enable); } setCurrentBatchSaved( false ); setChangedAndNotify(); }
665666667668669670671672673674675676677678679680681
public void checkBatchSteps() { for (int i = 0; i < getBatch().size(); i++) { Step step = getBatch().getStep(i); if (StepType.SEQUENCE.equals(step.getType())) { File f = RepositoryManager.getSequenceRepository().getSequenceForName(step.getName()); if( f==null ) { step.setOnFault(true); setChangedAndNotify(); } } }