Package org.amplafi.flow

Examples of org.amplafi.flow.FlowValidationResult


        ReportAllValidationResult result2 = new ReportAllValidationResult().addTracking(true, "activityKey", "key", "val");
        assertTrue(result2.isValid());
    }

    public void testOneError() {
        FlowValidationResult result =
                new ReportAllValidationResult().addTracking(false, "activityKey", "key", "val").addTracking(false, "activityKey", "key2");
        assertFalse(result.isValid());
    }
View Full Code Here


        assertFalse(result.isValid());
        assertEquals(result.getTrackings().size(), 4);
    }

    public void testMerge() {
        FlowValidationResult result = new ReportAllValidationResult(
            new MissingRequiredTracking("firstname"));

        FlowValidationResult result1 = new ReportAllValidationResult();
        result1.merge(result);
        assertFalse(result1.isValid());

    }
View Full Code Here

                getPage().getRequestCycle().activate(page);
            } else {
                updateComponents(findComponentsToUpdate(getUpdateComponents()));
            }
        } catch (FlowValidationException flowValidationException) {
            FlowValidationResult result = flowValidationException.getFlowValidationResult();
            getFlowResultHandler().handleFlowResult(result, this);
        }
    }
View Full Code Here

    /**
     * @see org.amplafi.flow.FlowActivity#activate(FlowStepDirection)
     */
    public boolean activate(FlowStepDirection flowStepDirection) {
        // Check for missing required parameters
        FlowValidationResult activationValidationResult = getFlowValidationResult(FlowActivityPhase.activate, flowStepDirection);
        FlowValidationException.valid(activationValidationResult);

        if ( flowStepDirection == FlowStepDirection.backward) {
            // skip back only through invisible steps.
            return isInvisible();
        } else if (!isInvisible() ) {
            // auto complete only happens when advancing (otherwise can never get back to such FAs)
            // additional work needed here -- FSAUTO_COMPLETE should be consumed.
            boolean autoComplete = isTrue(FSAUTO_COMPLETE);
            if (autoComplete) {
                FlowValidationResult flowValidationResult = getFlowValidationResult(FlowActivityPhase.advance, flowStepDirection);
                return flowValidationResult.isValid();
            }
            return false;
        } else {
            return true;
        }
View Full Code Here

        if (verifyValues) {
            // HACK that needs to be fixed. -- we only need to verify when we go back because:
            // 1)if the user is on a previous step and a later step has a validation problem we need to advance the flow
            // to that step.
            // 2) if we have a step that does an immediate save operation.
            FlowValidationResult validationResult = flowStepDirection == FlowStepDirection.backward?
                getFlowValidationResult(FlowActivityPhase.advance, flowStepDirection):
                    getFlowValidationResult();
            return validationResult;
        }
        return new ReportAllValidationResult();
View Full Code Here

TOP

Related Classes of org.amplafi.flow.FlowValidationResult

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.