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 EventRegistry
handlers
protected EventRegistry
pchandlers
protected AutomationService
svc
-
Constructor Summary
Constructors Constructor Description EventHandlerRegistry(AutomationService svc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
acceptEvent(Event event, List<EventHandler> handlers)
void
clear()
protected OperationContext
getContext(EventContext ectx)
List<EventHandler>
getEventHandlers(String eventId)
List<EventHandler>
getPostCommitEventHandlers(String eventId)
Set<String>
getPostCommitEventNames()
void
handleEvent(Event event, List<EventHandler> handlers, boolean saveSession)
protected OperationContext
open(Event event)
void
putEventHandler(EventHandler handler)
void
putPostCommitEventHandler(EventHandler handler)
void
removeEventHandler(EventHandler handler)
void
removePostCommitEventHandler(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)
-
-