Class DataSourceDefEditor
- java.lang.Object
-
- org.uberfire.ext.editor.commons.client.BaseEditor<org.kie.workbench.common.screens.datasource.management.model.DataSourceDefEditorContent,org.guvnor.common.services.shared.metadata.model.Metadata>
-
- org.kie.workbench.common.screens.datasource.management.client.editor.datasource.DataSourceDefEditor
-
- All Implemented Interfaces:
DefEditorActionsPanelView.Presenter,DataSourceDefEditorView.Presenter
@Dependent public class DataSourceDefEditor extends org.uberfire.ext.editor.commons.client.BaseEditor<org.kie.workbench.common.screens.datasource.management.model.DataSourceDefEditorContent,org.guvnor.common.services.shared.metadata.model.Metadata> implements DataSourceDefEditorView.Presenter
-
-
Field Summary
-
Fields inherited from class org.uberfire.ext.editor.commons.client.BaseEditor
baseView, changeTitleNotification, concurrentChangePopup, concurrentDeleteAcceptedEvent, concurrentDeleteIgnoredEvent, concurrentRenameAcceptedEvent, concurrentRenameIgnoredEvent, concurrentUpdateSessionInfo, fileNameValidator, isReadOnly, isValidationRunning, makeMenuBarPromise, menuBuilder, menuBuilderManagedInstance, menuItems, menus, metadataOriginalHash, notification, originalHash, place, promises, saveAndRenameCommandBuilder, saveWithComments, versionRecordManager
-
-
Constructor Summary
Constructors Constructor Description DataSourceDefEditor(DataSourceDefEditorView view, DataSourceDefMainPanel mainPanel, DataSourceDefEditorHelper editorHelper, DatabaseStructureExplorer dbStructureExplorer, PopupsUtil popupsUtil, org.uberfire.client.mvp.PlaceManager placeManager, DataSourceDefType type, org.uberfire.ext.editor.commons.client.file.popups.SavePopUpPresenter savePopUpPresenter, org.uberfire.ext.editor.commons.client.file.popups.DeletePopUpPresenter deletePopUpPresenter, org.jboss.errai.common.client.api.Caller<org.kie.workbench.common.screens.datasource.management.service.DataSourceDefEditorService> editorService, org.jboss.errai.common.client.api.Caller<org.kie.workbench.common.screens.datasource.management.service.DataSourceRuntimeManagerClientService> dataSourceManagerClient)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void_save()Performs the formal save of the data source.protected voiddelete(org.uberfire.backend.vfs.ObservablePath currentPath)Performs the formal deletion of the data source.protected voidexecuteSafeUpdateCommand(String onDependantsMessageKey, org.uberfire.mvp.Command defaultCommand, org.uberfire.mvp.Command yesCommand, org.uberfire.mvp.Command noCommand)Checks current data source status prior to execute an update operation.protected org.kie.workbench.common.screens.datasource.management.model.DataSourceDefEditorContentgetContent()org.uberfire.mvp.ParameterizedCommand<Throwable>getLoadDriversErrorCommand()org.uberfire.mvp.CommandgetLoadDriversSuccessCommand()com.google.gwt.user.client.ui.IsWidgetgetTitle()StringgetTitleText()com.google.gwt.user.client.ui.IsWidgetgetWidget()protected voidinit()protected voidloadContent()booleanmayClose(Integer currentHash)voidonCancel()protected voidonContentLoaded(org.kie.workbench.common.screens.datasource.management.model.DataSourceDefEditorContent editorContent)voidonDelete()booleanonMayClose()voidonSave()voidonShowContent()voidonStartup(org.uberfire.backend.vfs.ObservablePath path, org.uberfire.mvp.PlaceRequest place)protected voidsafeDelete(org.uberfire.backend.vfs.ObservablePath currentPath)Executes a safe deletion of the data source by checking it's status and asking user confirmation if needed.protected voidsafeSave()Executes a safe saving of the data source by checking it's status and asking user confirmation if needed.protected voidsave()protected voidsetContent(org.kie.workbench.common.screens.datasource.management.model.DataSourceDefEditorContent editorContent)-
Methods inherited from class org.uberfire.ext.editor.commons.client.BaseEditor
addDownloadMenuItem, buildMenuBar, disableMenuItem, downloadMenuItem, enableMenuItem, getBeforeSaveAndRenameCommand, getContentSupplier, getCopyServiceCaller, getCopyValidator, getCurrentContentHash, getDeleteServiceCaller, getMenus, getMetadataSupplier, getPathSupplier, getRenameServiceCaller, getRenameValidator, getSaveAndRename, getSaveAndRenameCommandBuilder, getSaveAndRenameServiceCaller, getSaveSuccessCallback, getSaveValidator, getValidateCommand, getVersionRecordManager, init, init, init, isDirty, isDirtySupplier, makeMenuBar, onAfterValidate, onBeforeValidate, onRename, onRestore, onSuccess, onValidate, reload, setMetadataOriginalHash, setOriginalHash, showConcurrentUpdatePopup, showVersions
-
-
-
-
Constructor Detail
-
DataSourceDefEditor
@Inject public DataSourceDefEditor(DataSourceDefEditorView view, DataSourceDefMainPanel mainPanel, DataSourceDefEditorHelper editorHelper, DatabaseStructureExplorer dbStructureExplorer, PopupsUtil popupsUtil, org.uberfire.client.mvp.PlaceManager placeManager, DataSourceDefType type, org.uberfire.ext.editor.commons.client.file.popups.SavePopUpPresenter savePopUpPresenter, org.uberfire.ext.editor.commons.client.file.popups.DeletePopUpPresenter deletePopUpPresenter, org.jboss.errai.common.client.api.Caller<org.kie.workbench.common.screens.datasource.management.service.DataSourceDefEditorService> editorService, org.jboss.errai.common.client.api.Caller<org.kie.workbench.common.screens.datasource.management.service.DataSourceRuntimeManagerClientService> dataSourceManagerClient)
-
-
Method Detail
-
init
@PostConstruct protected void init()
-
onStartup
public void onStartup(org.uberfire.backend.vfs.ObservablePath path, org.uberfire.mvp.PlaceRequest place)
-
getTitle
public com.google.gwt.user.client.ui.IsWidget getTitle()
- Overrides:
getTitlein classorg.uberfire.ext.editor.commons.client.BaseEditor<org.kie.workbench.common.screens.datasource.management.model.DataSourceDefEditorContent,org.guvnor.common.services.shared.metadata.model.Metadata>
-
getTitleText
public String getTitleText()
- Overrides:
getTitleTextin classorg.uberfire.ext.editor.commons.client.BaseEditor<org.kie.workbench.common.screens.datasource.management.model.DataSourceDefEditorContent,org.guvnor.common.services.shared.metadata.model.Metadata>
-
getWidget
public com.google.gwt.user.client.ui.IsWidget getWidget()
-
onMayClose
@OnMayClose public boolean onMayClose()
-
loadContent
protected void loadContent()
- Specified by:
loadContentin classorg.uberfire.ext.editor.commons.client.BaseEditor<org.kie.workbench.common.screens.datasource.management.model.DataSourceDefEditorContent,org.guvnor.common.services.shared.metadata.model.Metadata>
-
mayClose
public boolean mayClose(Integer currentHash)
- Overrides:
mayClosein classorg.uberfire.ext.editor.commons.client.BaseEditor<org.kie.workbench.common.screens.datasource.management.model.DataSourceDefEditorContent,org.guvnor.common.services.shared.metadata.model.Metadata>
-
onSave
public void onSave()
- Specified by:
onSavein interfaceDefEditorActionsPanelView.Presenter- Overrides:
onSavein classorg.uberfire.ext.editor.commons.client.BaseEditor<org.kie.workbench.common.screens.datasource.management.model.DataSourceDefEditorContent,org.guvnor.common.services.shared.metadata.model.Metadata>
-
onCancel
public void onCancel()
- Specified by:
onCancelin interfaceDefEditorActionsPanelView.Presenter
-
onDelete
public void onDelete()
- Specified by:
onDeletein interfaceDefEditorActionsPanelView.Presenter
-
save
protected void save()
- Overrides:
savein classorg.uberfire.ext.editor.commons.client.BaseEditor<org.kie.workbench.common.screens.datasource.management.model.DataSourceDefEditorContent,org.guvnor.common.services.shared.metadata.model.Metadata>
-
safeSave
protected void safeSave()
Executes a safe saving of the data source by checking it's status and asking user confirmation if needed.
-
_save
protected void _save()
Performs the formal save of the data source.
-
safeDelete
protected void safeDelete(org.uberfire.backend.vfs.ObservablePath currentPath)
Executes a safe deletion of the data source by checking it's status and asking user confirmation if needed.
-
delete
protected void delete(org.uberfire.backend.vfs.ObservablePath currentPath)
Performs the formal deletion of the data source.
-
executeSafeUpdateCommand
protected void executeSafeUpdateCommand(String onDependantsMessageKey, org.uberfire.mvp.Command defaultCommand, org.uberfire.mvp.Command yesCommand, org.uberfire.mvp.Command noCommand)
Checks current data source status prior to execute an update operation.
-
onContentLoaded
protected void onContentLoaded(org.kie.workbench.common.screens.datasource.management.model.DataSourceDefEditorContent editorContent)
-
getContent
protected org.kie.workbench.common.screens.datasource.management.model.DataSourceDefEditorContent getContent()
-
setContent
protected void setContent(org.kie.workbench.common.screens.datasource.management.model.DataSourceDefEditorContent editorContent)
-
getLoadDriversSuccessCommand
public org.uberfire.mvp.Command getLoadDriversSuccessCommand()
-
getLoadDriversErrorCommand
public org.uberfire.mvp.ParameterizedCommand<Throwable> getLoadDriversErrorCommand()
-
onShowContent
public void onShowContent()
- Specified by:
onShowContentin interfaceDataSourceDefEditorView.Presenter
-
-