Class ScenarioSimulationEventHandler
- java.lang.Object
-
- org.drools.workbench.screens.scenariosimulation.client.commands.ScenarioSimulationEventHandler
-
- All Implemented Interfaces:
com.google.gwt.event.shared.EventHandler,AppendColumnEventHandler,AppendRowEventHandler,DeleteColumnEventHandler,DeleteRowEventHandler,DisableTestToolsEventHandler,DuplicateInstanceEventHandler,DuplicateRowEventHandler,EnableTestToolsEventHandler,ImportEventHandler,InsertColumnEventHandler,InsertRowEventHandler,PrependColumnEventHandler,PrependRowEventHandler,RedoEventHandler,ReloadTestToolsEventHandler,RunSingleScenarioEventHandler,ScenarioGridReloadEventHandler,ScenarioNotificationEventHandler,SetGridCellValueEventHandler,SetHeaderCellValueEventHandler,SetInstanceHeaderEventHandler,SetPropertyHeaderEventHandler,UndoEventHandler,UnsupportedDMNEventHandler,UpdateSettingsDataEventHandler,ValidateSimulationEventHandler
@Dependent public class ScenarioSimulationEventHandler extends Object implements AppendColumnEventHandler, AppendRowEventHandler, DeleteColumnEventHandler, DeleteRowEventHandler, DisableTestToolsEventHandler, DuplicateInstanceEventHandler, DuplicateRowEventHandler, EnableTestToolsEventHandler, ImportEventHandler, InsertColumnEventHandler, InsertRowEventHandler, PrependColumnEventHandler, PrependRowEventHandler, RedoEventHandler, ReloadTestToolsEventHandler, RunSingleScenarioEventHandler, ScenarioGridReloadEventHandler, ScenarioNotificationEventHandler, SetGridCellValueEventHandler, SetHeaderCellValueEventHandler, SetInstanceHeaderEventHandler, SetPropertyHeaderEventHandler, UndoEventHandler, UnsupportedDMNEventHandler, UpdateSettingsDataEventHandler, ValidateSimulationEventHandler
This class is meant to be a centralized listener for events fired up by UI, responding to them issuing specificCommands.It follows the GWT standard Event/Handler mechanism
-
-
Field Summary
Fields Modifier and Type Field Description protected ConfirmPopupPresenterconfirmPopupPresenterprotected ScenarioSimulationContextcontextprotected DeletePopupPresenterdeletePopupPresenterprotected com.google.gwt.event.shared.EventBuseventBusprotected FileUploadPopupPresenterfileUploadPopupPresenterprotected List<com.google.gwt.event.shared.HandlerRegistration>handlerRegistrationListprotected javax.enterprise.event.Event<org.uberfire.workbench.events.NotificationEvent>notificationEventprotected PreserveDeletePopupPresenterpreserveDeletePopupPresenterprotected ScenarioCommandManagerscenarioCommandManagerprotected ScenarioCommandRegistryManagerscenarioCommandRegistryManagerprotected ScenarioSimulationEditorPresenterscenarioSimulationEditorPresenter
-
Constructor Summary
Constructors Constructor Description ScenarioSimulationEventHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcommonExecution(AbstractScenarioSimulationCommand command, boolean focusGridAfterExecution)Common method to execute the givenCommandinside the givenScenarioSimulationContextIf successful, it adds the command to theScenarioCommandRegistry, otherwise it fire a newScenarioNotificationEventwith error detailsprotected voidcommonNotifyError(org.kie.workbench.common.command.client.CommandResult<ScenarioSimulationViolation> status, String operation)voidonEvent(AppendColumnEvent event)voidonEvent(AppendRowEvent event)voidonEvent(DeleteColumnEvent event)voidonEvent(DeleteRowEvent event)voidonEvent(DisableTestToolsEvent event)voidonEvent(DuplicateInstanceEvent event)voidonEvent(DuplicateRowEvent event)voidonEvent(EnableTestToolsEvent event)voidonEvent(ImportEvent event)voidonEvent(InsertColumnEvent event)voidonEvent(InsertRowEvent event)voidonEvent(PrependColumnEvent event)voidonEvent(PrependRowEvent event)voidonEvent(RedoEvent event)voidonEvent(ReloadTestToolsEvent event)voidonEvent(RunSingleScenarioEvent event)voidonEvent(ScenarioGridReloadEvent event)voidonEvent(ScenarioNotificationEvent event)voidonEvent(SetGridCellValueEvent event)voidonEvent(SetHeaderCellValueEvent event)voidonEvent(SetInstanceHeaderEvent event)voidonEvent(SetPropertyHeaderEvent event)voidonEvent(UndoEvent event)voidonEvent(UnsupportedDMNEvent event)voidonEvent(UpdateSettingsDataEvent updateSettingsDataEvent)voidonEvent(ValidateSimulationEvent event)protected voidregisterHandlers()voidsetConfirmPopupPresenter(ConfirmPopupPresenter confirmPopupPresenter)voidsetContext(ScenarioSimulationContext context)voidsetDeletePopupPresenter(DeletePopupPresenter deletePopupPresenter)voidsetEventBus(com.google.gwt.event.shared.EventBus eventBus)voidsetFileUploadPopupPresenter(FileUploadPopupPresenter fileUploadPopupPresenter)voidsetNotificationEvent(javax.enterprise.event.Event<org.uberfire.workbench.events.NotificationEvent> notificationEvent)voidsetPreserveDeletePopupPresenter(PreserveDeletePopupPresenter preserveDeletePopupPresenter)voidsetScenarioCommandManager(ScenarioCommandManager scenarioCommandManager)voidsetScenarioCommandRegistryManager(ScenarioCommandRegistryManager scenarioCommandRegistryManager)voidsetScenarioSimulationPresenter(ScenarioSimulationEditorPresenter scenarioSimulationEditorPresenter)voidunregisterHandlers()
-
-
-
Field Detail
-
deletePopupPresenter
protected DeletePopupPresenter deletePopupPresenter
-
preserveDeletePopupPresenter
protected PreserveDeletePopupPresenter preserveDeletePopupPresenter
-
confirmPopupPresenter
protected ConfirmPopupPresenter confirmPopupPresenter
-
fileUploadPopupPresenter
protected FileUploadPopupPresenter fileUploadPopupPresenter
-
eventBus
protected com.google.gwt.event.shared.EventBus eventBus
-
handlerRegistrationList
protected List<com.google.gwt.event.shared.HandlerRegistration> handlerRegistrationList
-
notificationEvent
protected javax.enterprise.event.Event<org.uberfire.workbench.events.NotificationEvent> notificationEvent
-
scenarioSimulationEditorPresenter
protected ScenarioSimulationEditorPresenter scenarioSimulationEditorPresenter
-
scenarioCommandRegistryManager
protected ScenarioCommandRegistryManager scenarioCommandRegistryManager
-
scenarioCommandManager
protected ScenarioCommandManager scenarioCommandManager
-
context
protected ScenarioSimulationContext context
-
-
Method Detail
-
setEventBus
public void setEventBus(com.google.gwt.event.shared.EventBus eventBus)
-
setDeletePopupPresenter
public void setDeletePopupPresenter(DeletePopupPresenter deletePopupPresenter)
-
setPreserveDeletePopupPresenter
public void setPreserveDeletePopupPresenter(PreserveDeletePopupPresenter preserveDeletePopupPresenter)
-
setConfirmPopupPresenter
public void setConfirmPopupPresenter(ConfirmPopupPresenter confirmPopupPresenter)
-
setFileUploadPopupPresenter
public void setFileUploadPopupPresenter(FileUploadPopupPresenter fileUploadPopupPresenter)
-
setNotificationEvent
public void setNotificationEvent(javax.enterprise.event.Event<org.uberfire.workbench.events.NotificationEvent> notificationEvent)
-
setScenarioSimulationPresenter
public void setScenarioSimulationPresenter(ScenarioSimulationEditorPresenter scenarioSimulationEditorPresenter)
-
setScenarioCommandRegistryManager
public void setScenarioCommandRegistryManager(ScenarioCommandRegistryManager scenarioCommandRegistryManager)
-
setScenarioCommandManager
public void setScenarioCommandManager(ScenarioCommandManager scenarioCommandManager)
-
setContext
public void setContext(ScenarioSimulationContext context)
-
unregisterHandlers
@PreDestroy public void unregisterHandlers()
-
onEvent
public void onEvent(AppendColumnEvent event)
- Specified by:
onEventin interfaceAppendColumnEventHandler
-
onEvent
public void onEvent(AppendRowEvent event)
- Specified by:
onEventin interfaceAppendRowEventHandler
-
onEvent
public void onEvent(DeleteColumnEvent event)
- Specified by:
onEventin interfaceDeleteColumnEventHandler
-
onEvent
public void onEvent(DeleteRowEvent event)
- Specified by:
onEventin interfaceDeleteRowEventHandler
-
onEvent
public void onEvent(DisableTestToolsEvent event)
- Specified by:
onEventin interfaceDisableTestToolsEventHandler
-
onEvent
public void onEvent(DuplicateInstanceEvent event)
- Specified by:
onEventin interfaceDuplicateInstanceEventHandler
-
onEvent
public void onEvent(DuplicateRowEvent event)
- Specified by:
onEventin interfaceDuplicateRowEventHandler
-
onEvent
public void onEvent(EnableTestToolsEvent event)
- Specified by:
onEventin interfaceEnableTestToolsEventHandler
-
onEvent
public void onEvent(ImportEvent event)
- Specified by:
onEventin interfaceImportEventHandler
-
onEvent
public void onEvent(InsertColumnEvent event)
- Specified by:
onEventin interfaceInsertColumnEventHandler
-
onEvent
public void onEvent(InsertRowEvent event)
- Specified by:
onEventin interfaceInsertRowEventHandler
-
onEvent
public void onEvent(PrependColumnEvent event)
- Specified by:
onEventin interfacePrependColumnEventHandler
-
onEvent
public void onEvent(PrependRowEvent event)
- Specified by:
onEventin interfacePrependRowEventHandler
-
onEvent
public void onEvent(RedoEvent event)
- Specified by:
onEventin interfaceRedoEventHandler
-
onEvent
public void onEvent(ReloadTestToolsEvent event)
- Specified by:
onEventin interfaceReloadTestToolsEventHandler
-
onEvent
public void onEvent(RunSingleScenarioEvent event)
- Specified by:
onEventin interfaceRunSingleScenarioEventHandler
-
onEvent
public void onEvent(ScenarioGridReloadEvent event)
- Specified by:
onEventin interfaceScenarioGridReloadEventHandler
-
onEvent
public void onEvent(ScenarioNotificationEvent event)
- Specified by:
onEventin interfaceScenarioNotificationEventHandler
-
onEvent
public void onEvent(SetGridCellValueEvent event)
- Specified by:
onEventin interfaceSetGridCellValueEventHandler
-
onEvent
public void onEvent(SetHeaderCellValueEvent event)
- Specified by:
onEventin interfaceSetHeaderCellValueEventHandler
-
onEvent
public void onEvent(SetInstanceHeaderEvent event)
- Specified by:
onEventin interfaceSetInstanceHeaderEventHandler
-
onEvent
public void onEvent(SetPropertyHeaderEvent event)
- Specified by:
onEventin interfaceSetPropertyHeaderEventHandler
-
onEvent
public void onEvent(UndoEvent event)
- Specified by:
onEventin interfaceUndoEventHandler
-
onEvent
public void onEvent(UnsupportedDMNEvent event)
- Specified by:
onEventin interfaceUnsupportedDMNEventHandler
-
onEvent
public void onEvent(UpdateSettingsDataEvent updateSettingsDataEvent)
- Specified by:
onEventin interfaceUpdateSettingsDataEventHandler
-
onEvent
public void onEvent(ValidateSimulationEvent event)
- Specified by:
onEventin interfaceValidateSimulationEventHandler
-
commonExecution
protected void commonExecution(AbstractScenarioSimulationCommand command, boolean focusGridAfterExecution)
Common method to execute the givenCommandinside the givenScenarioSimulationContextIf successful, it adds the command to theScenarioCommandRegistry, otherwise it fire a newScenarioNotificationEventwith error details- Parameters:
command-focusGridAfterExecution-
-
commonNotifyError
protected void commonNotifyError(org.kie.workbench.common.command.client.CommandResult<ScenarioSimulationViolation> status, String operation)
-
registerHandlers
protected void registerHandlers()
-
-