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


Java BinderConfiguration类代码示例

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


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

示例1: configure

import org.springframework.webflow.engine.builder.BinderConfiguration; //导入依赖的package包/类
private void configure(final Flow flow, final String id) {
    createFlowVariable(flow, FLOW_VAR_ID_PASSWORD, PasswordChangeBean.class);

    final BinderConfiguration binder = createStateBinderConfiguration(Arrays.asList(FLOW_VAR_ID_PASSWORD, "confirmedPassword"));
    final ViewState viewState = createViewState(flow, id, id, binder);
    createStateModelBinding(viewState, FLOW_VAR_ID_PASSWORD, PasswordChangeBean.class);

    viewState.getEntryActionList().add(this.passwordChangeAction);
    final Transition transition = createTransitionForState(viewState, CasWebflowConstants.TRANSITION_ID_SUBMIT, PASSWORD_CHANGE_ACTION);
    transition.getAttributes().put("bind", Boolean.TRUE);
    transition.getAttributes().put("validate", Boolean.TRUE);

    createStateDefaultTransition(viewState, id);

    final ActionState pswChangeAction = createActionState(flow, PASSWORD_CHANGE_ACTION, createEvaluateAction(PASSWORD_CHANGE_ACTION));
    pswChangeAction.getTransitionSet().add(
            createTransition(PasswordChangeAction.PASSWORD_UPDATE_SUCCESS, CasWebflowConstants.STATE_ID_PASSWORD_UPDATE_SUCCESS));
    pswChangeAction.getTransitionSet().add(createTransition(CasWebflowConstants.TRANSITION_ID_ERROR, id));
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:20,代码来源:PasswordManagementWebflowConfigurer.java

示例2: createViewState

import org.springframework.webflow.engine.builder.BinderConfiguration; //导入依赖的package包/类
@Override
public ViewState createViewState(final Flow flow, final String id, final Expression expression,
                                 final BinderConfiguration binder) {
    try {
        if (containsFlowState(flow, id)) {
            LOGGER.debug("Flow [{}] already contains a definition for state id [{}]", flow.getId(), id);
            return (ViewState) flow.getTransitionableState(id);
        }

        final ViewFactory viewFactory = this.flowBuilderServices.getViewFactoryCreator().createViewFactory(
                expression,
                this.flowBuilderServices.getExpressionParser(),
                this.flowBuilderServices.getConversionService(),
                binder,
                this.flowBuilderServices.getValidator(),
                this.flowBuilderServices.getValidationHintResolver());

        final ViewState viewState = new ViewState(flow, id, viewFactory);
        LOGGER.debug("Added view state [{}]", viewState.getId());
        return viewState;
    } catch (final Exception e) {
        LOGGER.error(e.getMessage(), e);
    }
    return null;
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:26,代码来源:AbstractCasWebflowConfigurer.java

示例3: createRememberMeAuthnWebflowConfig

import org.springframework.webflow.engine.builder.BinderConfiguration; //导入依赖的package包/类
/**
 * Create remember me authn webflow config.
 *
 * @param flow the flow
 */
protected void createRememberMeAuthnWebflowConfig(final Flow flow) {
    if (casProperties.getTicket().getTgt().getRememberMe().isEnabled()) {
        createFlowVariable(flow, CasWebflowConstants.VAR_ID_CREDENTIAL, RememberMeUsernamePasswordCredential.class);
        final ViewState state = (ViewState) flow.getState(CasWebflowConstants.STATE_ID_VIEW_LOGIN_FORM);
        final BinderConfiguration cfg = getViewStateBinderConfiguration(state);
        cfg.addBinding(new BinderConfiguration.Binding("rememberMe", null, false));
    } else {
        createFlowVariable(flow, CasWebflowConstants.VAR_ID_CREDENTIAL, UsernamePasswordCredential.class);
    }
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:16,代码来源:DefaultWebflowConfigurer.java

示例4: createRememberMeAuthnWebflowConfig

import org.springframework.webflow.engine.builder.BinderConfiguration; //导入依赖的package包/类
@Override
protected void createRememberMeAuthnWebflowConfig(Flow flow) {
    if (this.casProperties.getTicket().getTgt().getRememberMe().isEnabled()) {
        this.createFlowVariable(flow, "credential", RememberMeUsernamePasswordCredential.class);
        ViewState state = (ViewState)flow.getState("viewLoginForm");
        BinderConfiguration cfg = this.getViewStateBinderConfiguration(state);
        cfg.addBinding(new BinderConfiguration.Binding("rememberMe", null, false));
    } else {
        this.createFlowVariable(flow, "credential", TaraCredential.class);
    }
}
 
开发者ID:e-gov,项目名称:TARA-Server,代码行数:12,代码来源:TaraWebflowConfigurer.java

示例5: bindCredential

import org.springframework.webflow.engine.builder.BinderConfiguration; //导入依赖的package包/类
/**
 * 绑定输入信息
 *
 * @param flow
 */
protected void bindCredential(Flow flow) {
    //重写绑定自定义credential
    createFlowVariable(flow, CasWebflowConstants.VAR_ID_CREDENTIAL, UsernamePasswordSysCredential.class);
    //登录页绑定新参数
    final ViewState state = (ViewState) flow.getState(CasWebflowConstants.STATE_ID_VIEW_LOGIN_FORM);
    final BinderConfiguration cfg = getViewStateBinderConfiguration(state);
    //由于用户名以及密码已经绑定,所以只需对新加系统参数绑定即可
    cfg.addBinding(new BinderConfiguration.Binding("system", null, false));
}
 
开发者ID:kawhii,项目名称:sso,代码行数:15,代码来源:CustomWebflowConfigurer.java

示例6: createViewState

import org.springframework.webflow.engine.builder.BinderConfiguration; //导入依赖的package包/类
/**
 * Create view state view state.
 *
 * @param flow       the flow
 * @param id         the id
 * @param expression the expression
 * @param binder     the binder
 * @return the view state
 */
ViewState createViewState(Flow flow, String id, Expression expression, BinderConfiguration binder);
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:11,代码来源:CasWebflowConfigurer.java

示例7: createStateBinderConfiguration

import org.springframework.webflow.engine.builder.BinderConfiguration; //导入依赖的package包/类
/**
 * Create state model bindings.
 *
 * @param properties the properties
 * @return the binder configuration
 */
protected BinderConfiguration createStateBinderConfiguration(final List<String> properties) {
    final BinderConfiguration binder = new BinderConfiguration();
    properties.forEach(p -> binder.addBinding(new BinderConfiguration.Binding(p, null, true)));
    return binder;
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:12,代码来源:AbstractCasWebflowConfigurer.java

示例8: getViewStateBinderConfiguration

import org.springframework.webflow.engine.builder.BinderConfiguration; //导入依赖的package包/类
/**
 * Gets state binder configuration.
 *
 * @param state the state
 * @return the state binder configuration
 */
protected BinderConfiguration getViewStateBinderConfiguration(final ViewState state) {
    final Field field = ReflectionUtils.findField(state.getViewFactory().getClass(), "binderConfiguration");
    ReflectionUtils.makeAccessible(field);
    return (BinderConfiguration) ReflectionUtils.getField(field, state.getViewFactory());
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:12,代码来源:AbstractCasWebflowConfigurer.java


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