@Dependent
public class ScenarioSimulationEditorPresenter
extends org.kie.workbench.common.widgets.metadata.client.KieEditor<org.drools.scenariosimulation.api.model.ScenarioSimulationModel>
Modifier and Type | Field and Description |
---|---|
protected ScenarioSimulationContext |
context |
protected DataManagementStrategy |
dataManagementStrategy |
protected com.google.gwt.event.shared.EventBus |
eventBus |
static String |
IDENTIFIER |
protected SimulationRunResult |
lastRunResult |
protected org.drools.scenariosimulation.api.model.ScenarioSimulationModel |
model |
protected String |
packageName |
protected org.uberfire.backend.vfs.ObservablePath |
path |
protected ScenarioGridPanel |
scenarioGridPanel |
protected long |
scenarioPresenterId |
protected org.kie.workbench.common.workbench.client.test.TestRunnerReportingPanel |
testRunnerReportingPanel |
alertsButtonMenuItemBuilder, assetUpdateValidator, copyPopUpPresenter, deletePopUpPresenter, docks, fileMenuBuilder, kieView, metadata, overviewWidget, perspectiveManager, projectController, renamePopUpPresenter, savePopUpPresenter, workbenchContext
baseView, changeTitleNotification, concurrentDeleteAcceptedEvent, concurrentDeleteIgnoredEvent, concurrentRenameAcceptedEvent, concurrentRenameIgnoredEvent, concurrentUpdateSessionInfo, fileNameValidator, isReadOnly, isValidationRunning, makeMenuBarPromise, menuBuilder, menuBuilderManagedInstance, menuItems, menus, metadataOriginalHash, notification, originalHash, place, placeManager, promises, saveAndRenameCommandBuilder, versionRecordManager
Constructor and Description |
---|
ScenarioSimulationEditorPresenter() |
ScenarioSimulationEditorPresenter(org.jboss.errai.common.client.api.Caller<ScenarioSimulationService> service,
ScenarioSimulationProducer scenarioSimulationProducer,
ScenarioSimulationResourceType type,
org.kie.workbench.common.widgets.configresource.client.widget.bound.ImportsWidgetPresenter importsWidget,
org.kie.workbench.common.widgets.client.datamodel.AsyncPackageDataModelOracleFactory oracleFactory,
org.uberfire.client.mvp.PlaceManager placeManager,
org.kie.workbench.common.workbench.client.test.TestRunnerReportingPanel testRunnerReportingPanel,
ScenarioSimulationDocksHandler scenarioSimulationDocksHandler,
org.jboss.errai.common.client.api.Caller<DMNTypeService> dmnTypeService,
org.jboss.errai.common.client.api.Caller<ImportExportService> importExportService,
org.uberfire.ext.editor.commons.client.file.exports.TextFileExport textFileExport,
ConfirmPopupPresenter confirmPopupPresenter) |
Modifier and Type | Method and Description |
---|---|
protected void |
addCommonActions(org.kie.workbench.common.widgets.client.menu.FileMenuBuilder fileMenuBuilder) |
void |
addDownloadMenuItem(org.kie.workbench.common.widgets.client.menu.FileMenuBuilder fileMenuBuilder) |
protected void |
cleanReadOnlyColumn(org.drools.scenariosimulation.api.model.Simulation simulation)
Read only columns should not contains any values
|
protected void |
clearTestToolsStatus() |
void |
expandToolsDock() |
protected Optional<CheatSheetView.Presenter> |
getCheatSheetPresenter(org.uberfire.mvp.PlaceRequest placeRequest) |
protected Supplier<org.drools.scenariosimulation.api.model.ScenarioSimulationModel> |
getContentSupplier() |
protected org.jboss.errai.common.client.api.Caller<? extends org.uberfire.ext.editor.commons.service.support.SupportsCopy> |
getCopyServiceCaller() |
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.jboss.errai.common.client.api.Caller<? extends org.uberfire.ext.editor.commons.service.support.SupportsDelete> |
getDeleteServiceCaller() |
protected String |
getEditorIdentifier() |
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.Simulation> |
getImportCallBack() |
protected org.jboss.errai.common.client.api.ErrorCallback<Object> |
getImportErrorCallback() |
protected String |
getJsonModel(org.drools.scenariosimulation.api.model.ScenarioSimulationModel model) |
void |
getMenus(Consumer<org.uberfire.workbench.model.menu.Menus> menusConsumer) |
org.drools.scenariosimulation.api.model.ScenarioSimulationModel |
getModel() |
protected void |
getModelSuccessCallbackMethod(ScenarioSimulationModelContent content) |
protected org.jboss.errai.common.client.api.RemoteCallback<SimulationRunResult> |
getRefreshModelCallback() |
protected org.jboss.errai.common.client.api.Caller<? extends org.uberfire.ext.editor.commons.service.support.SupportsRename> |
getRenameServiceCaller() |
protected org.jboss.errai.common.client.api.Caller<? extends org.uberfire.ext.editor.commons.service.support.SupportsSaveAndRename<org.drools.scenariosimulation.api.model.ScenarioSimulationModel,org.guvnor.common.services.shared.metadata.model.Metadata>> |
getSaveAndRenameServiceCaller() |
protected org.uberfire.mvp.Command |
getSaveCommand() |
protected Optional<SettingsView.Presenter> |
getSettingsPresenter(org.uberfire.mvp.PlaceRequest placeRequest) |
protected Optional<TestToolsView.Presenter> |
getTestToolsPresenter(org.uberfire.mvp.PlaceRequest placeRequest) |
com.google.gwt.user.client.ui.IsWidget |
getTitle() |
String |
getTitleText() |
ScenarioSimulationView |
getView() |
com.google.gwt.user.client.ui.IsWidget |
getWidget() |
void |
hideDocks() |
protected 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. |
protected void |
loadContent() |
protected elemental2.promise.Promise<Void> |
makeMenuBar()
If you want to customize the menu override this method.
|
boolean |
mayClose() |
void |
onClose() |
protected void |
onDownload(Supplier<org.uberfire.backend.vfs.Path> pathSupplier) |
protected void |
onExportToCsv() |
void |
onImport(String fileContents) |
void |
onRedo() |
void |
onRunScenario() |
void |
onRunScenario(List<Integer> indexOfScenarioToRun) |
void |
onStartup(org.uberfire.backend.vfs.ObservablePath path,
org.uberfire.mvp.PlaceRequest place) |
void |
onUberfireDocksInteractionEvent(org.uberfire.client.workbench.docks.UberfireDocksInteractionEvent uberfireDocksInteractionEvent) |
void |
onUndo() |
protected void |
open(String downloadURL) |
protected 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.
|
protected void |
save(String commitMessage) |
protected void |
setCheatSheet(CheatSheetView.Presenter presenter) |
protected void |
setCoverageReport(CoverageReportView.Presenter presenter) |
void |
setRedoButtonEnabledStatus(boolean enabled) |
protected void |
setSettings(SettingsView.Presenter presenter) |
protected void |
setTestTools(TestToolsView.Presenter presenter) |
void |
setUndoButtonEnabledStatus(boolean enabled) |
void |
showDocks() |
protected void |
showImportDialog() |
protected void |
unRegisterTestToolsCallback() |
addCopy, addDelete, addImportsTab, addPage, addRename, addSave, addSourcePage, buildMenuBar, createOriginalHash, getCouldNotGenerateSourceErrorCallback, getMetadataSupplier, getNoSuchFileExceptionErrorCallback, getRenameValidator, getSelectedTabIndex, init, init, init, init, isEditorTabSelected, isOverviewTabSelected, mayClose, mayClose, onEditTabSelected, onEditTabUnselected, onHideDocks, onOverviewSelected, onRepositoryRemoved, onSave, onShowDiagramEditorDocks, onSourceTabSelected, registerDock, resetEditorPages, save, saveAction, selectEditorTab, selectOverviewTab, setOriginalHash, setSelectedTab, showVersions, updateSource, verifyEventIdentifier
addDownloadMenuItem, disableMenuItem, downloadMenuItem, enableMenuItem, getCopyValidator, getCurrentContentHash, getPathSupplier, getSaveAndRename, getSaveAndRenameCommandBuilder, getSaveSuccessCallback, getValidateCommand, getVersionRecordManager, init, isDirty, isDirtySupplier, onAfterValidate, onBeforeValidate, onRename, onRestore, onSuccess, onValidate, reload, setMetadataOriginalHash, showConcurrentUpdatePopup
public static final String IDENTIFIER
protected String packageName
protected org.uberfire.backend.vfs.ObservablePath path
protected com.google.gwt.event.shared.EventBus eventBus
protected ScenarioGridPanel scenarioGridPanel
protected DataManagementStrategy dataManagementStrategy
protected ScenarioSimulationContext context
protected org.drools.scenariosimulation.api.model.ScenarioSimulationModel model
protected org.kie.workbench.common.workbench.client.test.TestRunnerReportingPanel testRunnerReportingPanel
protected SimulationRunResult lastRunResult
protected long scenarioPresenterId
public ScenarioSimulationEditorPresenter()
@Inject public ScenarioSimulationEditorPresenter(org.jboss.errai.common.client.api.Caller<ScenarioSimulationService> service, ScenarioSimulationProducer scenarioSimulationProducer, ScenarioSimulationResourceType type, org.kie.workbench.common.widgets.configresource.client.widget.bound.ImportsWidgetPresenter importsWidget, org.kie.workbench.common.widgets.client.datamodel.AsyncPackageDataModelOracleFactory oracleFactory, org.uberfire.client.mvp.PlaceManager placeManager, org.kie.workbench.common.workbench.client.test.TestRunnerReportingPanel testRunnerReportingPanel, ScenarioSimulationDocksHandler scenarioSimulationDocksHandler, org.jboss.errai.common.client.api.Caller<DMNTypeService> dmnTypeService, org.jboss.errai.common.client.api.Caller<ImportExportService> importExportService, org.uberfire.ext.editor.commons.client.file.exports.TextFileExport textFileExport, ConfirmPopupPresenter confirmPopupPresenter)
public void onStartup(org.uberfire.backend.vfs.ObservablePath path, org.uberfire.mvp.PlaceRequest place)
public void onClose()
onClose
in class org.kie.workbench.common.widgets.metadata.client.KieEditor<org.drools.scenariosimulation.api.model.ScenarioSimulationModel>
@OnMayClose public boolean mayClose()
public String getTitleText()
getTitleText
in class org.uberfire.ext.editor.commons.client.BaseEditor<org.drools.scenariosimulation.api.model.ScenarioSimulationModel,org.guvnor.common.services.shared.metadata.model.Metadata>
public com.google.gwt.user.client.ui.IsWidget getTitle()
getTitle
in class org.uberfire.ext.editor.commons.client.BaseEditor<org.drools.scenariosimulation.api.model.ScenarioSimulationModel,org.guvnor.common.services.shared.metadata.model.Metadata>
public com.google.gwt.user.client.ui.IsWidget getWidget()
getWidget
in class org.kie.workbench.common.widgets.metadata.client.KieEditor<org.drools.scenariosimulation.api.model.ScenarioSimulationModel>
public void getMenus(Consumer<org.uberfire.workbench.model.menu.Menus> menusConsumer)
getMenus
in class org.uberfire.ext.editor.commons.client.BaseEditor<org.drools.scenariosimulation.api.model.ScenarioSimulationModel,org.guvnor.common.services.shared.metadata.model.Metadata>
public void showDocks()
showDocks
in class org.kie.workbench.common.widgets.metadata.client.KieEditor<org.drools.scenariosimulation.api.model.ScenarioSimulationModel>
public void hideDocks()
hideDocks
in class org.kie.workbench.common.widgets.metadata.client.KieEditor<org.drools.scenariosimulation.api.model.ScenarioSimulationModel>
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 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 addDownloadMenuItem(org.kie.workbench.common.widgets.client.menu.FileMenuBuilder fileMenuBuilder)
addDownloadMenuItem
in class org.kie.workbench.common.widgets.metadata.client.KieEditor<org.drools.scenariosimulation.api.model.ScenarioSimulationModel>
public DataManagementStrategy getDataManagementStrategy()
public void onImport(String fileContents)
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()
protected elemental2.promise.Promise<Void> makeMenuBar()
makeMenuBar
in class org.kie.workbench.common.widgets.metadata.client.KieEditor<org.drools.scenariosimulation.api.model.ScenarioSimulationModel>
protected Supplier<org.drools.scenariosimulation.api.model.ScenarioSimulationModel> getContentSupplier()
getContentSupplier
in class org.uberfire.ext.editor.commons.client.BaseEditor<org.drools.scenariosimulation.api.model.ScenarioSimulationModel,org.guvnor.common.services.shared.metadata.model.Metadata>
protected void save(String commitMessage)
save
in class org.kie.workbench.common.widgets.metadata.client.KieEditor<org.drools.scenariosimulation.api.model.ScenarioSimulationModel>
protected void addCommonActions(org.kie.workbench.common.widgets.client.menu.FileMenuBuilder fileMenuBuilder)
addCommonActions
in class org.kie.workbench.common.widgets.metadata.client.KieEditor<org.drools.scenariosimulation.api.model.ScenarioSimulationModel>
protected void loadContent()
loadContent
in class org.uberfire.ext.editor.commons.client.BaseEditor<org.drools.scenariosimulation.api.model.ScenarioSimulationModel,org.guvnor.common.services.shared.metadata.model.Metadata>
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.Simulation> getImportCallBack()
protected void cleanReadOnlyColumn(org.drools.scenariosimulation.api.model.Simulation simulation)
simulation
- protected void populateRightDocks(String identifier)
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)
protected String getJsonModel(org.drools.scenariosimulation.api.model.ScenarioSimulationModel model)
protected boolean isDirty()
protected org.jboss.errai.common.client.api.Caller<? extends org.uberfire.ext.editor.commons.service.support.SupportsDelete> getDeleteServiceCaller()
getDeleteServiceCaller
in class org.uberfire.ext.editor.commons.client.BaseEditor<org.drools.scenariosimulation.api.model.ScenarioSimulationModel,org.guvnor.common.services.shared.metadata.model.Metadata>
protected org.jboss.errai.common.client.api.Caller<? extends org.uberfire.ext.editor.commons.service.support.SupportsRename> getRenameServiceCaller()
getRenameServiceCaller
in class org.uberfire.ext.editor.commons.client.BaseEditor<org.drools.scenariosimulation.api.model.ScenarioSimulationModel,org.guvnor.common.services.shared.metadata.model.Metadata>
protected org.jboss.errai.common.client.api.Caller<? extends org.uberfire.ext.editor.commons.service.support.SupportsCopy> getCopyServiceCaller()
getCopyServiceCaller
in class org.uberfire.ext.editor.commons.client.BaseEditor<org.drools.scenariosimulation.api.model.ScenarioSimulationModel,org.guvnor.common.services.shared.metadata.model.Metadata>
protected org.jboss.errai.common.client.api.Caller<? extends org.uberfire.ext.editor.commons.service.support.SupportsSaveAndRename<org.drools.scenariosimulation.api.model.ScenarioSimulationModel,org.guvnor.common.services.shared.metadata.model.Metadata>> getSaveAndRenameServiceCaller()
getSaveAndRenameServiceCaller
in class org.uberfire.ext.editor.commons.client.BaseEditor<org.drools.scenariosimulation.api.model.ScenarioSimulationModel,org.guvnor.common.services.shared.metadata.model.Metadata>
protected String getEditorIdentifier()
getEditorIdentifier
in class org.kie.workbench.common.widgets.metadata.client.KieEditor<org.drools.scenariosimulation.api.model.ScenarioSimulationModel>
protected void getModelSuccessCallbackMethod(ScenarioSimulationModelContent content)
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 getSaveCommand()
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–2019 JBoss by Red Hat. All rights reserved.