org.ploin.web.flow
Class FlowControl

java.lang.Object
  extended by org.ploin.web.flow.FlowControl
All Implemented Interfaces:
Serializable

public class FlowControl
extends Object
implements Serializable

$LastChangedBy: r.reiz $
$Revision: 105 $
$Date: 2010-03-17 15:40:49 +0100 (Wed, 17 Mar 2010) $

See Also:
Serialized Form

Field Summary
static String JSF_PHASE
           
static String LIFECYCLE_ID
           
static String PLOIN_FACES_FLOW_PATH
           
static String PLOIN_FACES_FROM_VIEW_ID
           
static String PLOIN_FACES_TIME
           
static String PLOIN_FLOWS
           
static String PLOIN_PLOIN
           
 
Constructor Summary
FlowControl()
           
 
Method Summary
 Flow getFlowById(String flowId, List<Flow> flows)
           
 String getFlowIdForViewInFlowPath(List<Flow> flows, Set<String> flowPath, String goToViewId)
           
 boolean isLeavingFlow(Set<String> set, String fromViewId, String toViewId)
           
 boolean isStayInFlow(Set<String> set, String fromViewId, String toViewId)
           
 boolean isViewInFlowPath(List<Flow> flows, Set<String> flowPath, String goToViewId)
           
 boolean isViewInFlowPathPeek(List<Flow> flows, String flowId, String goToViewId)
           
 boolean isViewInSet(Set<String> set, String view)
          This methode check if a given "view" is in the given set of viewIds.
 boolean isViewInSubFlows(List<Flow> flows, Flow actualFlow, String goToViewId)
          This methode checks if the goToViewId is is a subFlow
 void leaveFlow(Flow flow, javax.faces.context.FacesContext fc, javax.servlet.http.HttpSession session)
           
 void leaveFlow(List<Flow> flows, String flowId, javax.faces.context.FacesContext fc, javax.servlet.http.HttpSession session)
           
 List<Flow> readFlows()
          This method read the "ploinFlows.xml" and build an object-graph.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PLOIN_FLOWS

public static final String PLOIN_FLOWS
See Also:
Constant Field Values

PLOIN_PLOIN

public static final String PLOIN_PLOIN
See Also:
Constant Field Values

PLOIN_FACES_TIME

public static final String PLOIN_FACES_TIME
See Also:
Constant Field Values

PLOIN_FACES_FROM_VIEW_ID

public static final String PLOIN_FACES_FROM_VIEW_ID
See Also:
Constant Field Values

PLOIN_FACES_FLOW_PATH

public static final String PLOIN_FACES_FLOW_PATH
See Also:
Constant Field Values

JSF_PHASE

public static final String JSF_PHASE
See Also:
Constant Field Values

LIFECYCLE_ID

public static final String LIFECYCLE_ID
See Also:
Constant Field Values
Constructor Detail

FlowControl

public FlowControl()
Method Detail

readFlows

public List<Flow> readFlows()
This method read the "ploinFlows.xml" and build an object-graph. The object-graph is a List of Flow-Ojbects.

Returns:
List, object-graph
See Also:
Flow

isViewInSet

public boolean isViewInSet(Set<String> set,
                           String view)
This methode check if a given "view" is in the given set of viewIds.

Parameters:
set, - a set with viewIds (from the ploinFlows.xml)
view, - the given view (JSF-Lifecycle)
Returns:
true/false

isLeavingFlow

public boolean isLeavingFlow(Set<String> set,
                             String fromViewId,
                             String toViewId)

isStayInFlow

public boolean isStayInFlow(Set<String> set,
                            String fromViewId,
                            String toViewId)

isViewInSubFlows

public boolean isViewInSubFlows(List<Flow> flows,
                                Flow actualFlow,
                                String goToViewId)
This methode checks if the goToViewId is is a subFlow

Parameters:
flows - - all Flows defined in the ploinFlows.xml
actualFlow - - the actual flow where you are
goToViewId - - the viewId where to go.
Returns:
true/false

isViewInFlowPathPeek

public boolean isViewInFlowPathPeek(List<Flow> flows,
                                    String flowId,
                                    String goToViewId)

getFlowIdForViewInFlowPath

public String getFlowIdForViewInFlowPath(List<Flow> flows,
                                         Set<String> flowPath,
                                         String goToViewId)

isViewInFlowPath

public boolean isViewInFlowPath(List<Flow> flows,
                                Set<String> flowPath,
                                String goToViewId)

getFlowById

public Flow getFlowById(String flowId,
                        List<Flow> flows)

leaveFlow

public void leaveFlow(List<Flow> flows,
                      String flowId,
                      javax.faces.context.FacesContext fc,
                      javax.servlet.http.HttpSession session)

leaveFlow

public void leaveFlow(Flow flow,
                      javax.faces.context.FacesContext fc,
                      javax.servlet.http.HttpSession session)


Copyright © 2012 PLOIN GmbH. All Rights Reserved.