Package org.springframework.webflow.engine.model.builder

Examples of org.springframework.webflow.engine.model.builder.DefaultFlowModelHolder


    hibernateTemplate.setCheckWriteOperations(false);
    HibernateTransactionManager tm = new HibernateTransactionManager(sessionFactory);
    hibernateListener = new HibernateFlowExecutionListener(sessionFactory, tm);

    ClassPathResource res = new ClassPathResource("flow-managed-persistence.xml", getClass());
    DefaultFlowModelHolder holder = new DefaultFlowModelHolder(new XmlFlowModelBuilder(res));
    FlowModelFlowBuilder builder = new FlowModelFlowBuilder(holder);
    MockFlowBuilderContext context = new MockFlowBuilderContext("foo");
    FlowAssembler assembler = new FlowAssembler(builder, context);
    Flow flow = assembler.assembleFlow();
    context.registerSubflow(flow);
View Full Code Here


    entityManagerFactory = getEntityManagerFactory(dataSource);
    JpaTransactionManager tm = new JpaTransactionManager(entityManagerFactory);
    jpaListener = new JpaFlowExecutionListener(entityManagerFactory, tm);

    ClassPathResource res = new ClassPathResource("flow-managed-persistence.xml", getClass());
    DefaultFlowModelHolder holder = new DefaultFlowModelHolder(new XmlFlowModelBuilder(res));
    FlowModelFlowBuilder builder = new FlowModelFlowBuilder(holder);
    MockFlowBuilderContext context = new MockFlowBuilderContext("foo");
    FlowAssembler assembler = new FlowAssembler(builder, context);
    Flow flow = assembler.assembleFlow();
    context.registerSubflow(flow);
View Full Code Here

  private DefaultFlowModelHolder holder;
  private FlowModelBuilder builder;

  protected void setUp() {
    builder = new SimpleFlowBuilder();
    holder = new DefaultFlowModelHolder(builder);
  }
View Full Code Here

    FlowAssembler assembler = new FlowAssembler(builder, new MockFlowBuilderContext("flow"));
    return assembler.assembleFlow();
  }

  private Flow getFlow(ClassPathResource resource) {
    FlowModelHolder holder = new DefaultFlowModelHolder(new XmlFlowModelBuilder(resource,
        new FlowModelRegistryImpl()));
    FlowModelFlowBuilder builder = new FlowModelFlowBuilder(holder);
    FlowAssembler assembler = new FlowAssembler(builder, new MockFlowBuilderContext("flow"));
    return assembler.assembleFlow();
  }
View Full Code Here

  public void testMerge() {
    ClassPathResource resourceChild = new ClassPathResource("flow-inheritance-child.xml", getClass());
    ClassPathResource resourceParent = new ClassPathResource("flow-inheritance-parent.xml", getClass());
    registry.registerFlowModel("child",
        new DefaultFlowModelHolder(new XmlFlowModelBuilder(resourceChild, registry)));
    registry.registerFlowModel("parent", new DefaultFlowModelHolder(new XmlFlowModelBuilder(resourceParent,
        registry)));
    FlowModel flow = registry.getFlowModel("child");
    assertEquals(1, flow.getGlobalTransitions().size());
    assertEquals(2, flow.getStates().size());
    assertEquals("view", ((AbstractStateModel) flow.getStates().get(0)).getId());
View Full Code Here

  public void testMergeParentNotFound() {
    ClassPathResource resourceChild = new ClassPathResource("flow-inheritance-child.xml", getClass());
    ClassPathResource resourceParent = new ClassPathResource("flow-inheritance-parent.xml", getClass());
    registry.registerFlowModel("child",
        new DefaultFlowModelHolder(new XmlFlowModelBuilder(resourceChild, registry)));
    registry.registerFlowModel("parent-id-not-matching", new DefaultFlowModelHolder(new XmlFlowModelBuilder(
        resourceParent, registry)));
    try {
      registry.getFlowModel("child");
      fail("A FlowModelBuilderException was expected");
    } catch (FlowModelBuilderException e) {
View Full Code Here

  public void testStateMerge() {
    ClassPathResource resourceChild = new ClassPathResource("flow-inheritance-state-child.xml", getClass());
    ClassPathResource resourceParent = new ClassPathResource("flow-inheritance-state-parent.xml", getClass());
    registry.registerFlowModel("child",
        new DefaultFlowModelHolder(new XmlFlowModelBuilder(resourceChild, registry)));
    registry.registerFlowModel("parent", new DefaultFlowModelHolder(new XmlFlowModelBuilder(resourceParent,
        registry)));
    FlowModel flow = registry.getFlowModel("child");
    assertEquals(1, flow.getStates().size());
    assertEquals("otherview", ((ViewStateModel) flow.getStates().get(0)).getView());
  }
View Full Code Here

  public void testStateMergeInvalidParentSyntax() {
    ClassPathResource resourceChild = new ClassPathResource("flow-inheritance-state-invalid-parent-syntax.xml",
        getClass());
    ClassPathResource resourceParent = new ClassPathResource("flow-inheritance-state-parent.xml", getClass());
    registry.registerFlowModel("child",
        new DefaultFlowModelHolder(new XmlFlowModelBuilder(resourceChild, registry)));
    registry.registerFlowModel("parent", new DefaultFlowModelHolder(new XmlFlowModelBuilder(resourceParent,
        registry)));
    try {
      registry.getFlowModel("child");
      fail("A FlowModelConstructionException was expected");
    } catch (FlowModelBuilderException e) {
View Full Code Here

  public void testStateMergeParentFlowNotFound() {
    ClassPathResource resourceChild = new ClassPathResource("flow-inheritance-state-child.xml", getClass());
    ClassPathResource resourceParent = new ClassPathResource("flow-inheritance-state-parent.xml", getClass());
    registry.registerFlowModel("child",
        new DefaultFlowModelHolder(new XmlFlowModelBuilder(resourceChild, registry)));
    registry.registerFlowModel("parent-id-not-matching", new DefaultFlowModelHolder(new XmlFlowModelBuilder(
        resourceParent, registry)));
    try {
      registry.getFlowModel("child");
      fail("A FlowModelBuilderException was expected");
    } catch (FlowModelBuilderException e) {
View Full Code Here

  public void testStateMergeParentStateNotFound() {
    ClassPathResource resourceChild = new ClassPathResource("flow-inheritance-state-child.xml", getClass());
    ClassPathResource resourceParent = new ClassPathResource("flow-empty.xml", getClass());
    registry.registerFlowModel("child",
        new DefaultFlowModelHolder(new XmlFlowModelBuilder(resourceChild, registry)));
    registry.registerFlowModel("parent", new DefaultFlowModelHolder(new XmlFlowModelBuilder(resourceParent,
        registry)));
    try {
      registry.getFlowModel("child");
      fail("A FlowModelBuilderException was expected");
    } catch (FlowModelBuilderException e) {
View Full Code Here

TOP

Related Classes of org.springframework.webflow.engine.model.builder.DefaultFlowModelHolder

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.