Class EventHandlerRegistry
- java.lang.Object
-
- org.nuxeo.ecm.automation.core.events.EventHandlerRegistry
-
public class EventHandlerRegistry extends Object
TODO: This service should be moved in another project, and renamed since it's a service, not a simple registry...- Author:
- Bogdan Stefanescu
-
-
Field Summary
Fields Modifier and Type Field Description protected EventRegistryhandlersprotected EventRegistrypchandlersprotected AutomationServicesvc
-
Constructor Summary
Constructors Constructor Description EventHandlerRegistry(AutomationService svc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanacceptEvent(Event event, List<EventHandler> handlers)voidclear()protected OperationContextgetContext(EventContext ectx)List<EventHandler>getEventHandlers(String eventId)List<EventHandler>getPostCommitEventHandlers(String eventId)Set<String>getPostCommitEventNames()voidhandleEvent(Event event, List<EventHandler> handlers, boolean saveSession)protected OperationContextopen(Event event)voidputEventHandler(EventHandler handler)voidputPostCommitEventHandler(EventHandler handler)voidremoveEventHandler(EventHandler handler)voidremovePostCommitEventHandler(EventHandler handler)
-
-
-
Field Detail
-
svc
protected final AutomationService svc
-
handlers
protected EventRegistry handlers
-
pchandlers
protected EventRegistry pchandlers
-
-
Constructor Detail
-
EventHandlerRegistry
public EventHandlerRegistry(AutomationService svc)
-
-
Method Detail
-
getEventHandlers
public List<EventHandler> getEventHandlers(String eventId)
-
getPostCommitEventHandlers
public List<EventHandler> getPostCommitEventHandlers(String eventId)
-
putEventHandler
public void putEventHandler(EventHandler handler)
-
putPostCommitEventHandler
public void putPostCommitEventHandler(EventHandler handler)
-
removePostCommitEventHandler
public void removePostCommitEventHandler(EventHandler handler)
-
removeEventHandler
public void removeEventHandler(EventHandler handler)
-
clear
public void clear()
-
acceptEvent
public boolean acceptEvent(Event event, List<EventHandler> handlers)
-
open
protected OperationContext open(Event event)
-
handleEvent
public void handleEvent(Event event, List<EventHandler> handlers, boolean saveSession)
-
getContext
protected OperationContext getContext(EventContext ectx)
-
-