Search in sources :

Example 11 with FlowDefinitionRegistryBuilder

use of org.springframework.webflow.config.FlowDefinitionRegistryBuilder in project cas by apereo.

the class CasWebflowContextConfiguration method loginFlowRegistry.

@Bean
public FlowDefinitionRegistry loginFlowRegistry() {
    final FlowDefinitionRegistryBuilder builder = new FlowDefinitionRegistryBuilder(this.applicationContext, builder());
    builder.setBasePath(BASE_CLASSPATH_WEBFLOW);
    builder.addFlowLocationPattern("/login/*-webflow.xml");
    return builder.build();
}
Also used : FlowDefinitionRegistryBuilder(org.springframework.webflow.config.FlowDefinitionRegistryBuilder) CipherBean(org.cryptacular.bean.CipherBean) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) Bean(org.springframework.context.annotation.Bean)

Example 12 with FlowDefinitionRegistryBuilder

use of org.springframework.webflow.config.FlowDefinitionRegistryBuilder in project cas by apereo.

the class AbstractCasWebflowConfigurer method buildFlow.

@Override
public Flow buildFlow(final String location, final String id) {
    final FlowDefinitionRegistryBuilder builder = new FlowDefinitionRegistryBuilder(this.applicationContext, this.flowBuilderServices);
    builder.setParent(this.loginFlowDefinitionRegistry);
    builder.addFlowLocation(location, id);
    final FlowDefinitionRegistry registry = builder.build();
    return (Flow) registry.getFlowDefinition(id);
}
Also used : FlowDefinitionRegistryBuilder(org.springframework.webflow.config.FlowDefinitionRegistryBuilder) FlowDefinitionRegistry(org.springframework.webflow.definition.registry.FlowDefinitionRegistry) Flow(org.springframework.webflow.engine.Flow)

Example 13 with FlowDefinitionRegistryBuilder

use of org.springframework.webflow.config.FlowDefinitionRegistryBuilder in project cas by apereo.

the class CasWebflowContextConfiguration method logoutFlowRegistry.

@Bean
public FlowDefinitionRegistry logoutFlowRegistry() {
    final FlowDefinitionRegistryBuilder builder = new FlowDefinitionRegistryBuilder(this.applicationContext, builder());
    builder.setBasePath(BASE_CLASSPATH_WEBFLOW);
    builder.addFlowLocationPattern("/logout/*-webflow.xml");
    return builder.build();
}
Also used : FlowDefinitionRegistryBuilder(org.springframework.webflow.config.FlowDefinitionRegistryBuilder) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) Bean(org.springframework.context.annotation.Bean)

Example 14 with FlowDefinitionRegistryBuilder

use of org.springframework.webflow.config.FlowDefinitionRegistryBuilder in project cas by apereo.

the class DuoMultifactorWebflowConfigurer method createDuoFlowDefinitionRegistry.

private FlowDefinitionRegistry createDuoFlowDefinitionRegistry(final MultifactorAuthenticationProvider p, final DynamicFlowModelBuilder modelBuilder) {
    final FlowModelHolder holder = new DefaultFlowModelHolder(modelBuilder);
    final FlowBuilder flowBuilder = new FlowModelFlowBuilder(holder);
    final FlowDefinitionRegistryBuilder builder = new FlowDefinitionRegistryBuilder(this.applicationContext, flowBuilderServices);
    builder.addFlowBuilder(flowBuilder, p.getId());
    return builder.build();
}
Also used : FlowDefinitionRegistryBuilder(org.springframework.webflow.config.FlowDefinitionRegistryBuilder) FlowModelHolder(org.springframework.webflow.engine.model.registry.FlowModelHolder) DefaultFlowModelHolder(org.springframework.webflow.engine.model.builder.DefaultFlowModelHolder) FlowBuilder(org.springframework.webflow.engine.builder.FlowBuilder) FlowModelFlowBuilder(org.springframework.webflow.engine.builder.model.FlowModelFlowBuilder) FlowModelFlowBuilder(org.springframework.webflow.engine.builder.model.FlowModelFlowBuilder) DefaultFlowModelHolder(org.springframework.webflow.engine.model.builder.DefaultFlowModelHolder)

Example 15 with FlowDefinitionRegistryBuilder

use of org.springframework.webflow.config.FlowDefinitionRegistryBuilder in project cas by apereo.

the class AbstractCasWebflowConfigurer method buildFlow.

@Override
public Flow buildFlow(final String id) {
    val builder = new FlowDefinitionRegistryBuilder(this.applicationContext, this.flowBuilderServices);
    builder.setParent(this.mainFlowDefinitionRegistry);
    builder.addFlowBuilder(new FlowModelFlowBuilder(new DefaultFlowModelHolder(new DynamicFlowModelBuilder())), id);
    val registry = builder.build();
    return (Flow) registry.getFlowDefinition(id);
}
Also used : lombok.val(lombok.val) FlowDefinitionRegistryBuilder(org.springframework.webflow.config.FlowDefinitionRegistryBuilder) FlowModelFlowBuilder(org.springframework.webflow.engine.builder.model.FlowModelFlowBuilder) DefaultFlowModelHolder(org.springframework.webflow.engine.model.builder.DefaultFlowModelHolder) Flow(org.springframework.webflow.engine.Flow)

Aggregations

FlowDefinitionRegistryBuilder (org.springframework.webflow.config.FlowDefinitionRegistryBuilder)16 ConditionalOnMissingBean (org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean)12 Bean (org.springframework.context.annotation.Bean)12 FlowModelFlowBuilder (org.springframework.webflow.engine.builder.model.FlowModelFlowBuilder)3 DefaultFlowModelHolder (org.springframework.webflow.engine.model.builder.DefaultFlowModelHolder)3 lombok.val (lombok.val)2 CipherBean (org.cryptacular.bean.CipherBean)2 Flow (org.springframework.webflow.engine.Flow)2 FlowDefinitionRegistry (org.springframework.webflow.definition.registry.FlowDefinitionRegistry)1 FlowBuilder (org.springframework.webflow.engine.builder.FlowBuilder)1 FlowModelHolder (org.springframework.webflow.engine.model.registry.FlowModelHolder)1