Search in sources :

Example 1 with ViewFactoryActionAdapter

use of org.springframework.webflow.action.ViewFactoryActionAdapter in project cas by apereo.

the class AbstractCasWebflowConfigurer method createEndState.

@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;
}
Also used : Action(org.springframework.webflow.execution.Action) ExternalRedirectAction(org.springframework.webflow.action.ExternalRedirectAction) EvaluateAction(org.springframework.webflow.action.EvaluateAction) ViewFactoryActionAdapter(org.springframework.webflow.action.ViewFactoryActionAdapter) EndState(org.springframework.webflow.engine.EndState)

Aggregations

EvaluateAction (org.springframework.webflow.action.EvaluateAction)1 ExternalRedirectAction (org.springframework.webflow.action.ExternalRedirectAction)1 ViewFactoryActionAdapter (org.springframework.webflow.action.ViewFactoryActionAdapter)1 EndState (org.springframework.webflow.engine.EndState)1 Action (org.springframework.webflow.execution.Action)1