|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.webflow.test.MockFlowExecutionContext
public class MockFlowExecutionContext
A stub implementation of the flow execution context interface.
FlowExecutionContext
Constructor Summary | |
---|---|
MockFlowExecutionContext()
Creates a new mock flow execution context -- automatically installs a root flow definition and active flow session. |
|
MockFlowExecutionContext(Flow rootFlow)
Creates a new mock flow execution context for the specified root flow definition. |
Method Summary | |
---|---|
FlowSession |
getActiveSession()
Returns the active flow session of this flow execution. |
MutableAttributeMap |
getAttributeMap()
Returns the mutable execution attribute map. |
AttributeMap |
getAttributes()
Returns runtime execution attributes that may influence the behavior of flow artifacts, such as states and actions. |
java.lang.String |
getCaption()
|
MutableAttributeMap |
getConversationScope()
Returns a mutable map for data held in "conversation scope". |
FlowDefinition |
getDefinition()
Returns the root flow definition associated with this executing flow. |
MockFlowSession |
getMockActiveSession()
Returns the mock active flow session. |
boolean |
isActive()
Is the flow execution active? |
void |
putAttribute(java.lang.String attributeName,
java.lang.Object attributeValue)
Puts a execution attribute into the context. |
void |
setActiveSession(FlowSession activeSession)
Sets the mock session to be the active session. |
void |
setConversationScope(MutableAttributeMap scope)
Sets flow execution (conversational) scope. |
void |
setFlow(Flow rootFlow)
Sets the top-level flow definition. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MockFlowExecutionContext()
public MockFlowExecutionContext(Flow rootFlow)
Method Detail |
---|
public java.lang.String getCaption()
public FlowDefinition getDefinition()
FlowExecutionContext
A call to this method always returns the same flow definition -- the top-level "root" -- no matter what flow may actually be active (for example, if subflows have been spawned).
getDefinition
in interface FlowExecutionContext
public boolean isActive()
FlowExecutionContext
All methods on an active flow execution context can be called successfully. If the flow execution is not active,
a caller cannot access some methods such as FlowExecutionContext.getActiveSession()
.
isActive
in interface FlowExecutionContext
public FlowSession getActiveSession() throws java.lang.IllegalStateException
FlowExecutionContext
getActiveSession
in interface FlowExecutionContext
java.lang.IllegalStateException
- if this flow execution has not been started at all or if this execution has ended
and is no longer actively executingpublic MutableAttributeMap getConversationScope()
FlowExecutionContext
getConversationScope
in interface FlowExecutionContext
public AttributeMap getAttributes()
FlowExecutionContext
getAttributes
in interface FlowExecutionContext
public void setFlow(Flow rootFlow)
public void setActiveSession(FlowSession activeSession)
public void setConversationScope(MutableAttributeMap scope)
public MockFlowSession getMockActiveSession()
public MutableAttributeMap getAttributeMap()
public void putAttribute(java.lang.String attributeName, java.lang.Object attributeValue)
attributeName
- the attribute nameattributeValue
- the attribute value
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |