当前位置: 首页>>代码示例>>Java>>正文


Java Action类代码示例

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


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

示例1: testWebflowSerialization

import org.springframework.webflow.execution.Action; //导入依赖的package包/类
@Bean
public Action testWebflowSerialization() {
    return new AbstractAction() {
        @Override
        protected Event doExecute(final RequestContext requestContext) throws Exception {
            requestContext.getFlowScope().put("test0", Collections.singleton(TEST));
            requestContext.getFlowScope().put("test1", Collections.singletonList(TEST));
            requestContext.getFlowScope().put("test2", Collections.singletonMap(TEST, TEST));
            requestContext.getFlowScope().put("test3", Arrays.asList(TEST, TEST));
            requestContext.getFlowScope().put("test4", new ConcurrentSkipListSet());
            requestContext.getFlowScope().put("test5", Collections.unmodifiableList(Arrays.asList("test1")));
            requestContext.getFlowScope().put("test6", Collections.unmodifiableSet(Collections.singleton(1)));
            requestContext.getFlowScope().put("test7", Collections.unmodifiableMap(new HashMap<>()));
            requestContext.getFlowScope().put("test8", Collections.emptyMap());
            requestContext.getFlowScope().put("test9", new TreeMap<>());
            requestContext.getFlowScope().put("test10", Collections.emptySet());
            return success();
        }
    };
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:21,代码来源:CasWebflowContextConfigurationTests.java

示例2: ldapSpnegoClientAction

import org.springframework.webflow.execution.Action; //导入依赖的package包/类
@Lazy
@Bean
@RefreshScope
public Action ldapSpnegoClientAction() {
    final SpnegoProperties spnegoProperties = casProperties.getAuthn().getSpnego();
    final ConnectionFactory connectionFactory = Beans.newLdaptivePooledConnectionFactory(spnegoProperties.getLdap());
    final SearchFilter filter = Beans.newLdaptiveSearchFilter(spnegoProperties.getLdap().getSearchFilter(),
            "host", Collections.emptyList());

    final SearchRequest searchRequest = Beans.newLdaptiveSearchRequest(spnegoProperties.getLdap().getBaseDn(), filter);
    return new LdapSpnegoKnownClientSystemsFilterAction(spnegoProperties.getIpsToCheckPattern(), 
            spnegoProperties.getAlternativeRemoteHostAttribute(),
            spnegoProperties.getDnsTimeout(), 
            connectionFactory, 
            searchRequest, 
            spnegoProperties.getSpnegoAttributeName());
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:18,代码来源:SpnegoWebflowActionsConfiguration.java

示例3: createEndState

import org.springframework.webflow.execution.Action; //导入依赖的package包/类
@Override
public EndState createEndState(final Flow flow, final String id, final ViewFactory viewFactory) {

    if (containsFlowState(flow, id)) {
        LOGGER.debug("Flow [{}] already contains a definition for state id [{}]", flow.getId(), id);
        return (EndState) flow.getStateInstance(id);
    }

    final EndState endState = new EndState(flow, id);
    if (viewFactory != null) {
        final Action finalResponseAction = new ViewFactoryActionAdapter(viewFactory);
        endState.setFinalResponseAction(finalResponseAction);
        LOGGER.debug("Created end state state [{}] on flow id [{}], backed by view factory [{}]", id, flow.getId(), viewFactory);
    } else {
        LOGGER.debug("Created end state state [{}] on flow id [{}]", id, flow.getId());
    }
    return endState;

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

示例4: addMultiFactorOutcomeTransitionsToSubmissionActionState

import org.springframework.webflow.execution.Action; //导入依赖的package包/类
/**
 * Add multi factor outcome transitions to submission action state.
 *
 * @param flow the flow
 * @param flowIds the flow ids
 */
protected void addMultiFactorOutcomeTransitionsToSubmissionActionState(final Flow flow, final String[] flowIds) {
    final ActionState actionState = (ActionState) flow.getState(STATE_DEFINITION_ID_REAL_SUBMIT);
    LOGGER.debug("Retrieved action state {}", actionState.getId());

    final Action existingAction = actionState.getActionList().get(0);
    actionState.getActionList().remove(existingAction);

    final EvaluateAction action = createEvaluateAction("initiatingAuthenticationViaFormAction");
    actionState.getActionList().add(action);
    LOGGER.debug("Set action {} for action state {}", actionState.getId());

    for (final String flowId : flowIds) {
        addTransitionToActionState(actionState, flowId, flowId);
    }

}
 
开发者ID:Unicon,项目名称:cas-mfa,代码行数:23,代码来源:CasMultiFactorWebflowConfigurer.java

示例5: addEndStateBackedByView

import org.springframework.webflow.execution.Action; //导入依赖的package包/类
/**
 * Add end state backed by view.
 *
 * @param flow   the flow
 * @param id     the id
 * @param viewId the view id
 */
protected void addEndStateBackedByView(final Flow flow, final String id, final String viewId) {
    try {
        final EndState endState = new EndState(flow, id);
        final ViewFactory viewFactory = this.flowBuilderServices.getViewFactoryCreator().createViewFactory(
                new LiteralExpression(viewId),
                this.flowBuilderServices.getExpressionParser(),
                this.flowBuilderServices.getConversionService(),
                null, this.flowBuilderServices.getValidator(),
                this.flowBuilderServices.getValidationHintResolver());

        final Action finalResponseAction = new ViewFactoryActionAdapter(viewFactory);
        endState.setFinalResponseAction(finalResponseAction);
        LOGGER.debug("Created end state state {} on flow id {}, backed by view {}", id, flow.getId(), viewId);
    } catch (final Exception e) {
        LOGGER.error(e.getMessage(), e);
    }
}
 
开发者ID:Unicon,项目名称:cas-mfa,代码行数:25,代码来源:CasMultiFactorWebflowConfigurer.java

示例6: createEndState

import org.springframework.webflow.execution.Action; //导入依赖的package包/类
/**
 * Add end state backed by view.
 *
 * @param flow        the flow
 * @param id          the id
 * @param viewFactory the view factory
 */
protected void createEndState(final Flow flow, final String id, final ViewFactory viewFactory) {
    try {
        final EndState endState = new EndState(flow, id);
        final Action finalResponseAction = new ViewFactoryActionAdapter(viewFactory);
        endState.setFinalResponseAction(finalResponseAction);
        logger.debug("Created end state state {} on flow id {}, backed by view factory {}", id, flow.getId(), viewFactory);
    } catch (final Exception e) {
        logger.error(e.getMessage(), e);
    }
}
 
开发者ID:hsj-xiaokang,项目名称:springboot-shiro-cas-mybatis,代码行数:18,代码来源:AbstractCasWebflowConfigurer.java

示例7: createSubflowState

import org.springframework.webflow.execution.Action; //导入依赖的package包/类
/**
 * Create subflow state.
 *
 * @param flow        the flow
 * @param id          the id
 * @param subflow     the subflow
 * @param entryAction the entry action
 * @return the subflow state
 */
protected SubflowState createSubflowState(final Flow flow, final String id, final String subflow,
                                          final Action entryAction) {

    final SubflowState state = new SubflowState(flow, id, new BasicSubflowExpression(subflow, this.loginFlowDefinitionRegistry));
    if (entryAction != null) {
        state.getEntryActionList().add(entryAction);
    }

    return state;
}
 
开发者ID:hsj-xiaokang,项目名称:springboot-shiro-cas-mybatis,代码行数:20,代码来源:AbstractCasWebflowConfigurer.java

示例8: samlMetadataUIParserAction

import org.springframework.webflow.execution.Action; //导入依赖的package包/类
@ConditionalOnMissingBean(name = "samlMetadataUIParserAction")
@Bean
public Action samlMetadataUIParserAction() {
    final String parameter = StringUtils.defaultIfEmpty(casProperties.getSamlMetadataUi().getParameter(),
            SamlProtocolConstants.PARAMETER_ENTITY_ID);
    return new SamlMetadataUIParserAction(parameter, chainingSamlMetadataUIMetadataResolverAdapter(),
            serviceFactory, servicesManager);
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:9,代码来源:SamlMetadataUIConfiguration.java

示例9: clientAction

import org.springframework.webflow.execution.Action; //导入依赖的package包/类
@Autowired
@RefreshScope
@Bean
@Lazy
public Action clientAction(@Qualifier("builtClients") final Clients builtClients) {
    return new DelegatedClientAuthenticationAction(builtClients, 
            authenticationSystemSupport, 
            centralAuthenticationService, 
            casProperties.getTheme().getParamName(), 
            casProperties.getLocale().getParamName(), 
            casProperties.getAuthn().getPac4j().isAutoRedirect());
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:13,代码来源:Pac4jConfiguration.java

示例10: Pac4jWebflowConfigurer

import org.springframework.webflow.execution.Action; //导入依赖的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

示例11: googleAccountRegistrationAction

import org.springframework.webflow.execution.Action; //导入依赖的package包/类
@Bean
@RefreshScope
public Action googleAccountRegistrationAction() {
    final MultifactorAuthenticationProperties.GAuth gauth = casProperties.getAuthn().getMfa().getGauth();
    return new OneTimeTokenAccountCheckRegistrationAction(googleAuthenticatorAccountRegistry,
            gauth.getLabel(),
            gauth.getIssuer());
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:9,代码来源:GoogleAuthenticatorAuthenticationEventExecutionPlanConfiguration.java

示例12: createConsentRequiredCheckAction

import org.springframework.webflow.execution.Action; //导入依赖的package包/类
private void createConsentRequiredCheckAction(final Flow flow) {
    final ActionState sendTicket = (ActionState) flow.getState(CasWebflowConstants.STATE_ID_GENERATE_SERVICE_TICKET);
    final List<Action> actions = StreamSupport.stream(sendTicket.getActionList().spliterator(), false)
            .collect(Collectors.toList());
    actions.add(0, createEvaluateAction("checkConsentRequiredAction"));
    sendTicket.getActionList().forEach(a -> sendTicket.getActionList().remove(a));
    actions.forEach(sendTicket.getActionList()::add);
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:9,代码来源:ConsentWebflowConfigurer.java

示例13: samlIdPMetadataUIParserAction

import org.springframework.webflow.execution.Action; //导入依赖的package包/类
@ConditionalOnMissingBean(name = "samlIdPMetadataUIParserAction")
@Bean
public Action samlIdPMetadataUIParserAction() {
    return new SamlIdPMetadataUIAction(servicesManager,
            defaultSamlRegisteredServiceCachingMetadataResolver,
            selectionStrategies);
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:8,代码来源:SamlIdPWebflowConfiguration.java

示例14: doInitialize

import org.springframework.webflow.execution.Action; //导入依赖的package包/类
@Override
protected void doInitialize() throws Exception {
    final Flow flow = getLoginFlow();
    if (flow != null) {
        final ActionState state = (ActionState) flow.getState(CasWebflowConstants.TRANSITION_ID_REAL_SUBMIT);
        final List<Action> currentActions = new ArrayList<>();
        state.getActionList().forEach(currentActions::add);
        currentActions.forEach(a -> state.getActionList().remove(a));

        state.getActionList().add(createEvaluateAction("validateCaptchaAction"));
        currentActions.forEach(a -> state.getActionList().add(a));

        state.getTransitionSet().add(createTransition("captchaError", CasWebflowConstants.STATE_ID_INIT_LOGIN_FORM));
    }
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:16,代码来源:CasCaptchaWebflowConfigurer.java

示例15: authenticationViaFormAction

import org.springframework.webflow.execution.Action; //导入依赖的package包/类
@ConditionalOnMissingBean(name = "authenticationViaFormAction")
@Bean
@RefreshScope
public Action authenticationViaFormAction() {
    return new InitialAuthenticationAction(initialAuthenticationAttemptWebflowEventResolver,
            serviceTicketRequestWebflowEventResolver,
            adaptiveAuthenticationPolicy);
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:9,代码来源:CasSupportActionsConfiguration.java


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