org.springframework.webflow.executor.jsf
Class FlowNavigationHandlerArgumentExtractor

java.lang.Object
  extended by org.springframework.webflow.executor.jsf.FlowNavigationHandlerArgumentExtractor
All Implemented Interfaces:
FlowExecutorArgumentExtractor

public class FlowNavigationHandlerArgumentExtractor
extends java.lang.Object
implements FlowExecutorArgumentExtractor

An FlowExecutorArgumentExtractor that is aware of JSF outcomes that communicate requests to launch flow executions and signal event in existing flow executions. Designed to be used wih a FlowNavigationHandler. Note: this class only implements flow id and event id extraction methods. A FlowNavigationHandler is not expected to extract a flow execution key, as flow execution restoration is fully handled by the FlowPhaseListener and the JSF restore view phase.

Author:
Keith Donald

Constructor Summary
FlowNavigationHandlerArgumentExtractor()
           
 
Method Summary
 java.lang.String extractEventId(ExternalContext context)
          Extract the flow execution event id from the external context.
 java.lang.String extractFlowExecutionKey(ExternalContext context)
          Extract the flow execution key from the external context.
 java.lang.String extractFlowId(ExternalContext context)
          Extracts the flow id from the external context.
 java.lang.String getFlowIdPrefix()
          Returns the configured prefix for outcome strings that indicate a new flow should be launched.
 boolean isEventIdPresent(ExternalContext context)
          Returns true if the event id is extractable from the context.
 boolean isFlowExecutionKeyPresent(ExternalContext context)
          Returns true if the flow execution key is extractable from the context.
 boolean isFlowIdPresent(ExternalContext context)
          Returns true if the flow id is extractable from the context.
 void setFlowIdPrefix(java.lang.String flowIdPrefix)
          Sets the prefix of an outcome string that indicates a new flow should be launched.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlowNavigationHandlerArgumentExtractor

public FlowNavigationHandlerArgumentExtractor()
Method Detail

getFlowIdPrefix

public java.lang.String getFlowIdPrefix()
Returns the configured prefix for outcome strings that indicate a new flow should be launched.


setFlowIdPrefix

public void setFlowIdPrefix(java.lang.String flowIdPrefix)
Sets the prefix of an outcome string that indicates a new flow should be launched.


isFlowIdPresent

public boolean isFlowIdPresent(ExternalContext context)
                        throws FlowExecutorArgumentExtractionException
Description copied from interface: FlowExecutorArgumentExtractor
Returns true if the flow id is extractable from the context.

Specified by:
isFlowIdPresent in interface FlowExecutorArgumentExtractor
Parameters:
context - the context in which a external user event occured
Returns:
true if extractable, false if not
Throws:
FlowExecutorArgumentExtractionException

extractFlowId

public java.lang.String extractFlowId(ExternalContext context)
                               throws FlowExecutorArgumentExtractionException
Description copied from interface: FlowExecutorArgumentExtractor
Extracts the flow id from the external context.

Specified by:
extractFlowId in interface FlowExecutorArgumentExtractor
Parameters:
context - the context in which a external user event occured
Returns:
the extracted flow id
Throws:
FlowExecutorArgumentExtractionException - if the flow id could not be extracted

isEventIdPresent

public boolean isEventIdPresent(ExternalContext context)
Description copied from interface: FlowExecutorArgumentExtractor
Returns true if the event id is extractable from the context.

Specified by:
isEventIdPresent in interface FlowExecutorArgumentExtractor
Parameters:
context - the context in which a external user event occured
Returns:
true if extractable, false if not

extractEventId

public java.lang.String extractEventId(ExternalContext context)
                                throws FlowExecutorArgumentExtractionException
Description copied from interface: FlowExecutorArgumentExtractor
Extract the flow execution event id from the external context.

This method should only be called if a FlowExecutionKey was successfully extracted, indicating a request to resume a flow execution.

Specified by:
extractEventId in interface FlowExecutorArgumentExtractor
Parameters:
context - the context in which a external user event occured
Returns:
the event id
Throws:
FlowExecutorArgumentExtractionException - if the event id could not be extracted

isFlowExecutionKeyPresent

public boolean isFlowExecutionKeyPresent(ExternalContext context)
Description copied from interface: FlowExecutorArgumentExtractor
Returns true if the flow execution key is extractable from the context.

Specified by:
isFlowExecutionKeyPresent in interface FlowExecutorArgumentExtractor
Parameters:
context - the context in which a external user event occured
Returns:
true if extractable, false if not

extractFlowExecutionKey

public java.lang.String extractFlowExecutionKey(ExternalContext context)
                                         throws FlowExecutorArgumentExtractionException
Description copied from interface: FlowExecutorArgumentExtractor
Extract the flow execution key from the external context.

Specified by:
extractFlowExecutionKey in interface FlowExecutorArgumentExtractor
Parameters:
context - the context in which the external user event occured
Returns:
the obtained flow execution key
Throws:
FlowExecutorArgumentExtractionException - if the flow execution key could not be extracted


Copyright © 2004-2007. All Rights Reserved.