Class ModelEventHandler<T extends PO>
- java.lang.Object
-
- org.adempiere.base.event.annotations.BaseEventHandler
-
- org.adempiere.base.event.annotations.ModelEventHandler<T>
-
- All Implemented Interfaces:
org.osgi.service.event.EventHandler
public final class ModelEventHandler<T extends PO> extends BaseEventHandler
Event handler for PO related events (po_before_change, doc_before_complete, etc). Delegate toModelEventDelegate
instance created for each event call- Author:
- hengsin
-
-
Field Summary
-
Fields inherited from class org.adempiere.base.event.annotations.BaseEventHandler
eventTopicMap
-
-
Constructor Summary
Constructors Constructor Description ModelEventHandler(Class<T> modelClassType, Class<? extends ModelEventDelegate<T>> delegateClass, BiFunction<T,org.osgi.service.event.Event,? extends ModelEventDelegate<T>> supplier)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
handleEvent(org.osgi.service.event.Event event)
protected EventDelegate
newEventDelegate(org.osgi.service.event.Event event)
create new instance of event delegate-
Methods inherited from class org.adempiere.base.event.annotations.BaseEventHandler
createTopicMap, getFilter, getTopics, setEventPropertyFilter, setFilter
-
-
-
-
Constructor Detail
-
ModelEventHandler
public ModelEventHandler(Class<T> modelClassType, Class<? extends ModelEventDelegate<T>> delegateClass, BiFunction<T,org.osgi.service.event.Event,? extends ModelEventDelegate<T>> supplier)
- Parameters:
modelClassType
-
-
-
Method Detail
-
handleEvent
public void handleEvent(org.osgi.service.event.Event event)
- Specified by:
handleEvent
in interfaceorg.osgi.service.event.EventHandler
- Overrides:
handleEvent
in classBaseEventHandler
-
newEventDelegate
protected EventDelegate newEventDelegate(org.osgi.service.event.Event event)
Description copied from class:BaseEventHandler
create new instance of event delegate- Specified by:
newEventDelegate
in classBaseEventHandler
- Returns:
EventDelegate
-
-