Class DataModelerScreenPresenter

  • All Implemented Interfaces:
    org.kie.workbench.common.widgets.metadata.client.KieEditorWrapperView.KieEditorWrapperPresenter

    @Dependent
    public class DataModelerScreenPresenter
    extends org.kie.workbench.common.widgets.metadata.client.KieEditor<String>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.uberfire.security.authz.AuthorizationManager authorizationManager  
      protected DataModelerContext context  
      protected javax.enterprise.event.Event<org.kie.workbench.common.screens.datamodeller.events.DataModelerEvent> dataModelerEvent  
      protected javax.enterprise.event.Event<DataModelerWorkbenchFocusEvent> dataModelerFocusEvent  
      protected DataModelerWorkbenchContext dataModelerWBContext  
      static String EDITOR_ID  
      protected org.kie.workbench.common.widgets.metadata.client.validation.JavaAssetUpdateValidator javaAssetUpdateValidator  
      protected org.kie.workbench.common.screens.javaeditor.client.widget.EditJavaSourceWidget javaSourceEditor  
      protected boolean loading  
      protected javax.enterprise.event.Event<org.uberfire.client.mvp.LockRequiredEvent> lockRequired  
      protected org.jboss.errai.common.client.api.Caller<org.kie.workbench.common.screens.datamodeller.service.DataModelerService> modelerService  
      protected javax.enterprise.event.Event<org.guvnor.messageconsole.events.PublishBatchMessagesEvent> publishBatchMessagesEvent  
      protected org.kie.workbench.common.screens.javaeditor.client.type.JavaResourceType resourceType  
      protected org.kie.workbench.common.services.refactoring.client.usages.ShowAssetUsagesDisplayer showAssetUsagesDisplayer  
      protected boolean uiStarted  
      protected javax.enterprise.event.Event<org.guvnor.messageconsole.events.UnpublishMessagesEvent> unpublishMessagesEvent  
      protected org.kie.workbench.common.widgets.client.popups.validation.ValidationPopup validationPopup  
      protected org.jboss.errai.common.client.api.Caller<org.kie.workbench.common.services.shared.validation.ValidationService> validationService  
      protected ValidatorService validatorService  
      protected DataModelerScreenPresenter.DataModelerScreenView view  
      • Fields inherited from class org.kie.workbench.common.widgets.metadata.client.KieEditor

        alertsButtonMenuItemBuilder, assetUpdateValidator, copyPopUpPresenter, docks, fileMenuBuilder, kieView, metadata, overviewWidget, perspectiveManager, projectController, renamePopUpPresenter, savePopUpPresenter, workbenchContext
      • Fields inherited from class org.uberfire.ext.editor.commons.client.BaseEditor

        baseView, changeTitleNotification, concurrentChangePopup, concurrentDeleteAcceptedEvent, concurrentDeleteIgnoredEvent, concurrentRenameAcceptedEvent, concurrentRenameIgnoredEvent, concurrentUpdateSessionInfo, deletePopUpPresenter, fileNameValidator, isReadOnly, isValidationRunning, makeMenuBarPromise, menuBuilder, menuBuilderManagedInstance, menuItems, menus, metadataOriginalHash, notification, originalHash, place, placeManager, promises, saveAndRenameCommandBuilder, saveWithComments, type, versionRecordManager
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected DataModelerErrorCallback getCopyErrorCallback​(org.uberfire.ext.editor.commons.client.file.popups.CopyPopUpPresenter.View copyPopupView)  
      org.kie.workbench.common.services.datamodeller.core.DataModel getDataModel()  
      protected String getEditorIdentifier()  
      void getMenus​(Consumer<org.uberfire.workbench.model.menu.Menus> menusConsumer)  
      protected org.kie.workbench.common.services.datamodeller.core.DataObject getModifiedDataObject()  
      protected org.uberfire.mvp.Command getOnEditorTabSelectedWithParseErrorCommand()
      This command is executed when the editor tab is selected but there are parse errors.
      protected org.uberfire.mvp.Command getOnLoadParseErrorCommand()
      This command is executed when a file with parse errors was initially loaded from server.
      protected org.uberfire.mvp.Command getOnSaveParseErrorCommand()
      This command is executed when a file that apparently is well is saved and the server returns parse errors.
      protected org.uberfire.mvp.Command getOnSourceParseErrorCommand()
      This command is executed every time the user changes the file source and the data is sent to server por parsing during edition and there are parse errors.
      protected DataModelerErrorCallback getRenameErrorCallback​(org.uberfire.ext.editor.commons.client.file.popups.RenamePopUpPresenter.View renamePopupView)  
      String getSource()  
      com.google.gwt.user.client.ui.IsWidget getTitle()  
      String getTitleText()  
      com.google.gwt.user.client.ui.IsWidget getView()  
      void hideDocks()  
      protected void loadContent()  
      protected elemental2.promise.Promise<Void> makeMenuBar()  
      void onClose()  
      protected void onDataObjectChangeEvent​(org.kie.workbench.common.screens.datamodeller.events.DataObjectChangeEvent event)  
      protected void onDataObjectFieldSelectedEvent​(org.kie.workbench.common.screens.datamodeller.events.DataObjectFieldSelectedEvent event)  
      protected void onDataObjectSelectedEvent​(org.kie.workbench.common.screens.datamodeller.events.DataObjectSelectedEvent event)  
      void onEditTabSelected()  
      void onFocus()  
      boolean onMayClose()  
      void onOverviewSelected()  
      void onSafeDelete()  
      void onSafeRename()  
      void onSourceTabSelected()  
      void onStartup​(org.uberfire.backend.vfs.ObservablePath path, org.uberfire.mvp.PlaceRequest place)  
      protected void onValidate​(org.uberfire.mvp.Command finished)  
      protected void rename()  
      protected void save()  
      protected void selectSourceTab()  
      void setSource​(String source)  
      void showDocks()  
      protected void updateSource​(String source)  
      • Methods inherited from class org.kie.workbench.common.widgets.metadata.client.KieEditor

        addCommonActions, addCopy, addDelete, addDownloadMenuItem, addImportsTab, addPage, addRename, addSave, addSourcePage, addTabBarWidget, buildMenuBar, createOriginalHash, getCouldNotGenerateSourceErrorCallback, getMetadataSupplier, getNoSuchFileExceptionErrorCallback, getRenameValidator, getSelectedTabIndex, getWidget, init, init, init, init, isEditorTabSelected, isOverviewTabSelected, mayClose, mayClose, onEditTabUnselected, onHideDocks, onRepositoryRemoved, onSave, onShowDiagramEditorDocks, registerDock, resetEditorPages, resetEditorPagesOnLoadError, resetMetadata, save, saveAction, selectEditorTab, selectOverviewTab, setOriginalHash, setSelectedTab, showVersions, verifyEventIdentifier
      • Methods inherited from class org.uberfire.ext.editor.commons.client.BaseEditor

        addDownloadMenuItem, disableMenuItem, downloadMenuItem, enableMenuItem, getBeforeSaveAndRenameCommand, getContentSupplier, getCopyServiceCaller, getCopyValidator, getCurrentContentHash, getDeleteServiceCaller, getPathSupplier, getRenameServiceCaller, getSaveAndRename, getSaveAndRenameCommandBuilder, getSaveAndRenameServiceCaller, getSaveSuccessCallback, getSaveValidator, getValidateCommand, getVersionRecordManager, init, isDirty, isDirtySupplier, onAfterValidate, onBeforeValidate, onRename, onRestore, onSuccess, reload, setMetadataOriginalHash, showConcurrentUpdatePopup
    • Field Detail

      • javaSourceEditor

        @Inject
        protected org.kie.workbench.common.screens.javaeditor.client.widget.EditJavaSourceWidget javaSourceEditor
      • dataModelerEvent

        @Inject
        protected javax.enterprise.event.Event<org.kie.workbench.common.screens.datamodeller.events.DataModelerEvent> dataModelerEvent
      • unpublishMessagesEvent

        @Inject
        protected javax.enterprise.event.Event<org.guvnor.messageconsole.events.UnpublishMessagesEvent> unpublishMessagesEvent
      • publishBatchMessagesEvent

        @Inject
        protected javax.enterprise.event.Event<org.guvnor.messageconsole.events.PublishBatchMessagesEvent> publishBatchMessagesEvent
      • lockRequired

        @Inject
        protected javax.enterprise.event.Event<org.uberfire.client.mvp.LockRequiredEvent> lockRequired
      • modelerService

        @Inject
        protected org.jboss.errai.common.client.api.Caller<org.kie.workbench.common.screens.datamodeller.service.DataModelerService> modelerService
      • validationPopup

        @Inject
        protected org.kie.workbench.common.widgets.client.popups.validation.ValidationPopup validationPopup
      • validationService

        @Inject
        protected org.jboss.errai.common.client.api.Caller<org.kie.workbench.common.services.shared.validation.ValidationService> validationService
      • javaAssetUpdateValidator

        @Inject
        protected org.kie.workbench.common.widgets.metadata.client.validation.JavaAssetUpdateValidator javaAssetUpdateValidator
      • resourceType

        @Inject
        protected org.kie.workbench.common.screens.javaeditor.client.type.JavaResourceType resourceType
      • authorizationManager

        @Inject
        protected org.uberfire.security.authz.AuthorizationManager authorizationManager
      • showAssetUsagesDisplayer

        @Inject
        protected org.kie.workbench.common.services.refactoring.client.usages.ShowAssetUsagesDisplayer showAssetUsagesDisplayer
      • uiStarted

        protected boolean uiStarted
      • loading

        protected boolean loading
    • Method Detail

      • getTitleText

        public String getTitleText()
        Overrides:
        getTitleText in class org.uberfire.ext.editor.commons.client.BaseEditor<String,​org.guvnor.common.services.shared.metadata.model.Metadata>
      • getTitle

        public com.google.gwt.user.client.ui.IsWidget getTitle()
        Overrides:
        getTitle in class org.uberfire.ext.editor.commons.client.BaseEditor<String,​org.guvnor.common.services.shared.metadata.model.Metadata>
      • getView

        public com.google.gwt.user.client.ui.IsWidget getView()
      • getMenus

        public void getMenus​(Consumer<org.uberfire.workbench.model.menu.Menus> menusConsumer)
        Overrides:
        getMenus in class org.uberfire.ext.editor.commons.client.BaseEditor<String,​org.guvnor.common.services.shared.metadata.model.Metadata>
      • onStartup

        public void onStartup​(org.uberfire.backend.vfs.ObservablePath path,
                              org.uberfire.mvp.PlaceRequest place)
      • onFocus

        @OnFocus
        public void onFocus()
      • showDocks

        public void showDocks()
        Overrides:
        showDocks in class org.kie.workbench.common.widgets.metadata.client.KieEditor<String>
      • hideDocks

        public void hideDocks()
        Overrides:
        hideDocks in class org.kie.workbench.common.widgets.metadata.client.KieEditor<String>
      • getEditorIdentifier

        protected String getEditorIdentifier()
        Specified by:
        getEditorIdentifier in class org.kie.workbench.common.widgets.metadata.client.KieEditor<String>
      • onMayClose

        @OnMayClose
        public boolean onMayClose()
      • onClose

        public void onClose()
        Overrides:
        onClose in class org.kie.workbench.common.widgets.metadata.client.KieEditor<String>
      • onSafeDelete

        public void onSafeDelete()
      • getCopyErrorCallback

        protected DataModelerErrorCallback getCopyErrorCallback​(org.uberfire.ext.editor.commons.client.file.popups.CopyPopUpPresenter.View copyPopupView)
      • onSafeRename

        public void onSafeRename()
      • rename

        protected void rename()
      • onValidate

        protected void onValidate​(org.uberfire.mvp.Command finished)
        Overrides:
        onValidate in class org.uberfire.ext.editor.commons.client.BaseEditor<String,​org.guvnor.common.services.shared.metadata.model.Metadata>
      • save

        protected void save()
        Overrides:
        save in class org.kie.workbench.common.widgets.metadata.client.KieEditor<String>
      • getModifiedDataObject

        protected org.kie.workbench.common.services.datamodeller.core.DataObject getModifiedDataObject()
      • loadContent

        protected void loadContent()
        Specified by:
        loadContent in class org.uberfire.ext.editor.commons.client.BaseEditor<String,​org.guvnor.common.services.shared.metadata.model.Metadata>
      • getOnLoadParseErrorCommand

        protected org.uberfire.mvp.Command getOnLoadParseErrorCommand()
        This command is executed when a file with parse errors was initially loaded from server.
      • getOnSaveParseErrorCommand

        protected org.uberfire.mvp.Command getOnSaveParseErrorCommand()
        This command is executed when a file that apparently is well is saved and the server returns parse errors. Uncommon case.
      • getOnSourceParseErrorCommand

        protected org.uberfire.mvp.Command getOnSourceParseErrorCommand()
        This command is executed every time the user changes the file source and the data is sent to server por parsing during edition and there are parse errors. Typically when the user e.g. goes to the source tab, modifies the code and returns to the editor tab.
      • getOnEditorTabSelectedWithParseErrorCommand

        protected org.uberfire.mvp.Command getOnEditorTabSelectedWithParseErrorCommand()
        This command is executed when the editor tab is selected but there are parse errors.
      • selectSourceTab

        protected void selectSourceTab()
      • getRenameErrorCallback

        protected DataModelerErrorCallback getRenameErrorCallback​(org.uberfire.ext.editor.commons.client.file.popups.RenamePopUpPresenter.View renamePopupView)
      • getDataModel

        public org.kie.workbench.common.services.datamodeller.core.DataModel getDataModel()
      • getSource

        public String getSource()
      • setSource

        public void setSource​(String source)
      • onSourceTabSelected

        public void onSourceTabSelected()
        Specified by:
        onSourceTabSelected in interface org.kie.workbench.common.widgets.metadata.client.KieEditorWrapperView.KieEditorWrapperPresenter
        Overrides:
        onSourceTabSelected in class org.kie.workbench.common.widgets.metadata.client.KieEditor<String>
      • onOverviewSelected

        public void onOverviewSelected()
        Specified by:
        onOverviewSelected in interface org.kie.workbench.common.widgets.metadata.client.KieEditorWrapperView.KieEditorWrapperPresenter
        Overrides:
        onOverviewSelected in class org.kie.workbench.common.widgets.metadata.client.KieEditor<String>
      • updateSource

        protected void updateSource​(String source)
        Overrides:
        updateSource in class org.kie.workbench.common.widgets.metadata.client.KieEditor<String>
      • onEditTabSelected

        public void onEditTabSelected()
        Specified by:
        onEditTabSelected in interface org.kie.workbench.common.widgets.metadata.client.KieEditorWrapperView.KieEditorWrapperPresenter
        Overrides:
        onEditTabSelected in class org.kie.workbench.common.widgets.metadata.client.KieEditor<String>
      • onDataObjectChangeEvent

        protected void onDataObjectChangeEvent​(@Observes
                                               org.kie.workbench.common.screens.datamodeller.events.DataObjectChangeEvent event)
      • onDataObjectSelectedEvent

        protected void onDataObjectSelectedEvent​(@Observes
                                                 org.kie.workbench.common.screens.datamodeller.events.DataObjectSelectedEvent event)
      • onDataObjectFieldSelectedEvent

        protected void onDataObjectFieldSelectedEvent​(@Observes
                                                      org.kie.workbench.common.screens.datamodeller.events.DataObjectFieldSelectedEvent event)
      • makeMenuBar

        protected elemental2.promise.Promise<Void> makeMenuBar()
        Overrides:
        makeMenuBar in class org.kie.workbench.common.widgets.metadata.client.KieEditor<String>