Package org.springframework.webflow.engine.support

Examples of org.springframework.webflow.engine.support.DefaultTargetStateResolver


    factoryBean.setFlowDefinitionLocator(new FlowDefinitionLocator() {
      public FlowDefinition getFlowDefinition(String id) throws NoSuchFlowDefinitionException,
          FlowDefinitionConstructionException {
        Flow flow = new Flow(id);
        ViewState view = new ViewState(flow, "view", new StubViewFactory());
        view.getTransitionSet().add(new Transition(new DefaultTargetStateResolver("end")));
        new EndState(flow, "end");
        return flow;
      }
    });
    Set attributes = new HashSet();
View Full Code Here


        final Flow flow = new Flow(id);
        final ActionState state1 = new ActionState(flow, "state1-action");
        final ViewState state2 = new ViewState(flow, "state2-view", new MockViewFactory("view"));
        new EndState(flow, "state3-end");
        state1.getActionList().add(new MockAction("state1-result"));
        state1.getTransitionSet().add(new Transition(new DefaultTargetStateResolver("state2-view")));
        state2.getTransitionSet().add(new Transition(new DefaultTargetStateResolver("state3-end")));
        return flow;
    }
View Full Code Here

        final ActionState state1 = new ActionState(parent, "state1-action");
        final SubflowState state2 = new SubflowState(parent, "state2-subflow", new StaticExpression(child));
        final ViewState state3 = new ViewState(parent, "state3-view", new MockViewFactory("parentview"));
        new EndState(parent, "state4-end");
        state1.getActionList().add(new MockAction("state1-result"));
        state1.getTransitionSet().add(new Transition(new DefaultTargetStateResolver("state2-subflow")));
        state2.getTransitionSet().add(new Transition(new DefaultTargetStateResolver("state3-view")));
        state3.getTransitionSet().add(new Transition(new DefaultTargetStateResolver("state4-end")));
        return parent;
    }
View Full Code Here

  protected TransitionCriteria on(String event) {
    return new MockTransitionCriteria(event);
  }

  protected TargetStateResolver to(String stateId) {
    return new DefaultTargetStateResolver(stateId);
  }
View Full Code Here

  protected TransitionCriteria on(String event) {
    return new MockTransitionCriteria(event);
  }

  protected TargetStateResolver to(String stateId) {
    return new DefaultTargetStateResolver(stateId);
  }
View Full Code Here

  }

  public void testTransitionExecutingNoSecurity() {
    SecurityFlowExecutionListener listener = new SecurityFlowExecutionListener();
    RequestContext context = new MockRequestContext();
    Transition transition = new Transition(new DefaultTargetStateResolver("target"));
    listener.transitionExecuting(context, transition);
  }
View Full Code Here

  }

  public void testTransitionExecutingWithSecurity() {
    SecurityFlowExecutionListener listener = new SecurityFlowExecutionListener();
    RequestContext context = new MockRequestContext();
    Transition transition = new Transition(new DefaultTargetStateResolver("target"));
    SecurityRule rule = getSecurityRuleAnyAuthorized();
    transition.getAttributes().put(SecurityRule.SECURITY_ATTRIBUTE_NAME, rule);
    configureSecurityContext();
    listener.transitionExecuting(context, transition);
  }
View Full Code Here

    }
  }

  protected TargetStateResolver to(String stateId) {
    return new DefaultTargetStateResolver(stateId);
  }
View Full Code Here

  public TransitionCriteria on(String eventId) {
    return new MockTransitionCriteria(eventId);
  }

  protected TargetStateResolver to(String stateId) {
    return new DefaultTargetStateResolver(stateId);
  }
View Full Code Here

    ViewState state = new ViewState(flow, "view", new StubViewFactory()) {
      public void resume(RequestControlContext context) {
        context.execute(getRequiredTransition(context));
      }
    };
    state.getTransitionSet().add(new Transition(new DefaultTargetStateResolver("finish")));
    new EndState(flow, "finish");
    MockFlowExecutionListener mockListener = new MockFlowExecutionListener();
    FlowExecutionListener[] listeners = new FlowExecutionListener[] { mockListener };
    FlowExecutionImpl execution = new FlowExecutionImpl(flow);
    execution.setListeners(listeners);
View Full Code Here

TOP

Related Classes of org.springframework.webflow.engine.support.DefaultTargetStateResolver

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.