Class DynamicMenuEditorPresenter


  • @Dependent
    public class DynamicMenuEditorPresenter
    extends org.uberfire.ext.editor.commons.client.BaseEditor<org.uberfire.ext.plugin.model.Plugin,​org.uberfire.ext.editor.commons.file.DefaultMetadata>
    • Field Summary

      • 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, originalHash, place, placeManager, promises, saveAndRenameCommandBuilder, saveWithComments, type, versionRecordManager
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addMenuItem​(org.uberfire.ext.plugin.model.DynamicMenuItem menuItem)  
      org.uberfire.ext.plugin.model.DynamicMenu getContent()  
      protected Supplier<org.uberfire.ext.plugin.model.Plugin> getContentSupplier()  
      protected org.jboss.errai.common.client.api.Caller<? extends org.uberfire.ext.editor.commons.service.support.SupportsCopy> getCopyServiceCaller()  
      org.uberfire.ext.editor.commons.client.validation.Validator getCopyValidator()  
      protected org.jboss.errai.common.client.api.Caller<? extends org.uberfire.ext.editor.commons.service.support.SupportsDelete> getDeleteServiceCaller()  
      protected List<org.uberfire.ext.plugin.model.DynamicMenuItem> getDynamicMenuItems()  
      org.uberfire.ext.plugin.model.DynamicMenuItem getExistingMenuItem​(org.uberfire.ext.plugin.model.DynamicMenuItem currentMenuItem, org.uberfire.ext.plugin.model.DynamicMenuItem editedMenuItem)  
      RuleValidator getMenuItemActivityIdValidator()  
      RuleValidator getMenuItemLabelValidator​(org.uberfire.ext.plugin.model.DynamicMenuItem menuItem, org.uberfire.ext.plugin.model.DynamicMenuItem editedMenuItem)  
      void getMenus​(Consumer<org.uberfire.workbench.model.menu.Menus> menusConsumer)  
      org.uberfire.ext.editor.commons.client.validation.Validator getRenameValidator()  
      protected org.jboss.errai.common.client.api.Caller<? extends org.uberfire.ext.editor.commons.service.support.SupportsSaveAndRename<org.uberfire.ext.plugin.model.Plugin,​org.uberfire.ext.editor.commons.file.DefaultMetadata>> getSaveAndRenameServiceCaller()  
      com.google.gwt.user.client.ui.IsWidget getTitle()  
      String getTitleText()  
      DynamicMenuEditorPresenter.View getView()  
      org.uberfire.client.mvp.UberView<DynamicMenuEditorPresenter> getWidget()  
      protected void loadContent()  
      boolean onMayClose()  
      protected void onPlugInRenamed​(org.uberfire.ext.plugin.event.PluginRenamed pluginRenamed)  
      void onStartup​(org.uberfire.backend.vfs.ObservablePath path, org.uberfire.mvp.PlaceRequest place)  
      protected org.uberfire.mvp.Command onValidate()  
      void removeObject​(org.uberfire.ext.plugin.model.DynamicMenuItem object)  
      protected void save()  
      void setDataDisplay​(com.google.gwt.view.client.HasData<org.uberfire.ext.plugin.model.DynamicMenuItem> display)  
      void updateIndex​(org.uberfire.ext.plugin.model.DynamicMenuItem object, int index, org.uberfire.ext.plugin.client.editor.DynamicMenuEditorPresenter.UpdateIndexOperation operation)  
      • Methods inherited from class org.uberfire.ext.editor.commons.client.BaseEditor

        addDownloadMenuItem, buildMenuBar, disableMenuItem, downloadMenuItem, enableMenuItem, getBeforeSaveAndRenameCommand, getCurrentContentHash, getMetadataSupplier, getPathSupplier, getRenameServiceCaller, getSaveAndRename, getSaveAndRenameCommandBuilder, getSaveSuccessCallback, getSaveValidator, getValidateCommand, getVersionRecordManager, init, init, init, isDirty, isDirtySupplier, makeMenuBar, mayClose, onAfterValidate, onBeforeValidate, onRename, onRestore, onSave, onSuccess, onValidate, reload, setMetadataOriginalHash, setOriginalHash, showConcurrentUpdatePopup, showVersions
    • Method Detail

      • 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:
        getTitle in class org.uberfire.ext.editor.commons.client.BaseEditor<org.uberfire.ext.plugin.model.Plugin,​org.uberfire.ext.editor.commons.file.DefaultMetadata>
      • getTitleText

        public String getTitleText()
        Overrides:
        getTitleText in class org.uberfire.ext.editor.commons.client.BaseEditor<org.uberfire.ext.plugin.model.Plugin,​org.uberfire.ext.editor.commons.file.DefaultMetadata>
      • getMenus

        public void getMenus​(Consumer<org.uberfire.workbench.model.menu.Menus> menusConsumer)
        Overrides:
        getMenus in class org.uberfire.ext.editor.commons.client.BaseEditor<org.uberfire.ext.plugin.model.Plugin,​org.uberfire.ext.editor.commons.file.DefaultMetadata>
      • onPlugInRenamed

        protected void onPlugInRenamed​(@Observes
                                       org.uberfire.ext.plugin.event.PluginRenamed pluginRenamed)
      • getMenuItemActivityIdValidator

        public RuleValidator getMenuItemActivityIdValidator()
      • getMenuItemLabelValidator

        public RuleValidator getMenuItemLabelValidator​(org.uberfire.ext.plugin.model.DynamicMenuItem menuItem,
                                                       org.uberfire.ext.plugin.model.DynamicMenuItem editedMenuItem)
      • addMenuItem

        public void addMenuItem​(org.uberfire.ext.plugin.model.DynamicMenuItem menuItem)
      • getExistingMenuItem

        public org.uberfire.ext.plugin.model.DynamicMenuItem getExistingMenuItem​(org.uberfire.ext.plugin.model.DynamicMenuItem currentMenuItem,
                                                                                 org.uberfire.ext.plugin.model.DynamicMenuItem editedMenuItem)
      • removeObject

        public void removeObject​(org.uberfire.ext.plugin.model.DynamicMenuItem object)
      • updateIndex

        public void updateIndex​(org.uberfire.ext.plugin.model.DynamicMenuItem object,
                                int index,
                                org.uberfire.ext.plugin.client.editor.DynamicMenuEditorPresenter.UpdateIndexOperation operation)
      • setDataDisplay

        public void setDataDisplay​(com.google.gwt.view.client.HasData<org.uberfire.ext.plugin.model.DynamicMenuItem> display)
      • loadContent

        protected void loadContent()
        Specified by:
        loadContent in class org.uberfire.ext.editor.commons.client.BaseEditor<org.uberfire.ext.plugin.model.Plugin,​org.uberfire.ext.editor.commons.file.DefaultMetadata>
      • getContentSupplier

        protected Supplier<org.uberfire.ext.plugin.model.Plugin> getContentSupplier()
        Overrides:
        getContentSupplier in class org.uberfire.ext.editor.commons.client.BaseEditor<org.uberfire.ext.plugin.model.Plugin,​org.uberfire.ext.editor.commons.file.DefaultMetadata>
      • onValidate

        protected org.uberfire.mvp.Command onValidate()
      • save

        protected void save()
        Overrides:
        save in class org.uberfire.ext.editor.commons.client.BaseEditor<org.uberfire.ext.plugin.model.Plugin,​org.uberfire.ext.editor.commons.file.DefaultMetadata>
      • onMayClose

        @OnMayClose
        public boolean onMayClose()
      • getContent

        public org.uberfire.ext.plugin.model.DynamicMenu getContent()
      • getRenameValidator

        public org.uberfire.ext.editor.commons.client.validation.Validator getRenameValidator()
        Overrides:
        getRenameValidator in class org.uberfire.ext.editor.commons.client.BaseEditor<org.uberfire.ext.plugin.model.Plugin,​org.uberfire.ext.editor.commons.file.DefaultMetadata>
      • getCopyValidator

        public org.uberfire.ext.editor.commons.client.validation.Validator getCopyValidator()
        Overrides:
        getCopyValidator in class org.uberfire.ext.editor.commons.client.BaseEditor<org.uberfire.ext.plugin.model.Plugin,​org.uberfire.ext.editor.commons.file.DefaultMetadata>
      • getDeleteServiceCaller

        protected org.jboss.errai.common.client.api.Caller<? extends org.uberfire.ext.editor.commons.service.support.SupportsDelete> getDeleteServiceCaller()
        Overrides:
        getDeleteServiceCaller in class org.uberfire.ext.editor.commons.client.BaseEditor<org.uberfire.ext.plugin.model.Plugin,​org.uberfire.ext.editor.commons.file.DefaultMetadata>
      • getSaveAndRenameServiceCaller

        protected org.jboss.errai.common.client.api.Caller<? extends org.uberfire.ext.editor.commons.service.support.SupportsSaveAndRename<org.uberfire.ext.plugin.model.Plugin,​org.uberfire.ext.editor.commons.file.DefaultMetadata>> getSaveAndRenameServiceCaller()
        Overrides:
        getSaveAndRenameServiceCaller in class org.uberfire.ext.editor.commons.client.BaseEditor<org.uberfire.ext.plugin.model.Plugin,​org.uberfire.ext.editor.commons.file.DefaultMetadata>
      • getCopyServiceCaller

        protected org.jboss.errai.common.client.api.Caller<? extends org.uberfire.ext.editor.commons.service.support.SupportsCopy> getCopyServiceCaller()
        Overrides:
        getCopyServiceCaller in class org.uberfire.ext.editor.commons.client.BaseEditor<org.uberfire.ext.plugin.model.Plugin,​org.uberfire.ext.editor.commons.file.DefaultMetadata>
      • getDynamicMenuItems

        protected List<org.uberfire.ext.plugin.model.DynamicMenuItem> getDynamicMenuItems()