@Dependent public class ScenarioSimulationEditorPresenter extends Object
Modifier and Type | Field and Description |
---|---|
protected ScenarioSimulationContext |
context |
protected DataManagementStrategy |
dataManagementStrategy |
protected org.uberfire.workbench.model.menu.MenuItem |
downloadMenuItem |
protected com.google.gwt.event.shared.EventBus |
eventBus |
protected org.uberfire.workbench.model.menu.MenuItem |
exportToCSVMenuItem |
static String |
IDENTIFIER |
protected org.uberfire.workbench.model.menu.MenuItem |
importMenuItem |
protected org.drools.scenariosimulation.api.model.ScenarioSimulationModel |
model |
protected String |
packageName |
protected org.uberfire.backend.vfs.ObservablePath |
path |
protected org.uberfire.client.mvp.PlaceManager |
placeManager |
protected org.uberfire.workbench.model.menu.MenuItem |
redoMenuItem |
protected org.uberfire.workbench.model.menu.MenuItem |
runScenarioMenuItem |
protected ScenarioGridWidget |
scenarioBackgroundGridWidget |
protected ScenarioGridWidget |
scenarioMainGridWidget |
protected long |
scenarioPresenterId |
protected ScenarioSimulationEditorWrapper |
scenarioSimulationEditorWrapper |
protected org.uberfire.workbench.model.menu.MenuItem |
undoMenuItem |
Constructor and Description |
---|
ScenarioSimulationEditorPresenter() |
ScenarioSimulationEditorPresenter(ScenarioSimulationProducer scenarioSimulationProducer,
ScenarioSimulationResourceType type,
org.uberfire.client.mvp.PlaceManager placeManager,
AbstractScenarioSimulationDocksHandler abstractScenarioSimulationDocksHandler,
org.uberfire.ext.editor.commons.client.file.exports.TextFileExport textFileExport,
ConfirmPopupPresenter confirmPopupPresenter) |
Modifier and Type | Method and Description |
---|---|
void |
addCommonActions(org.kie.workbench.common.widgets.client.menu.FileMenuBuilder fileMenuBuilder,
org.uberfire.workbench.model.menu.MenuItem versionMenuItem,
org.uberfire.workbench.model.menu.MenuItem alertsButtonMenuItem) |
void |
addDownloadMenuItem(org.kie.workbench.common.widgets.client.menu.FileMenuBuilder fileMenuBuilder,
Supplier<org.uberfire.backend.vfs.Path> pathSupplier) |
protected void |
cleanReadOnlyColumn(org.drools.scenariosimulation.api.model.AbstractScesimModel abstractScesimModel)
Read only columns should not contains any values
|
protected void |
clearTestToolsStatus() |
void |
expandToolsDock() |
ScenarioSimulationContext |
getContext() |
DataManagementStrategy |
getDataManagementStrategy() |
com.google.gwt.event.shared.EventBus |
getEventBus() |
org.jboss.errai.common.client.api.RemoteCallback<Object> |
getExportCallBack() |
protected String |
getFileDownloadURL(Supplier<org.uberfire.backend.vfs.Path> pathSupplier) |
protected org.jboss.errai.common.client.api.RemoteCallback<org.drools.scenariosimulation.api.model.AbstractScesimModel> |
getImportCallBack() |
protected org.jboss.errai.common.client.api.ErrorCallback<Object> |
getImportErrorCallback() |
String |
getJsonModel(org.drools.scenariosimulation.api.model.ScenarioSimulationModel model) |
org.drools.scenariosimulation.api.model.ScenarioSimulationModel |
getModel() |
void |
getModelSuccessCallbackMethod(DataManagementStrategy dataManagementStrategy,
org.drools.scenariosimulation.api.model.ScenarioSimulationModel model) |
org.uberfire.backend.vfs.ObservablePath |
getPath() |
org.uberfire.mvp.Command |
getPopulateTestToolsCommand() |
protected org.jboss.errai.common.client.api.RemoteCallback<SimulationRunResult> |
getRefreshModelCallback() |
ScenarioSimulationResourceType |
getType() |
protected org.uberfire.mvp.Command |
getValidateCommand() |
protected org.jboss.errai.common.client.api.RemoteCallback<List<FactMappingValidationError>> |
getValidationCallback() |
org.jboss.errai.common.client.api.ErrorCallback<Boolean> |
getValidationFailedCallback() |
ScenarioSimulationView |
getView() |
void |
hideDocks() |
boolean |
isDirty() |
protected boolean |
isUberfireDocksInteractionEventToManage(org.uberfire.client.workbench.docks.UberfireDocksInteractionEvent uberfireDocksInteractionEvent)
Method to verify if the given
UberfireDocksInteractionEvent is to be processed by current instance. |
void |
loadContent() |
void |
makeMenuBar(org.kie.workbench.common.widgets.client.menu.FileMenuBuilder fileMenuBuilder)
If you want to customize the menu override this method.
|
void |
onBackgroundTabSelected() |
void |
onClose() |
protected void |
onDownload(Supplier<org.uberfire.backend.vfs.Path> pathSupplier) |
void |
onEditTabSelected() |
protected void |
onExportToCsv() |
void |
onImport(String fileContents,
GridWidget gridWidget) |
void |
onImportsTabSelected() |
void |
onOverviewSelected() |
void |
onRedo() |
void |
onRunScenario() |
void |
onRunScenario(List<Integer> indexOfScenarioToRun) |
void |
onUberfireDocksInteractionEvent(org.uberfire.client.workbench.docks.UberfireDocksInteractionEvent uberfireDocksInteractionEvent) |
void |
onUndo() |
protected void |
open(String downloadURL) |
void |
populateRightDocks(String identifier) |
protected void |
refreshModelContent(SimulationRunResult newData) |
protected void |
registerTestToolsCallback() |
void |
reloadTestTools(boolean disable)
To be called to force test tools panel reload
|
protected void |
resetDocks()
It resets the status of all Docks widgets present in ScenarioSimulation.
|
void |
selectBackgroundTab() |
void |
selectSimulationTab() |
void |
sendNotification(String text,
org.uberfire.workbench.events.NotificationEvent.NotificationType type) |
void |
setCheatSheet(CheatSheetView.Presenter presenter) |
void |
setItemMenuEnabled(boolean enabled) |
void |
setPackageName(String packageName) |
void |
setPath(org.uberfire.backend.vfs.ObservablePath path) |
void |
setRedoButtonEnabledStatus(boolean enabled) |
void |
setSettings(SettingsView.Presenter presenter) |
void |
setTestTools(TestToolsView.Presenter presenter) |
void |
setUndoButtonEnabledStatus(boolean enabled) |
void |
setWrapper(ScenarioSimulationEditorWrapper scenarioSimulationEditorWrapper) |
void |
showDocks(org.uberfire.client.mvp.PlaceStatus status) |
protected void |
showImportDialog() |
protected void |
unRegisterTestToolsCallback() |
void |
validateSimulation() |
public static final String IDENTIFIER
protected String packageName
protected org.uberfire.backend.vfs.ObservablePath path
protected com.google.gwt.event.shared.EventBus eventBus
protected ScenarioGridWidget scenarioMainGridWidget
protected ScenarioGridWidget scenarioBackgroundGridWidget
protected org.uberfire.client.mvp.PlaceManager placeManager
protected DataManagementStrategy dataManagementStrategy
protected ScenarioSimulationContext context
protected org.drools.scenariosimulation.api.model.ScenarioSimulationModel model
protected long scenarioPresenterId
protected org.uberfire.workbench.model.menu.MenuItem undoMenuItem
protected org.uberfire.workbench.model.menu.MenuItem redoMenuItem
protected org.uberfire.workbench.model.menu.MenuItem runScenarioMenuItem
protected org.uberfire.workbench.model.menu.MenuItem exportToCSVMenuItem
protected org.uberfire.workbench.model.menu.MenuItem importMenuItem
protected org.uberfire.workbench.model.menu.MenuItem downloadMenuItem
protected ScenarioSimulationEditorWrapper scenarioSimulationEditorWrapper
public ScenarioSimulationEditorPresenter()
@Inject public ScenarioSimulationEditorPresenter(ScenarioSimulationProducer scenarioSimulationProducer, ScenarioSimulationResourceType type, org.uberfire.client.mvp.PlaceManager placeManager, AbstractScenarioSimulationDocksHandler abstractScenarioSimulationDocksHandler, org.uberfire.ext.editor.commons.client.file.exports.TextFileExport textFileExport, ConfirmPopupPresenter confirmPopupPresenter)
public void setWrapper(ScenarioSimulationEditorWrapper scenarioSimulationEditorWrapper)
public void setPath(org.uberfire.backend.vfs.ObservablePath path)
public org.uberfire.backend.vfs.ObservablePath getPath()
public void setPackageName(String packageName)
public void onClose()
public void showDocks(org.uberfire.client.mvp.PlaceStatus status)
status
- PlaceStatus
of TestToolsPresenterpublic void hideDocks()
public void onUberfireDocksInteractionEvent(@Observes org.uberfire.client.workbench.docks.UberfireDocksInteractionEvent uberfireDocksInteractionEvent)
public void expandToolsDock()
public ScenarioSimulationView getView()
public org.drools.scenariosimulation.api.model.ScenarioSimulationModel getModel()
public org.uberfire.mvp.Command getPopulateTestToolsCommand()
public void reloadTestTools(boolean disable)
disable
- set this to true
to also disable the panelpublic void onRunScenario()
public void onUndo()
public void onRedo()
public void setUndoButtonEnabledStatus(boolean enabled)
public void setRedoButtonEnabledStatus(boolean enabled)
public void setItemMenuEnabled(boolean enabled)
public void addDownloadMenuItem(org.kie.workbench.common.widgets.client.menu.FileMenuBuilder fileMenuBuilder, Supplier<org.uberfire.backend.vfs.Path> pathSupplier)
public DataManagementStrategy getDataManagementStrategy()
public void onImport(String fileContents, GridWidget gridWidget)
public com.google.gwt.event.shared.EventBus getEventBus()
public ScenarioSimulationContext getContext()
protected void resetDocks()
protected boolean isUberfireDocksInteractionEventToManage(org.uberfire.client.workbench.docks.UberfireDocksInteractionEvent uberfireDocksInteractionEvent)
UberfireDocksInteractionEvent
is to be processed by current instance.uberfireDocksInteractionEvent
- true
if UberfireDocksInteractionEvent.getTargetDock() != null
and
the scesimpath parameter of UberfireDocksInteractionEvent.getTargetDock().getPlaceRequest()
is equals to the path (toString) of the current instance; false
otherwiseprotected org.jboss.errai.common.client.api.RemoteCallback<SimulationRunResult> getRefreshModelCallback()
protected void refreshModelContent(SimulationRunResult newData)
public void sendNotification(String text, org.uberfire.workbench.events.NotificationEvent.NotificationType type)
protected void registerTestToolsCallback()
protected void unRegisterTestToolsCallback()
protected org.jboss.errai.common.client.api.ErrorCallback<Object> getImportErrorCallback()
public void makeMenuBar(org.kie.workbench.common.widgets.client.menu.FileMenuBuilder fileMenuBuilder)
fileMenuBuilder
- public void addCommonActions(org.kie.workbench.common.widgets.client.menu.FileMenuBuilder fileMenuBuilder, org.uberfire.workbench.model.menu.MenuItem versionMenuItem, org.uberfire.workbench.model.menu.MenuItem alertsButtonMenuItem)
public void loadContent()
public boolean isDirty()
public void onEditTabSelected()
public void onBackgroundTabSelected()
public void onOverviewSelected()
public void onImportsTabSelected()
public void validateSimulation()
public void selectSimulationTab()
public void selectBackgroundTab()
protected void onDownload(Supplier<org.uberfire.backend.vfs.Path> pathSupplier)
protected void open(String downloadURL)
protected void showImportDialog()
protected void onExportToCsv()
public org.jboss.errai.common.client.api.RemoteCallback<Object> getExportCallBack()
protected org.jboss.errai.common.client.api.RemoteCallback<org.drools.scenariosimulation.api.model.AbstractScesimModel> getImportCallBack()
protected org.uberfire.mvp.Command getValidateCommand()
protected org.jboss.errai.common.client.api.RemoteCallback<List<FactMappingValidationError>> getValidationCallback()
public org.jboss.errai.common.client.api.ErrorCallback<Boolean> getValidationFailedCallback()
protected void cleanReadOnlyColumn(org.drools.scenariosimulation.api.model.AbstractScesimModel abstractScesimModel)
abstractScesimModel
- public void populateRightDocks(String identifier)
public void getModelSuccessCallbackMethod(DataManagementStrategy dataManagementStrategy, org.drools.scenariosimulation.api.model.ScenarioSimulationModel model)
public ScenarioSimulationResourceType getType()
public void setTestTools(TestToolsView.Presenter presenter)
protected void clearTestToolsStatus()
public void setCheatSheet(CheatSheetView.Presenter presenter)
public void setSettings(SettingsView.Presenter presenter)
public String getJsonModel(org.drools.scenariosimulation.api.model.ScenarioSimulationModel model)
Copyright © 2001–2020 JBoss by Red Hat. All rights reserved.