@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 SimulationRunResult |
lastRunResult |
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 boolean |
saveEnabled |
protected ScenarioGridWidget |
scenarioBackgroundGridWidget |
protected ScenarioGridWidget |
scenarioMainGridWidget |
protected long |
scenarioPresenterId |
protected ScenarioSimulationEditorWrapper |
scenarioSimulationEditorWrapper |
protected TestRunnerReportingPanelWrapper |
testRunnerReportingPanel |
protected org.uberfire.workbench.model.menu.MenuItem |
undoMenuItem |
Constructor and Description |
---|
ScenarioSimulationEditorPresenter() |
ScenarioSimulationEditorPresenter(ScenarioSimulationProducer scenarioSimulationProducer,
ScenarioSimulationResourceType type,
org.uberfire.client.mvp.PlaceManager placeManager,
TestRunnerReportingPanelWrapper testRunnerReportingPanel,
ScenarioSimulationDocksHandler scenarioSimulationDocksHandler,
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() |
protected Optional<CheatSheetView.Presenter> |
getCheatSheetPresenter(org.uberfire.mvp.PlaceRequest placeRequest) |
ScenarioSimulationContext |
getContext() |
protected Optional<CoverageReportView.Presenter> |
getCoverageReportPresenter(org.uberfire.mvp.PlaceRequest placeRequest) |
protected org.uberfire.mvp.PlaceRequest |
getCurrentRightDockPlaceRequest(String identifier)
Returns a
PlaceRequest for the status of the right dock with the given identifier
relative to the current instance of ScenarioSimulationEditorPresenter |
DataManagementStrategy |
getDataManagementStrategy() |
protected org.uberfire.mvp.Command |
getDownloadReportCommand(org.drools.scenariosimulation.api.model.AuditLog auditLog) |
com.google.gwt.event.shared.EventBus |
getEventBus() |
protected 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.mvp.Command |
getPopulateTestToolsCommand() |
protected org.jboss.errai.common.client.api.RemoteCallback<SimulationRunResult> |
getRefreshModelCallback() |
protected Optional<SettingsView.Presenter> |
getSettingsPresenter(org.uberfire.mvp.PlaceRequest placeRequest) |
protected Optional<TestToolsView.Presenter> |
getTestToolsPresenter(org.uberfire.mvp.PlaceRequest placeRequest) |
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<?> |
getValidationFailedCallback() |
ScenarioSimulationView |
getView() |
void |
hideDocks() |
void |
init(ScenarioSimulationEditorWrapper scenarioSimulationEditorWrapper,
org.uberfire.backend.vfs.ObservablePath path) |
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() |
protected void |
setCheatSheet(CheatSheetView.Presenter presenter) |
protected void |
setCoverageReport(CoverageReportView.Presenter presenter) |
void |
setItemMenuEnabled(boolean enabled) |
void |
setPackageName(String packageName) |
void |
setRedoButtonEnabledStatus(boolean enabled) |
void |
setSaveEnabled(boolean toSet) |
protected void |
setSettings(SettingsView.Presenter presenter) |
protected void |
setTestTools(TestToolsView.Presenter presenter) |
void |
setUndoButtonEnabledStatus(boolean enabled) |
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 TestRunnerReportingPanelWrapper testRunnerReportingPanel
protected SimulationRunResult lastRunResult
protected long scenarioPresenterId
protected boolean saveEnabled
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, TestRunnerReportingPanelWrapper testRunnerReportingPanel, ScenarioSimulationDocksHandler scenarioSimulationDocksHandler, org.uberfire.ext.editor.commons.client.file.exports.TextFileExport textFileExport, ConfirmPopupPresenter confirmPopupPresenter)
public void init(ScenarioSimulationEditorWrapper scenarioSimulationEditorWrapper, org.uberfire.backend.vfs.ObservablePath path)
public void setSaveEnabled(boolean toSet)
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)
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()
protected 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<?> 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()
protected void setTestTools(TestToolsView.Presenter presenter)
protected void clearTestToolsStatus()
protected void setCheatSheet(CheatSheetView.Presenter presenter)
protected void setSettings(SettingsView.Presenter presenter)
protected void setCoverageReport(CoverageReportView.Presenter presenter)
public String getJsonModel(org.drools.scenariosimulation.api.model.ScenarioSimulationModel model)
protected Optional<CheatSheetView.Presenter> getCheatSheetPresenter(org.uberfire.mvp.PlaceRequest placeRequest)
protected Optional<TestToolsView.Presenter> getTestToolsPresenter(org.uberfire.mvp.PlaceRequest placeRequest)
protected Optional<SettingsView.Presenter> getSettingsPresenter(org.uberfire.mvp.PlaceRequest placeRequest)
protected Optional<CoverageReportView.Presenter> getCoverageReportPresenter(org.uberfire.mvp.PlaceRequest placeRequest)
protected org.uberfire.mvp.Command getDownloadReportCommand(org.drools.scenariosimulation.api.model.AuditLog auditLog)
protected org.uberfire.mvp.PlaceRequest getCurrentRightDockPlaceRequest(String identifier)
PlaceRequest
for the status of the right dock with the given identifier
relative to the current instance of ScenarioSimulationEditorPresenter
Copyright © 2001–2020 JBoss by Red Hat. All rights reserved.