Package fr.soleil.bossanova.model

Examples of fr.soleil.bossanova.model.Step


        }
    }

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


            }
        }
    }

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

        if (step != null) {
            if (step.isBlockDelimiter()) {
                step.setBlockIterationCount(iterationCount);
            } else {
                step.setIterationCount(iterationCount);
            }
            setCurrentBatchSaved(false);
            setChangedAndNotify();
        }
    }
View Full Code Here

        }
    }

    public void modifyTypeAndNameForStepAt(final int stepIndex, final String name,
            final StepType stepType) {
        final Step step = getBatch().getStep(stepIndex);

        System.out.println("debug=> stepIndex = " + stepIndex);
        if (step != null) {
            if (stepType == null) {
                step.setOnFault(true);
                JOptionPane
                        .showMessageDialog(
                                BossaNovaData.getSingleton().getApplication()
                                        .getDialogHookComponent(),
                                "Error in Step configuration - unknown Step type or data "
                                        + step.getName());
            } else {

                // we apply changes only if it's a real changes. for example if the current step is
                // a Traccer and user click on combobox step to select a Tracer (same actor) then
                // there are nothing to change. But if he select an AttributeReader it's a real
                // change and we apply it.
                //
                // cf bug 0018737
                if ((!step.getName().equals(name)) || (step.getType() != stepType)) {
                    step.setOnFault(false);
                    step.setFlow(null);
                    step.setName(name);
                    step.setType(stepType);

                    // TODO REFACTOR that's weird
                    BossaNovaData.getSingleton().getApplication().getMainScreen().changeStep();
                    setCurrentBatchSaved(false);
                    setChangedAndNotify();
View Full Code Here

            }
        }
    }

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

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

            step.setComment(comment);
        }
    }

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

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

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

        setChangedAndNotify();
    }

    public void checkBatchSteps() {
        for (int i = 0; i < getBatch().size(); i++) {
            final Step step = getBatch().getStep(i);
            if (StepType.SEQUENCE.equals(step.getType())) {
                final File f = RepositoryManager.getSequenceRepository().getSequenceForName(
                        step.getName());
                if (f == null) {
                    step.setOnFault(true);
                    setChangedAndNotify();
                }
            }
        }
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

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.