• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java FlowDefinitionRegistry类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.springframework.webflow.definition.registry.FlowDefinitionRegistry的典型用法代码示例。如果您正苦于以下问题:Java FlowDefinitionRegistry类的具体用法?Java FlowDefinitionRegistry怎么用?Java FlowDefinitionRegistry使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



FlowDefinitionRegistry类属于org.springframework.webflow.definition.registry包,在下文中一共展示了FlowDefinitionRegistry类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: flowExecutorViaServerSessionBindingExecution

import org.springframework.webflow.definition.registry.FlowDefinitionRegistry; //导入依赖的package包/类
@Bean
public FlowExecutor flowExecutorViaServerSessionBindingExecution() {
    final FlowDefinitionRegistry loginFlowRegistry = loginFlowRegistry();

    final SessionBindingConversationManager conversationManager = new SessionBindingConversationManager();
    conversationManager.setLockTimeoutSeconds(Long.valueOf(casProperties.getWebflow().getSession().getLockTimeout()).intValue());
    conversationManager.setMaxConversations(casProperties.getWebflow().getSession().getMaxConversations());

    final FlowExecutionImplFactory executionFactory = new FlowExecutionImplFactory();
    final SerializedFlowExecutionSnapshotFactory flowExecutionSnapshotFactory =
            new SerializedFlowExecutionSnapshotFactory(executionFactory, loginFlowRegistry);
    flowExecutionSnapshotFactory.setCompress(casProperties.getWebflow().getSession().isCompress());

    final DefaultFlowExecutionRepository repository = new DefaultFlowExecutionRepository(conversationManager,
            flowExecutionSnapshotFactory);
    executionFactory.setExecutionKeyFactory(repository);
    return new FlowExecutorImpl(loginFlowRegistry, executionFactory, repository);
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:19,代码来源:CasWebflowContextConfiguration.java


示例2: doInitialize

import org.springframework.webflow.definition.registry.FlowDefinitionRegistry; //导入依赖的package包/类
@Override
protected void doInitialize() throws Exception {
    provider.getProviders().forEach(p -> {
        final FlowDefinitionRegistry duoFlowRegistry = buildDuoFlowRegistry(p);
        applicationContext.getAutowireCapableBeanFactory().initializeBean(duoFlowRegistry, p.getId());
        final ConfigurableListableBeanFactory cfg = (ConfigurableListableBeanFactory) applicationContext.getAutowireCapableBeanFactory();
        cfg.registerSingleton(p.getId(), duoFlowRegistry);
        registerMultifactorProviderAuthenticationWebflow(getLoginFlow(), p.getId(), duoFlowRegistry);
    });

    casProperties.getAuthn().getMfa().getDuo()
            .stream()
            .filter(MultifactorAuthenticationProperties.Duo::isTrustedDeviceEnabled)
            .forEach(duo -> {
                final String id = duo.getId();
                try {
                    LOGGER.debug("Activating multifactor trusted authentication for webflow [{}]", id);
                    final FlowDefinitionRegistry registry = applicationContext.getBean(id, FlowDefinitionRegistry.class);
                    registerMultifactorTrustedAuthentication(registry);
                } catch (final Exception e) {
                    LOGGER.error("Failed to register multifactor trusted authentication for " + id, e);
                }
            });
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:25,代码来源:DuoMultifactorWebflowConfigurer.java


示例3: validateFlowDefinitionConfiguration

import org.springframework.webflow.definition.registry.FlowDefinitionRegistry; //导入依赖的package包/类
private void validateFlowDefinitionConfiguration(final FlowDefinitionRegistry flowDefinitionRegistry) {
    if (flowDefinitionRegistry.getFlowDefinitionCount() <= 0) {
        throw new IllegalArgumentException("Flow definition registry has no flow definitions");
    }

    final String msg = "CAS application context cannot find bean [%s]. "
            + "This typically indicates that configuration is attempting to activate trusted-device functionality for "
            + "multifactor authentication, yet the configuration modules that auto-configure the webflow are absent "
            + "from the CAS application runtime.";

    if (!applicationContext.containsBean(MFA_SET_TRUST_ACTION_BEAN_ID)) {
        throw new IllegalArgumentException(String.format(msg, MFA_SET_TRUST_ACTION_BEAN_ID));
    }

    if (!applicationContext.containsBean(MFA_VERIFY_TRUST_ACTION_BEAN_ID)) {
        throw new IllegalArgumentException(String.format(msg, MFA_VERIFY_TRUST_ACTION_BEAN_ID));
    }
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:19,代码来源:AbstractMultifactorTrustedDeviceWebflowConfigurer.java


示例4: logoutFlowRegistry

import org.springframework.webflow.definition.registry.FlowDefinitionRegistry; //导入依赖的package包/类
@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();
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:8,代码来源:CasWebflowContextConfiguration.java


示例5: loginFlowRegistry

import org.springframework.webflow.definition.registry.FlowDefinitionRegistry; //导入依赖的package包/类
@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();
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:8,代码来源:CasWebflowContextConfiguration.java


示例6: flowExecutorViaClientFlowExecution

import org.springframework.webflow.definition.registry.FlowDefinitionRegistry; //导入依赖的package包/类
@Bean
public FlowExecutor flowExecutorViaClientFlowExecution() {
    final FlowDefinitionRegistry loginFlowRegistry = loginFlowRegistry();
    final ClientFlowExecutionRepository repository = new ClientFlowExecutionRepository();
    repository.setFlowDefinitionLocator(loginFlowRegistry);
    repository.setTranscoder(loginFlowStateTranscoder());

    final FlowExecutionImplFactory factory = new FlowExecutionImplFactory();
    factory.setExecutionKeyFactory(repository);
    repository.setFlowExecutionFactory(factory);
    return new FlowExecutorImpl(loginFlowRegistry, factory, repository);
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:13,代码来源:CasWebflowContextConfiguration.java


示例7: radiusFlowRegistry

import org.springframework.webflow.definition.registry.FlowDefinitionRegistry; //导入依赖的package包/类
@Bean
public FlowDefinitionRegistry radiusFlowRegistry() {
    final FlowDefinitionRegistryBuilder builder = new FlowDefinitionRegistryBuilder(this.applicationContext, this.flowBuilderServices);
    builder.setBasePath("classpath*:/webflow");
    builder.addFlowLocationPattern("/mfa-radius/*-webflow.xml");
    return builder.build();
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:8,代码来源:RadiusMultifactorConfiguration.java


示例8: GoogleAuthenticatorMultifactorTrustWebflowConfigurer

import org.springframework.webflow.definition.registry.FlowDefinitionRegistry; //导入依赖的package包/类
public GoogleAuthenticatorMultifactorTrustWebflowConfigurer(final FlowBuilderServices flowBuilderServices,
                                                            final FlowDefinitionRegistry loginFlowDefinitionRegistry,
                                                            final boolean enableDeviceRegistration,
                                                            final FlowDefinitionRegistry flowDefinitionRegistry) {
    super(flowBuilderServices, loginFlowDefinitionRegistry, enableDeviceRegistration);
    this.flowDefinitionRegistry = flowDefinitionRegistry;
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:8,代码来源:GoogleAuthenticatorMultifactorTrustWebflowConfigurer.java


示例9: Pac4jWebflowConfigurer

import org.springframework.webflow.definition.registry.FlowDefinitionRegistry; //导入依赖的package包/类
public Pac4jWebflowConfigurer(final FlowBuilderServices flowBuilderServices, 
                              final FlowDefinitionRegistry loginFlowDefinitionRegistry,
                              final FlowDefinitionRegistry logoutFlowDefinitionRegistry,
                              final Action saml2ClientLogoutAction) {
    super(flowBuilderServices, loginFlowDefinitionRegistry);
    setLogoutFlowDefinitionRegistry(logoutFlowDefinitionRegistry);
    this.saml2ClientLogoutAction = saml2ClientLogoutAction;
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:9,代码来源:Pac4jWebflowConfigurer.java


示例10: googleAuthenticatorFlowRegistry

import org.springframework.webflow.definition.registry.FlowDefinitionRegistry; //导入依赖的package包/类
@Bean
public FlowDefinitionRegistry googleAuthenticatorFlowRegistry() {
    final FlowDefinitionRegistryBuilder builder = new FlowDefinitionRegistryBuilder(this.applicationContext, this.flowBuilderServices);
    builder.setBasePath("classpath*:/webflow");
    builder.addFlowLocationPattern("/mfa-gauth/*-webflow.xml");
    return builder.build();
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:8,代码来源:GoogleAuthenticatorConfiguration.java


示例11: azureAuthenticatorFlowRegistry

import org.springframework.webflow.definition.registry.FlowDefinitionRegistry; //导入依赖的package包/类
@Bean
public FlowDefinitionRegistry azureAuthenticatorFlowRegistry() {
    final FlowDefinitionRegistryBuilder builder = new FlowDefinitionRegistryBuilder(this.applicationContext, this.flowBuilderServices);
    builder.setBasePath("classpath*:/webflow");
    builder.addFlowLocationPattern("/mfa-azure/*-webflow.xml");
    return builder.build();
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:8,代码来源:AzureAuthenticatorConfiguration.java


示例12: AzureAuthenticatorMultifactorTrustWebflowConfigurer

import org.springframework.webflow.definition.registry.FlowDefinitionRegistry; //导入依赖的package包/类
public AzureAuthenticatorMultifactorTrustWebflowConfigurer(final FlowBuilderServices flowBuilderServices,
                                                            final FlowDefinitionRegistry loginFlowDefinitionRegistry,
                                                            final boolean enableDeviceRegistration,
                                                            final FlowDefinitionRegistry flowDefinitionRegistry) {
    super(flowBuilderServices, loginFlowDefinitionRegistry, enableDeviceRegistration);
    this.flowDefinitionRegistry = flowDefinitionRegistry;
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:8,代码来源:AzureAuthenticatorMultifactorTrustWebflowConfigurer.java


示例13: yubikeyFlowRegistry

import org.springframework.webflow.definition.registry.FlowDefinitionRegistry; //导入依赖的package包/类
@Bean
public FlowDefinitionRegistry yubikeyFlowRegistry() {
    final FlowDefinitionRegistryBuilder builder = new FlowDefinitionRegistryBuilder(this.applicationContext, this.flowBuilderServices);
    builder.setBasePath("classpath*:/webflow");
    builder.addFlowLocationPattern("/mfa-yubikey/*-webflow.xml");
    return builder.build();
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:8,代码来源:YubiKeyConfiguration.java


示例14: authyAuthenticatorFlowRegistry

import org.springframework.webflow.definition.registry.FlowDefinitionRegistry; //导入依赖的package包/类
@Bean
public FlowDefinitionRegistry authyAuthenticatorFlowRegistry() {
    final FlowDefinitionRegistryBuilder builder = new FlowDefinitionRegistryBuilder(this.applicationContext, this.flowBuilderServices);
    builder.setBasePath("classpath*:/webflow");
    builder.addFlowLocationPattern("/mfa-authy/*-webflow.xml");
    return builder.build();
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:8,代码来源:AuthyConfiguration.java


示例15: u2fFlowRegistry

import org.springframework.webflow.definition.registry.FlowDefinitionRegistry; //导入依赖的package包/类
@Bean
public FlowDefinitionRegistry u2fFlowRegistry() {
    final FlowDefinitionRegistryBuilder builder = new FlowDefinitionRegistryBuilder(this.applicationContext, this.flowBuilderServices);
    builder.setBasePath("classpath*:/webflow");
    builder.addFlowLocationPattern("/mfa-u2f/*-webflow.xml");
    return builder.build();
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:8,代码来源:U2FConfiguration.java


示例16: buildFlow

import org.springframework.webflow.definition.registry.FlowDefinitionRegistry; //导入依赖的package包/类
@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);
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:9,代码来源:AbstractCasWebflowConfigurer.java


示例17: registerMultifactorFlowDefinitionIntoLoginFlowRegistry

import org.springframework.webflow.definition.registry.FlowDefinitionRegistry; //导入依赖的package包/类
/**
 * Register flow definition into login flow registry.
 *
 * @param sourceRegistry the source registry
 */
protected void registerMultifactorFlowDefinitionIntoLoginFlowRegistry(final FlowDefinitionRegistry sourceRegistry) {
    final String[] flowIds = sourceRegistry.getFlowDefinitionIds();
    for (final String flowId : flowIds) {
        final FlowDefinition definition = sourceRegistry.getFlowDefinition(flowId);
        LOGGER.debug("Registering flow definition [{}]", flowId);
        this.loginFlowDefinitionRegistry.registerFlowDefinition(definition);
    }
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:14,代码来源:AbstractCasMultifactorWebflowConfigurer.java


示例18: augmentMfaProviderFlowRegistry

import org.springframework.webflow.definition.registry.FlowDefinitionRegistry; //导入依赖的package包/类
/**
 * Augment mfa provider flow registry.
 *
 * @param mfaProviderFlowRegistry the mfa provider flow registry
 */
protected void augmentMfaProviderFlowRegistry(final FlowDefinitionRegistry mfaProviderFlowRegistry) {
    final String[] flowIds = mfaProviderFlowRegistry.getFlowDefinitionIds();
    Arrays.stream(flowIds).forEach(id -> {
        final Flow flow = Flow.class.cast(mfaProviderFlowRegistry.getFlowDefinition(id));
        if (containsFlowState(flow, CasWebflowConstants.TRANSITION_ID_REAL_SUBMIT)) {
            final ActionState submit = (ActionState) flow.getState(CasWebflowConstants.TRANSITION_ID_REAL_SUBMIT);
            ensureEndStateTransitionExists(submit, flow, 
                    CasWebflowConstants.TRANSITION_ID_SUCCESS, CasWebflowConstants.STATE_ID_SUCCESS);
            ensureEndStateTransitionExists(submit, flow, 
                    CasWebflowConstants.TRANSITION_ID_SUCCESS_WITH_WARNINGS, CasWebflowConstants.TRANSITION_ID_SUCCESS_WITH_WARNINGS);
        }
    });

}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:20,代码来源:AbstractCasMultifactorWebflowConfigurer.java


示例19: registerMultifactorProviderAuthenticationWebflow

import org.springframework.webflow.definition.registry.FlowDefinitionRegistry; //导入依赖的package包/类
/**
 * Register multifactor provider authentication webflow.
 *
 * @param flow                    the flow
 * @param subflowId               the subflow id
 * @param mfaProviderFlowRegistry the registry
 */
protected void registerMultifactorProviderAuthenticationWebflow(final Flow flow, final String subflowId,
                                                                final FlowDefinitionRegistry mfaProviderFlowRegistry) {

    final SubflowState subflowState = createSubflowState(flow, subflowId, subflowId);

    final ActionState actionState = (ActionState) flow.getState(CasWebflowConstants.TRANSITION_ID_REAL_SUBMIT);
    final String targetSuccessId = actionState.getTransition(CasWebflowConstants.TRANSITION_ID_SUCCESS).getTargetStateId();
    final String targetWarningsId = actionState.getTransition(CasWebflowConstants.TRANSITION_ID_SUCCESS_WITH_WARNINGS).getTargetStateId();

    final List<DefaultMapping> mappings = new ArrayList<>();
    final Mapper inputMapper = createMapperToSubflowState(mappings);
    final SubflowAttributeMapper subflowMapper = createSubflowAttributeMapper(inputMapper, null);
    subflowState.setAttributeMapper(subflowMapper);
    
    subflowState.getTransitionSet().add(createTransition(CasWebflowConstants.TRANSITION_ID_SUCCESS, targetSuccessId));
    subflowState.getTransitionSet().add(createTransition(CasWebflowConstants.TRANSITION_ID_SUCCESS_WITH_WARNINGS, targetWarningsId));

    LOGGER.debug("Retrieved action state [{}]", actionState.getId());
    createTransitionForState(actionState, subflowId, subflowId);

    registerMultifactorFlowDefinitionIntoLoginFlowRegistry(mfaProviderFlowRegistry);
    augmentMfaProviderFlowRegistry(mfaProviderFlowRegistry);

    final TransitionableState state = flow.getTransitionableState(CasWebflowConstants.TRANSITION_ID_INITIAL_AUTHN_REQUEST_VALIDATION_CHECK);
    createTransitionForState(state, subflowId, subflowId);
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:34,代码来源:AbstractCasMultifactorWebflowConfigurer.java


示例20: logoutFlowRegistry

import org.springframework.webflow.definition.registry.FlowDefinitionRegistry; //导入依赖的package包/类
@Bean
public FlowDefinitionRegistry logoutFlowRegistry() {
    FlowDefinitionRegistryBuilder builder = new FlowDefinitionRegistryBuilder(this.applicationContext, this.builder());
    builder.setBasePath("classpath*:/webflow");
    builder.addFlowLocationPattern("/logout/*-webflow.xml");
    return builder.build();
}
 
开发者ID:e-gov,项目名称:TARA-Server,代码行数:8,代码来源:CasWebflowContextConfiguration.java



注:本文中的org.springframework.webflow.definition.registry.FlowDefinitionRegistry类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java LogCLIHelpers类代码示例发布时间:2022-05-22
下一篇:
Java SandboxedProcessService类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap