Package fr.soleil.bossanova.model

Examples of fr.soleil.bossanova.model.Step


    BatchViewer viewer = getBatchViewerPanel();
    if (viewer != null) {

      int selectedIndex = viewer.getSelectedRowIndex();
      if (selectedIndex >= 0) {
        Step currentStep = sequencer.getBatch().getStep(selectedIndex);
        BossaNovaData.getSingleton().getApplication().setSelectedStep(currentStep, false);

        // if a batch is running and the selected step were already
        // executed
        // we disable the parameters panels
View Full Code Here


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

        // DBA.
        // we need to enable the action button before executing the stp
        // otherthise the stop button doesn't be enabled
        StateMachine.getInstance().transitionTo(modelExecutor.getSuccessState()); // need
        // to
        // be
        // validating

        for (int i = 0; i < list.size(); i++) {
            step = list.get(i);
            try {
                // if stop is requested : we stop execution of batch
                if (!isStopRequested()) {
                    executeStep(step);
                } else {
                    try {
                        step.getFlow().setDirector(null);
                    } catch (Exception e) {
                        e.printStackTrace();
                    }
                    // when stop batch execution is requested we reset the
                    // running index and boolean stopRequested
View Full Code Here

        setChangedAndNotify();
    }

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

        return true;
    }

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

    }

    @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);
    }
View Full Code Here

    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);
            }
        }
        setChangedAndNotify();
    }
View Full Code Here

        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);
                setChangedAndNotify();
            }
View Full Code Here

        }
    }

    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);
                setChangedAndNotify();
            }
View Full Code Here

            }
        }
    }

    public void modifyIterationCountForStepAt(int stepIndex, int iterationCount) {
        Step step = getBatch().getStep(stepIndex);

        if (step != null) {
            step.setIterationCount(iterationCount);
            setChangedAndNotify();
        }
    }
View Full Code Here

        }
    }

    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
            application.getMainScreen().changeStep();
            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.