Examples of EndStateModel


Examples of org.springframework.webflow.engine.model.EndStateModel

    assertEquals(1, rule.getAttributes().size());
    assertTrue(rule.getAttributes().contains("ROLE_USER"));
  }

  public void testFlowSecuredState() {
    EndStateModel end = new EndStateModel("end");
    end.setSecured(new SecuredModel("ROLE_USER"));
    model.setStates(asList(AbstractStateModel.class, end));
    Flow flow = getFlow(model);
    SecurityRule rule = (SecurityRule) flow.getState("end").getAttributes()
        .get(SecurityRule.SECURITY_ATTRIBUTE_NAME);
    assertNotNull(rule);
View Full Code Here

Examples of org.springframework.webflow.engine.model.EndStateModel

    assertEquals(1, rule.getAttributes().size());
    assertTrue(rule.getAttributes().contains("ROLE_USER"));
  }

  public void testFlowSecuredTransition() {
    model.setStates(asList(AbstractStateModel.class, new EndStateModel("end")));
    TransitionModel transition = new TransitionModel();
    transition.setTo("end");
    transition.setSecured(new SecuredModel("ROLE_USER"));
    model.setGlobalTransitions(asList(TransitionModel.class, transition));
    Flow flow = getFlow(model);
View Full Code Here

Examples of org.springframework.webflow.engine.model.EndStateModel

    assertTrue(rule.getAttributes().contains("ROLE_USER"));
  }

  public void testFlowVariable() {
    model.setVars(asList(VarModel.class, new VarModel("flow-foo", "org.springframework.webflow.TestBean")));
    model.setStates(asList(AbstractStateModel.class, new EndStateModel("end")));
    Flow flow = getFlow(model);
    assertEquals("flow-foo", flow.getVariable("flow-foo").getName());
  }
View Full Code Here

Examples of org.springframework.webflow.engine.model.EndStateModel

    }
  }

  public void testExceptionHandlers() {
    FlowModel model = new FlowModel();
    model.setStates(asList(AbstractStateModel.class, new EndStateModel("state")));
    model.setExceptionHandlers(asList(ExceptionHandlerModel.class, new ExceptionHandlerModel("exceptionHandler")));
    FlowExecutionExceptionHandler handler = new FlowExecutionExceptionHandler() {
      public boolean canHandle(FlowExecutionException exception) {
        return true;
      }
View Full Code Here

Examples of org.springframework.webflow.engine.model.EndStateModel

  public class SimpleFlowBuilder implements FlowModelBuilder {

    public FlowModel getFlowModel() throws FlowModelBuilderException {
      FlowModel flow = new FlowModel();
      flow.setStates(new LinkedList<AbstractStateModel>(Collections.singletonList(new EndStateModel("end"))));
      return flow;
    }
View Full Code Here

Examples of org.springframework.webflow.engine.model.EndStateModel

    state.setOnExitActions(parseOnExitActions(element));
    return state;
  }

  private EndStateModel parseEndState(Element element) {
    EndStateModel state = new EndStateModel(element.getAttribute("id"));
    state.setParent(element.getAttribute("parent"));
    state.setView(element.getAttribute("view"));
    state.setCommit(element.getAttribute("commit"));
    state.setOutputs(parseOutputs(element));
    state.setAttributes(parseAttributes(element));
    state.setSecured(parseSecured(element));
    state.setOnEntryActions(parseOnEntryActions(element));
    state.setExceptionHandlers(parseExceptionHandlers(element));
    return state;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.