org.araneaframework.framework.core
Class BaseFilterWidget
java.lang.Object
org.araneaframework.core.BaseComponent
org.araneaframework.core.BaseService
org.araneaframework.core.BaseWidget
org.araneaframework.framework.core.BaseFilterWidget
- All Implemented Interfaces:
- Component, FilterWidget, Serializable, Service, Widget
- Direct Known Subclasses:
- NopFilterWidget, SpringOptionalFilterWidget, StandardClientStateFilterWidget, StandardConfirmationFilterWidget, StandardContextMapFilterWidget, StandardFilterChainWidget, StandardMessagingFilterWidget, StandardPopupFilterWidget, StandardRedirectingFilterWidget, StandardRenderStatusResettingFilterWidget, StandardTransactionFilterWidget, StandardUpdateRegionFilterWidget, StandardWidgetAdapterService, StandardWindowScrollPositionFilterWidget
- public class BaseFilterWidget
- extends BaseWidget
- implements FilterWidget
A filter widget is a Widget which filters requests to its child widget. A filter
overrides one of the methods:
action(Path, InputData, OutputData)
update(InputData)
event(Path, InputData)
render(OutputData)
and does the filtering by allowing the action to be invoked on the child or not. This class is a
skeleton which lets all the requests through, sets the child, handles the initilization and
destroying of the child.
The child is initialized with getChildWidgetEnvironment() which by default returns
this component's Environment. For alternate environments it should be overridden.
- Author:
- "Toomas Römer"
- See Also:
- Serialized Form
| 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, getEnvironment, getScope, handleException, isAlive, isDead, isInitialized |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
childWidget
protected Widget childWidget
BaseFilterWidget
public BaseFilterWidget()
BaseFilterWidget
public BaseFilterWidget(Widget childWidget)
setChildWidget
public void setChildWidget(Widget childWidget)
- Sets the child to childWidget.
- Specified by:
setChildWidget in interface FilterWidget
getChildWidget
public Widget getChildWidget()
init
protected void init()
throws Exception
- Description copied from class:
BaseComponent
- Init callback. Gets called when the component is initilized.
- Overrides:
init in class BaseComponent
- Throws:
Exception - Any runtime exception that may occur.
propagate
protected void propagate(Message message)
throws Exception
- Description copied from class:
BaseComponent
- Forwards the
message to the component and to all of its
children components.
- Overrides:
propagate in class BaseComponent
- Parameters:
message - A message to forward.
- Throws:
Exception - Any runtime exception that may occur.
action
protected void action(Path path,
InputData input,
OutputData output)
throws Exception
- Description copied from class:
BaseService
- Services provide their services through the
action(...)
method. An implementation of a non-composite service like
BaseService uses the action method to hook in the middle of
the action routing and provide filtering, logging etc.
- Overrides:
action in class BaseService
- Parameters:
path - The path of the component to whom the action is targeted.input - The request data.output - The response data.
- Throws:
Exception - Any runtime exception that may occur.
update
protected void update(InputData input)
throws Exception
- Overrides:
update in class BaseWidget
- Throws:
Exception
event
protected void event(Path path,
InputData input)
throws Exception
- Overrides:
event in class BaseWidget
- Throws:
Exception
render
protected void render(OutputData output)
throws Exception
- Overrides:
render in class BaseWidget
- Throws:
Exception
destroy
protected void destroy()
throws Exception
- Description copied from class:
BaseComponent
- Destroy callback. Gets called when the component is destroyed.
- Overrides:
destroy in class BaseComponent
- Throws:
Exception - Any runtime exception that may occur.
getChildWidgetEnvironment
protected Environment getChildWidgetEnvironment()
- By default returns the widget's Environment. The child is
initilized with the return value of this method.