|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.araneaframework.core.BaseComponent
org.araneaframework.core.BaseService
org.araneaframework.core.BaseWidget
org.araneaframework.core.BaseApplicationWidget
org.araneaframework.framework.container.StandardFlowContainerWidget
public class StandardFlowContainerWidget
A FlowContext where the flows are
structured as a stack.
| Nested Class Summary | |
|---|---|
protected static class |
StandardFlowContainerWidget.CallFrame
A widget, configurator and a handler are encapsulated into one logical structure, a call frame. |
protected class |
StandardFlowContainerWidget.CancelClosure
|
protected class |
StandardFlowContainerWidget.FinishClosure
|
protected class |
StandardFlowContainerWidget.FlowReference
Deprecated. |
protected class |
StandardFlowContainerWidget.ReplaceClosure
|
protected class |
StandardFlowContainerWidget.ResetClosure
|
static class |
StandardFlowContainerWidget.StandardTransitionHandler
|
protected class |
StandardFlowContainerWidget.StartClosure
|
| Nested classes/interfaces inherited from class org.araneaframework.core.BaseApplicationWidget |
|---|
BaseApplicationWidget.CompositeImpl, BaseApplicationWidget.ViewableImpl, BaseApplicationWidget.ViewModel |
| Nested classes/interfaces inherited from class org.araneaframework.core.BaseWidget |
|---|
BaseWidget.WidgetImpl |
| Nested classes/interfaces inherited from class org.araneaframework.core.BaseService |
|---|
BaseService.ServiceImpl |
| Nested classes/interfaces inherited from class org.araneaframework.core.BaseComponent |
|---|
BaseComponent.ComponentImpl |
| Nested classes/interfaces inherited from interface org.araneaframework.framework.FlowContext |
|---|
FlowContext.Configurator, FlowContext.Handler, FlowContext.TransitionHandler |
| Nested classes/interfaces inherited from interface org.araneaframework.Widget |
|---|
Widget.Interface |
| Nested classes/interfaces inherited from interface org.araneaframework.core.ApplicationWidget |
|---|
ApplicationWidget.WidgetViewModel |
| Nested classes/interfaces inherited from interface org.araneaframework.core.ApplicationService |
|---|
ApplicationService.ServiceViewModel |
| Nested classes/interfaces inherited from interface org.araneaframework.core.ApplicationComponent |
|---|
ApplicationComponent.ComponentViewModel |
| Nested classes/interfaces inherited from interface org.araneaframework.Composite |
|---|
Composite.CompositeComponent, Composite.CompositeService, Composite.CompositeWidget |
| Nested classes/interfaces inherited from interface org.araneaframework.Viewable |
|---|
Viewable.ViewableComponent, Viewable.ViewableService, Viewable.ViewableWidget |
| Field Summary | |
|---|---|
protected LinkedList |
callStack
The stack of all the calls. |
protected boolean |
finishable
|
protected Widget |
top
The top callable widget. |
| Fields inherited from class org.araneaframework.core.BaseService |
|---|
currentInputData, currentOutputData |
| Fields inherited from interface org.araneaframework.framework.FlowContext |
|---|
TRANSITION_CANCEL, TRANSITION_FINISH, TRANSITION_REPLACE, TRANSITION_RESET, TRANSITION_START |
| Fields inherited from interface org.araneaframework.core.ApplicationWidget |
|---|
EVENT_HANDLER_ID_KEY, EVENT_PARAMETER_KEY, EVENT_PATH_KEY |
| Fields inherited from interface org.araneaframework.core.ApplicationService |
|---|
ACTION_HANDLER_ID_KEY, ACTION_PARAMETER_KEY, ACTION_PATH_KEY |
| Constructor Summary | |
|---|---|
StandardFlowContainerWidget()
|
|
StandardFlowContainerWidget(Widget topWidget)
Constructs a StandardFlowContainerWidget with
topWidget being the first flow on the top of flow stack. |
|
| Method Summary | |
|---|---|
protected void |
addFrameWidget(StandardFlowContainerWidget.CallFrame frame)
Activates the widget represented by the StandardFlowContainerWidget.CallFrame. |
void |
addNestedEnvironmentEntry(ApplicationWidget scope,
Object entryId,
Object envEntry)
Adds an environment entry that is visible in all subflows. |
void |
cancel()
Finishes the current flow passing control back to the calling flow. |
protected void |
destroy()
Destroy callback. |
protected void |
doCancel()
|
protected void |
doFinish(Object returnValue)
|
protected void |
doReplace(Widget flow,
FlowContext.Configurator configurator)
|
protected void |
doReset(EnvironmentAwareCallback callback)
|
protected void |
doStart(Widget flow,
FlowContext.Configurator configurator,
FlowContext.Handler handler)
|
protected void |
doTransition(FlowContext.TransitionHandler transitionHandler,
int transitionType,
org.apache.commons.collections.Closure closure)
|
void |
finish(Object returnValue)
Finishes the current flow passing control back to the calling flow. |
protected StandardFlowContainerWidget.CallFrame |
getActiveCallFrame()
|
Widget |
getActiveFlow()
|
protected LinkedList |
getCallStack()
|
protected Environment |
getChildWidgetEnvironment()
Returns the widget's Environment by default. |
FlowContext.FlowReference |
getCurrentReference()
Deprecated. |
FlowContext.TransitionHandler |
getTransitionHandler()
Returns currently active FlowContext.TransitionHandler. |
protected void |
init()
Init callback. |
boolean |
isNested()
Returns whether the current flow is nested, that is has a caller flow. |
protected StandardFlowContainerWidget.CallFrame |
makeCallFrame(Widget callable,
FlowContext.Configurator configurator,
FlowContext.Handler handler,
StandardFlowContainerWidget.CallFrame previous)
Returns a new CallFrame constructed of the callable, configurator and handler. |
protected void |
putLocalEnvironmentEntries(Map nestedEnvironmentEntries)
|
protected void |
render(OutputData output)
Invokes render on the top frame on the stack of callframes. |
void |
replace(Widget flow)
Destroys the current flow and starts a new one. |
void |
replace(Widget flow,
FlowContext.Configurator configurator)
Destroys the current flow and starts a new one. |
void |
reset(EnvironmentAwareCallback callback)
Resets all currently running flows and calls the callback allowing to start
new flows. |
void |
setFinishable(boolean finishable)
Determines whether this StandardFlowContainerWidget will ever
return control to FlowContext higher in the
Component hierarchy. |
void |
setTop(Widget topWidget)
|
void |
setTransitionHandler(FlowContext.TransitionHandler transitionHandler)
Sets the FlowContext.TransitionHandler which performs the
flow navigation. |
void |
start(Widget flow)
Starts a new nested subflow. |
void |
start(Widget flow,
FlowContext.Configurator configurator,
FlowContext.Handler handler)
Starts a new nested subflow, that can be configured using the configurator. |
void |
start(Widget flow,
FlowContext.Handler handler)
Starts a new nested subflow. |
| Methods inherited from class org.araneaframework.core.BaseApplicationWidget |
|---|
_getComposite, _getViewable, action, addActionListener, addEventListener, addWidget, addWidget, clearActionListeners, clearEventlisteners, clearGlobalEventListener, disableWidget, enableWidget, event, getActionId, getChildEnvironment, getChildren, getEnvironment, getEventId, getViewModel, getWidget, handleAction, handleEvent, handleUpdate, propagate, putViewData, putViewDataOnce, removeActionListener, removeEventListener, removeViewData, removeWidget, setGlobalEventListener, update |
| Methods inherited from class org.araneaframework.core.BaseWidget |
|---|
_getWidget, getInputData, getOutputData, handleWidgetException |
| Methods inherited from class org.araneaframework.core.BaseService |
|---|
_getService, handleServiceException |
| Methods inherited from class org.araneaframework.core.BaseComponent |
|---|
_addComponent, _addComponent, _checkCall, _disableComponent, _enableComponent, _endCall, _endWaitingCall, _getChildren, _getComponent, _getDisabledChildren, _propagate, _relocateComponent, _removeComponent, _setEnvironment, _setScope, _startCall, _startWaitingCall, _strictCheckCall, _strictStartCall, _waitNoCall, disable, enable, getScope, handleException, isAlive, isDead, isInitialized |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.araneaframework.Widget |
|---|
_getWidget |
| Methods inherited from interface org.araneaframework.Service |
|---|
_getService |
| Methods inherited from interface org.araneaframework.Component |
|---|
_getComponent, getEnvironment, getScope, isAlive |
| Field Detail |
|---|
protected LinkedList callStack
protected Widget top
protected boolean finishable
| Constructor Detail |
|---|
public StandardFlowContainerWidget(Widget topWidget)
StandardFlowContainerWidget with
topWidget being the first flow on the top of flow stack.
public StandardFlowContainerWidget()
| Method Detail |
|---|
public void setTop(Widget topWidget)
public void setFinishable(boolean finishable)
StandardFlowContainerWidget will ever
return control to FlowContext higher in the
Component hierarchy. If such
FlowContext exists and finishable is set to true, this
StandardFlowContainerWidget will return control to it when last
running flow inside it is finished (FlowContext.finish(Object)) or
canceled (FlowContext.cancel()). Default is true.
finishable - public void start(Widget flow)
FlowContextFlowContext.finish(Object) or
FlowContext.cancel().
start in interface FlowContext
public void start(Widget flow,
FlowContext.Handler handler)
FlowContextFlowContext.finish(Object) or
FlowContext.cancel(). FlowContext.Handler allows to receive notification, when the subflow ends execution.
start in interface FlowContext
public void start(Widget flow,
FlowContext.Configurator configurator,
FlowContext.Handler handler)
FlowContextFlowContext.finish(Object) or FlowContext.cancel(). FlowContext.Handler allows to receive notification,
when the subflow ends execution.
start in interface FlowContextpublic void replace(Widget flow)
FlowContext
replace in interface FlowContext
public void replace(Widget flow,
FlowContext.Configurator configurator)
FlowContext
replace in interface FlowContextpublic void finish(Object returnValue)
FlowContext
finish in interface FlowContextpublic void cancel()
FlowContext
cancel in interface FlowContextpublic void reset(EnvironmentAwareCallback callback)
FlowContextcallback allowing to start
new flows. Useful e.g. in a menu, when selecting a new menu item and reseting the old
stack.
reset in interface FlowContextpublic FlowContext.TransitionHandler getTransitionHandler()
FlowContextFlowContext.TransitionHandler. If the
most current child is a FlowContextWidget, it will take its
currenty active FlowContext.TransitionHandler (recursively)
(since 1.2.2).
getTransitionHandler in interface FlowContextpublic void setTransitionHandler(FlowContext.TransitionHandler transitionHandler)
FlowContextFlowContext.TransitionHandler which performs the
flow navigation.
setTransitionHandler in interface FlowContextpublic FlowContext.FlowReference getCurrentReference()
FlowContext
getCurrentReference in interface FlowContext
public void addNestedEnvironmentEntry(ApplicationWidget scope,
Object entryId,
Object envEntry)
FlowContext
addNestedEnvironmentEntry in interface FlowContextpublic boolean isNested()
FlowContext
isNested in interface FlowContext
protected void init()
throws Exception
BaseComponent
init in class BaseComponentException - Any runtime exception that may occur.
protected void destroy()
throws Exception
BaseComponent
destroy in class BaseComponentException - Any runtime exception that may occur.
protected void render(OutputData output)
throws Exception
render in class BaseApplicationWidgetExceptionprotected void putLocalEnvironmentEntries(Map nestedEnvironmentEntries)
protected Environment getChildWidgetEnvironment()
throws Exception
BaseApplicationWidget
getChildWidgetEnvironment in class BaseApplicationWidgetException
protected StandardFlowContainerWidget.CallFrame makeCallFrame(Widget callable,
FlowContext.Configurator configurator,
FlowContext.Handler handler,
StandardFlowContainerWidget.CallFrame previous)
protected StandardFlowContainerWidget.CallFrame getActiveCallFrame()
public Widget getActiveFlow()
protected void addFrameWidget(StandardFlowContainerWidget.CallFrame frame)
StandardFlowContainerWidget.CallFrame.
protected void doTransition(FlowContext.TransitionHandler transitionHandler,
int transitionType,
org.apache.commons.collections.Closure closure)
protected void doReset(EnvironmentAwareCallback callback)
protected void doStart(Widget flow,
FlowContext.Configurator configurator,
FlowContext.Handler handler)
protected void doFinish(Object returnValue)
protected void doCancel()
protected void doReplace(Widget flow,
FlowContext.Configurator configurator)
protected LinkedList getCallStack()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||