Search in sources :

Example 6 with EndState

use of org.springframework.webflow.engine.EndState 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.trace("Flow [{}] already contains a definition for state id [{}]", flow.getId(), id);
        return (EndState) flow.getStateInstance(id);
    }
    val endState = new EndState(flow, id);
    if (viewFactory != null) {
        val finalResponseAction = new ViewFactoryActionAdapter(viewFactory);
        endState.setFinalResponseAction(finalResponseAction);
        LOGGER.trace("Created end state state [{}] on flow id [{}], backed by view factory [{}]", id, flow.getId(), viewFactory);
    } else {
        LOGGER.trace("Created end state state [{}] on flow id [{}]", id, flow.getId());
    }
    return endState;
}
Also used : lombok.val(lombok.val) ViewFactoryActionAdapter(org.springframework.webflow.action.ViewFactoryActionAdapter) EndState(org.springframework.webflow.engine.EndState)

Aggregations

EndState (org.springframework.webflow.engine.EndState)6 lombok.val (lombok.val)3 ExternalRedirectAction (org.springframework.webflow.action.ExternalRedirectAction)2 ViewFactoryActionAdapter (org.springframework.webflow.action.ViewFactoryActionAdapter)2 LinkedHashMap (java.util.LinkedHashMap)1 Test (org.junit.jupiter.api.Test)1 Executable (org.junit.jupiter.api.function.Executable)1 Expression (org.springframework.binding.expression.Expression)1 MockHttpServletRequest (org.springframework.mock.web.MockHttpServletRequest)1 MockHttpServletResponse (org.springframework.mock.web.MockHttpServletResponse)1 MockServletContext (org.springframework.mock.web.MockServletContext)1 EvaluateAction (org.springframework.webflow.action.EvaluateAction)1 ServletExternalContext (org.springframework.webflow.context.servlet.ServletExternalContext)1 ActionState (org.springframework.webflow.engine.ActionState)1 Flow (org.springframework.webflow.engine.Flow)1 State (org.springframework.webflow.engine.State)1 TransitionableState (org.springframework.webflow.engine.TransitionableState)1 ViewState (org.springframework.webflow.engine.ViewState)1 ActionExecutingViewFactory (org.springframework.webflow.engine.support.ActionExecutingViewFactory)1 Action (org.springframework.webflow.execution.Action)1