Package org.springframework.webflow.definition

Examples of org.springframework.webflow.definition.FlowDefinition


public class SecurityFlowExecutionListenerTests extends TestCase {

  public void testSessionCreatingNoSecurity() {
    SecurityFlowExecutionListener listener = new SecurityFlowExecutionListener();
    RequestContext context = new MockRequestContext();
    FlowDefinition definition = new Flow("flow");
    listener.sessionCreating(context, definition);
  }
View Full Code Here


    context = new ClassPathXmlApplicationContext("org/springframework/webflow/config/flow-registry.xml");
    registry = (FlowDefinitionRegistry) context.getBean("flowRegistry");
  }

  public void testRegistryFlowLocationsPopulated() {
    FlowDefinition flow = registry.getFlowDefinition("flow");
    assertEquals("flow", flow.getId());
    assertEquals("bar", flow.getAttributes().get("foo"));
    assertEquals(new Integer(2), flow.getAttributes().get("bar"));
  }
View Full Code Here

    assertEquals("bar", flow.getAttributes().get("foo"));
    assertEquals(new Integer(2), flow.getAttributes().get("bar"));
  }

  public void testRegistryFlowLocationPatternsPopulated() {
    FlowDefinition flow1 = registry.getFlowDefinition("flow1");
    assertEquals("flow1", flow1.getId());
    FlowDefinition flow2 = registry.getFlowDefinition("flow2");
    assertEquals("flow2", flow2.getId());
  }
View Full Code Here

    FlowDefinition flow2 = registry.getFlowDefinition("flow2");
    assertEquals("flow2", flow2.getId());
  }

  public void testRegistryFlowBuildersPopulated() {
    FlowDefinition foo = registry.getFlowDefinition("foo");
    assertEquals("foo", foo.getId());
  }
View Full Code Here

    FlowDefinition foo = registry.getFlowDefinition("foo");
    assertEquals("foo", foo.getId());
  }

  public void testRegistryFlowBuildersPopulatedWithId() {
    FlowDefinition foo = registry.getFlowDefinition("foo2");
    assertEquals("foo2", foo.getId());
  }
View Full Code Here

    FlowDefinition foo = registry.getFlowDefinition("foo2");
    assertEquals("foo2", foo.getId());
  }

  public void testRegistryFlowBuildersPopulatedWithAttributes() {
    FlowDefinition foo3 = registry.getFlowDefinition("foo3");
    assertEquals("foo3", foo3.getId());
    assertEquals("bar", foo3.getAttributes().get("foo"));
    assertEquals(new Integer(2), foo3.getAttributes().get("bar"));
  }
View Full Code Here

    FlowLocation[] flowLocations = new FlowLocation[] { location1, location2 };
    factoryBean.setFlowBuilderServices(TestFlowBuilderServicesFactory.getServices());
    factoryBean.setFlowLocations(flowLocations);
    factoryBean.afterPropertiesSet();
    FlowDefinitionRegistry registry = (FlowDefinitionRegistry) factoryBean.getObject();
    FlowDefinition def = registry.getFlowDefinition("flow1");
    assertNotNull(def);
    assertEquals("flow1", def.getId());
    assertEquals("bar", def.getAttributes().get("foo"));
    assertEquals(new Integer(2), def.getAttributes().getInteger("bar"));
    def = registry.getFlowDefinition("flow2");
    assertNotNull(def);
    assertEquals("flow2", def.getId());
  }
View Full Code Here

    FlowLocation[] flowLocations = new FlowLocation[] { location1 };
    factoryBean.setFlowBuilderServices(TestFlowBuilderServicesFactory.getServices());
    factoryBean.setFlowLocations(flowLocations);
    factoryBean.afterPropertiesSet();
    FlowDefinitionRegistry registry = (FlowDefinitionRegistry) factoryBean.getObject();
    FlowDefinition def = registry.getFlowDefinition("flow");
    assertNotNull(def);
    assertEquals("flow", def.getId());
    assertTrue(def.getAttributes().isEmpty());
  }
View Full Code Here

    FlowLocation[] flowLocations = new FlowLocation[] { location1 };
    factoryBean.setFlowLocations(flowLocations);
    factoryBean.setFlowBuilderServices(TestFlowBuilderServicesFactory.getServices());
    factoryBean.afterPropertiesSet();
    FlowDefinitionRegistry registry = (FlowDefinitionRegistry) factoryBean.getObject();
    FlowDefinition def = registry.getFlowDefinition("flow");
    assertNotNull(def);
    assertEquals("flow", def.getId());
    assertTrue(def.getAttributes().isEmpty());
  }
View Full Code Here

  public FlowExecution restoreExecution(FlowExecutionSnapshot snapshot, String flowId, FlowExecutionKey key,
      MutableAttributeMap conversationScope, FlowExecutionKeyFactory keyFactory)
      throws FlowExecutionRestorationFailureException {
    SimpleFlowExecutionSnapshot snapshotImpl = (SimpleFlowExecutionSnapshot) snapshot;
    FlowDefinition def = flowDefinitionLocator.getFlowDefinition(flowId);
    FlowExecution execution = snapshotImpl.getFlowExecution();
    flowExecutionFactory.restoreFlowExecution(execution, def, key, conversationScope, flowDefinitionLocator);
    return execution;
  }
View Full Code Here

TOP

Related Classes of org.springframework.webflow.definition.FlowDefinition

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.