Class ActionClassEventFilter
java.lang.Object
net.sf.basedb.util.extensions.events.ActionClassEventFilter
- All Implemented Interfaces:
EventFilter
Event filter that only passes on events to extension points with a
given action class.
- Version:
- 2.8
- Author:
- nicklas
- Last modified
- $Date: 2008-09-11 22:08:14 +0200 (to, 11 sep 2008) $
-
Field Summary
-
Constructor Summary
ConstructorDescriptionActionClassEventFilter
(Class<? extends Action> clazz) Create a new action class filter. -
Method Summary
Modifier and TypeMethodDescriptionboolean
shouldSend
(EventType event, ExtensionPoint<?> extensionPoint, Extension<?> extension) Determine if the event should be sent to the event handler or not.
-
Field Details
-
clazz
-
-
Constructor Details
-
ActionClassEventFilter
Create a new action class filter. This filter will pass events for extension points where the class returned byExtensionPoint.getActionClass()
is the same class or a subclass to the class given in this constructor.- Parameters:
clazz
- The class
-
-
Method Details
-
shouldSend
public boolean shouldSend(EventType event, ExtensionPoint<?> extensionPoint, Extension<?> extension) Description copied from interface:EventFilter
Determine if the event should be sent to the event handler or not.- Specified by:
shouldSend
in interfaceEventFilter
- Parameters:
event
- The event that happendextensionPoint
- The extension point that the extension extends, or that the event happened toextension
- The extension the event happend to, or null if the event happended to the extension point- Returns:
- TRUE if the
ExtensionPoint.getActionClass()
is the same class or a subclass of the class given in the constructor
-