Package fr.soleil.bossanova.model

Examples of fr.soleil.bossanova.model.Step


            setChangedAndNotify();
        }
    }

    public void modifyCommentForStepAt(int stepIndex, String comment) {
        Step step = getBatch().getStep(stepIndex);

        if (step != null) {
            step.setComment(comment);
        }
    }
View Full Code Here


            step.setComment(comment);
        }
    }

    public void modifyEnableForStepAt(int stepIndex, boolean enable) {
        Step step = getBatch().getStep(stepIndex);

        if (step != null) {
            step.setEnable(enable);
        }
    }
View Full Code Here

  @Override
  public void run() {
    // Can't use iterator in loop because it may cause
    // ConcurrentModificationException
    final List<Step> list = batch.getSteps();
    Step step = null;
    StepBlock currentBlock = null;

    for (int i = 0; i < list.size(); i++) {
      step = list.get(i);
      try {
        // if stop is requested : we stop execution of batch
        if (!isStopRequested()) {
          if (step.getBlockId() == 0) {
            executeStep(i, step);
          } else {
            if (currentBlock == null) {
              currentBlock = new StepBlock(step.getBlockIterationCount());
            }
            currentBlock.addStep(step);

            if ((i == list.size() - 1) || (step.getBlockId() != list.get(i + 1).getBlockId())) {
              executeBlock(i, currentBlock);
              currentBlock = null;
            }
          }
        }
View Full Code Here

     * @param enable
     */
    public void modifyEnableForAllStep(boolean enable) {
        for (int i = 0; i
                < getBatch().size(); i++) {
            Step step = getBatch().getStep(i);
            step.setEnable(enable);
        }
        setChangedAndNotify();
    }
View Full Code Here

  private void executeBlock(final int blockIndex, final StepBlock block) throws Exception {
    final int iterationCount = block.getIterationCount();
    int iterationInd, stepInd;
    final List<Step> list = block.getSteps();
    Step step = null;

    for (iterationInd = 0; iterationInd < iterationCount; iterationInd++) {
      for (stepInd = 0; stepInd < list.size(); stepInd++) {
        step = list.get(stepInd);
        try {
View Full Code Here

    setChangedAndNotify();
  }

  @Override
  public boolean addEmptyStep(final String comment) {
    final Step step = new Step(StepType.ACTOR, "");
    step.setComment(comment);
    return addStep(step, false);
  }
View Full Code Here

    return true;
  }

  @Override
  public boolean addSequenceStep(final String stepName) {
    final Step step = new Step(StepType.SEQUENCE, stepName);
    return addStep(step, true);
  }
View Full Code Here

    return addActorStep(stepName, null, null);
  }

  @Override
  public boolean addActorStep(final String stepName, final String comment, final Map<String, String> parameters) {
    final Step step = new Step(StepType.ACTOR, stepName);
    step.setParameters(parameters);
    step.setComment(comment);
    return addStep(step, true);
  }
View Full Code Here

  }

  public void insertStepsAt(final List<Step> steps, final int index) {
    if (batch != null) {
      for (int i = 0; i < steps.size(); i++) {
        final Step step = steps.get(i);
        batch.insertStepAt(step, index + i);
      }
    }
    setCurrentBatchSaved(false);
    setChangedAndNotify();
View Full Code Here

    setChangedAndNotify();
  }

  public void moveStepUp(final int stepIndex) {
    if (stepIndex > 0 && stepIndex < batch.size()) {
      final Step stepToMove = batch.getStep(stepIndex);
      if (stepToMove != null) {
        batch.removeStepAt(stepIndex);
        batch.insertStepAt(stepToMove, stepIndex - 1);
        setCurrentBatchSaved(false);
        setChangedAndNotify();
View Full Code Here

TOP

Related Classes of fr.soleil.bossanova.model.Step

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.