Package org.apache.myfaces.flow
Class FlowHandlerImpl
- java.lang.Object
- 
- jakarta.faces.flow.FlowHandler
- 
- org.apache.myfaces.flow.FlowHandlerImpl
 
 
- 
- All Implemented Interfaces:
- FacesListener,- SystemEventListener,- EventListener
 
 public class FlowHandlerImpl extends FlowHandler implements SystemEventListener - Since:
- 2.2
- Author:
- Leonardo Uribe
 
- 
- 
Field Summary- 
Fields inherited from class jakarta.faces.flow.FlowHandlerFLOW_ID_REQUEST_PARAM_NAME, NULL_FLOW, TO_FLOW_DOCUMENT_ID_REQUEST_PARAM_NAME
 
- 
 - 
Constructor SummaryConstructors Constructor Description FlowHandlerImpl()
 - 
Method Summary- 
Methods inherited from class jakarta.faces.flow.FlowHandlergetCurrentFlow
 
- 
 
- 
- 
- 
Method Detail- 
getFlowpublic Flow getFlow(FacesContext context, String definingDocumentId, String id) - Specified by:
- getFlowin class- FlowHandler
 
 - 
addFlowpublic void addFlow(FacesContext context, Flow toAdd) - Specified by:
- addFlowin class- FlowHandler
 
 - 
getCurrentFlowpublic Flow getCurrentFlow(FacesContext context) - Specified by:
- getCurrentFlowin class- FlowHandler
 
 - 
transitionpublic void transition(FacesContext context, Flow sourceFlow, Flow targetFlow, FlowCallNode outboundCallNode, String toViewId) - Specified by:
- transitionin class- FlowHandler
 
 - 
getFacesFlowProviderpublic FacesFlowProvider getFacesFlowProvider(FacesContext facesContext) 
 - 
isActivepublic boolean isActive(FacesContext context, String definingDocumentId, String id) - Specified by:
- isActivein class- FlowHandler
 
 - 
getCurrentFlowScopepublic Map<Object,Object> getCurrentFlowScope() - Specified by:
- getCurrentFlowScopein class- FlowHandler
 
 - 
clientWindowTransitionpublic void clientWindowTransition(FacesContext context) The interpretation done for this issue is this: There are two basic cases: Enter into a flow and return from a flow. - FlowHandler.TO_FLOW_DOCUMENT_ID_REQUEST_PARAM_NAME : value of the toFlowDocumentId property of the navigation case when enter into a flow OR FlowHandler.NULL_FLOW when return from a flow. - FlowHandler.FLOW_ID_REQUEST_PARAM_NAME : value of the fromOutcome property of the navigation case. According to the intention it has multiple options: 1. It can be a flowId, which means enter into a flow. 2. It can be a flow call id, which means enter into a flow. 3. It can be a flow return id, which means return from a flow. - The javadoc of NavigationCase.getToFlowDocumentId() says this: "... If this navigation case represents a flow invocation, this property is the documentId in which the flow whose id is given by the return from getFromOutcome() is defined. Implementations must override this method to return the value defined in the corresponding application configuration resources element. The base implementation returns the empty string. ..." This is consistent with the previous interpretation, but we need to include the case where toFlowDocumentId is FlowHandler.NULL_FLOW too, which is derived implicitly. The key of the trick is override fromOutcome / toFlowDocumentId in the navigation algorithm to indicate when the navigation case is entering into a flow or return from a flow. In that way, it is possible to use ConfigurableNavigationHandler.getNavigationCase(...) to know the "route" using the initial fromOutcome given in FLOW_ID_REQUEST_PARAM_NAME.- Specified by:
- clientWindowTransitionin class- FlowHandler
- Parameters:
- context-
 
 - 
getLastDisplayedViewIdpublic String getLastDisplayedViewId(FacesContext context) - Specified by:
- getLastDisplayedViewIdin class- FlowHandler
 
 - 
pushReturnModepublic void pushReturnMode(FacesContext context) - Specified by:
- pushReturnModein class- FlowHandler
 
 - 
popReturnModepublic void popReturnMode(FacesContext context) - Specified by:
- popReturnModein class- FlowHandler
 
 - 
getActiveFlowspublic List<Flow> getActiveFlows(FacesContext context) 
 - 
getActiveFlowspublic static List<Flow> getActiveFlows(FacesContext facesContext, FlowHandler fh) 
 - 
isListenerForSourcepublic boolean isListenerForSource(Object source) - Specified by:
- isListenerForSourcein interface- SystemEventListener
 
 - 
processEventpublic void processEvent(SystemEvent event) - Specified by:
- processEventin interface- SystemEventListener
 
 
- 
 
-