public boolean test(RequestContext context) { for (TransitionCriteria criteria : criteriaChain) { if (!criteria.test(context)) { return false; } } return true; }
/** * Checks if this transition is eligible for execution given the state of the provided flow execution request * context. * @param context the flow execution request context * @return true if this transition should execute, false otherwise */ public boolean matches(RequestContext context) { return matchingCriteria.test(context); }
/** * Checks if this transition can complete its execution or should be rolled back, given the state of the flow * execution request context. * @param context the flow execution request context * @return true if this transition can complete execution, false if it should roll back */ public boolean canExecute(RequestContext context) { if (executionCriteria != null) { return executionCriteria.test(context); } else { return false; } }
public boolean test(RequestContext context) { return !criteria.test(context); }
/** * Checks if this transition is eligible for execution given the state of the provided flow execution request * context. * @param context the flow execution request context * @return true if this transition should execute, false otherwise */ public boolean matches(RequestContext context) { return matchingCriteria.test(context); }
public boolean test(RequestContext context) { for (TransitionCriteria criteria : criteriaChain) { if (!criteria.test(context)) { return false; } } return true; }
/** * Checks if this transition can complete its execution or should be rolled back, given the state of the flow * execution request context. * @param context the flow execution request context * @return true if this transition can complete execution, false if it should roll back */ public boolean canExecute(RequestContext context) { return executionCriteria.test(context); }
/** * Checks if this transition is elligible for execution given the state of the provided flow execution request * context. * @param context the flow execution request context * @return true if this transition should execute, false otherwise */ public boolean matches(RequestContext context) { return matchingCriteria.test(context); }
/** * Checks if this transition is eligible for execution given the state of the provided flow execution request * context. * @param context the flow execution request context * @return true if this transition should execute, false otherwise */ public boolean matches(RequestContext context) { return matchingCriteria.test(context); }
/** * Checks if this transition can complete its execution or should be rolled back, given the state of the flow * execution request context. * @param context the flow execution request context * @return true if this transition can complete execution, false if it should roll back */ public boolean canExecute(RequestContext context) { if (executionCriteria != null) { return executionCriteria.test(context); } else { return false; } }
/** * Checks if this transition can complete its execution or should be rolled back, given the state of the flow * execution request context. * @param context the flow execution request context * @return true if this transition can complete execution, false if it should roll back */ public boolean canExecute(RequestContext context) { if (executionCriteria != null) { return executionCriteria.test(context); } else { return false; } }
public boolean test(RequestContext context) { return !criteria.test(context); }
public boolean test(RequestContext context) { return !criteria.test(context); }
public boolean test(RequestContext context) { return !criteria.test(context); }
public boolean test(RequestContext context) { Iterator it = criteriaChain.iterator(); while (it.hasNext()) { TransitionCriteria criteria = (TransitionCriteria) it.next(); if (!criteria.test(context)) { return false; } } return true; }
public boolean test(RequestContext context) { Iterator it = criteriaChain.iterator(); while (it.hasNext()) { TransitionCriteria criteria = (TransitionCriteria) it.next(); if (!criteria.test(context)) { return false; } } return true; }
public void testCriteriaChainForNoActions() { TransitionCriteria actionChain = TransitionCriteriaChain.criteriaChainFor((Action[]) null); assertTrue(actionChain.test(context)); }
public void testStaticEventId() throws Exception { String expression = "sample"; TransitionCriteria criterion = (TransitionCriteria) converter.convertSourceToTargetClass(expression, TransitionCriteria.class); RequestContext ctx = getRequestContext(); assertTrue("Criterion should evaluate to true", criterion.test(ctx)); }
public void testTrueEvaluation() throws Exception { String expression = "#{flowScope.foo == 'bar'}"; TransitionCriteria criterion = (TransitionCriteria) converter.convertSourceToTargetClass(expression, TransitionCriteria.class); RequestContext ctx = getRequestContext(); assertTrue("Criterion should evaluate to true", criterion.test(ctx)); }
public void testFalseEvaluation() throws Exception { String expression = "#{flowScope.foo != 'bar'}"; TransitionCriteria criterion = (TransitionCriteria) converter.convertSourceToTargetClass(expression, TransitionCriteria.class); RequestContext ctx = getRequestContext(); assertFalse("Criterion should evaluate to false", criterion.test(ctx)); }