/** * Helper method to register the flow built from an externalized resource in the registry. * @param resource representation of the externalized flow definition resource * @param registry the flow registry to register the flow in */ protected final void register(FlowDefinitionResource resource, FlowDefinitionRegistry registry) { registry.registerFlowDefinition(createFlowDefinitionHolder(resource)); }
/** * Register flow definition into login flow registry. * * @param sourceRegistry the source registry */ protected void registerMultifactorFlowDefinitionIntoLoginFlowRegistry(final FlowDefinitionRegistry sourceRegistry) { val flowIds = sourceRegistry.getFlowDefinitionIds(); for (val flowId : flowIds) { val definition = sourceRegistry.getFlowDefinition(flowId); LOGGER.trace("Registering flow definition [{}]", flowId); this.loginFlowDefinitionRegistry.registerFlowDefinition(definition); } }
/** * Register a subflow definition in the backing flow registry, typically to support a flow execution test. For test * scenarios, the subflow is often a stub used to verify parent flow input and output mapping behavior. * @param subflow the subflow */ public void registerSubflow(Flow subflow) { getSubflowRegistry().registerFlowDefinition(new StaticFlowDefinitionHolder(subflow)); }
/** * Register the flow built by given flow builder in specified flow definition registry. * <p> * Note that this method will set the {@link #getFlowServiceLocator() flow service locator} of this class on given * flow builder. * @param registry the registry to register the flow in * @param flowId the flow id to assign * @param flowAttributes externally assigned flow attributes that can affect flow construction * @param flowBuilder the builder used to build the flow */ protected void registerFlowDefinition(FlowDefinitionRegistry registry, String flowId, AttributeMap flowAttributes, AbstractFlowBuilder flowBuilder) { flowBuilder.setFlowServiceLocator(getFlowServiceLocator()); Flow flow = new FlowAssembler(flowId, flowAttributes, flowBuilder).assembleFlow(); FlowDefinitionHolder flowHolder = new StaticFlowDefinitionHolder(flow); registry.registerFlowDefinition(flowHolder); } }
createViewState(pswdFlow, CasWebflowConstants.STATE_ID_PASSWORD_UPDATE_SUCCESS, CasWebflowConstants.VIEW_ID_PASSWORD_UPDATE_SUCCESS); configurePasswordResetFlow(pswdFlow, CasWebflowConstants.VIEW_ID_MUST_CHANGE_PASSWORD); loginFlowDefinitionRegistry.registerFlowDefinition(pswdFlow);