public abstract class AbstractProjectDiagramEditor<R extends org.uberfire.client.workbench.type.ClientResourceType> extends KieEditor<ProjectDiagramResource>
| Modifier and Type | Class and Description |
|---|---|
static interface |
AbstractProjectDiagramEditor.View |
| Modifier and Type | Field and Description |
|---|---|
protected ProjectDiagramEditorProxy |
editorProxy |
protected ClientProjectDiagramService |
projectDiagramServices |
alertsButtonMenuItemBuilder, assetUpdateValidator, copyPopUpPresenter, deletePopUpPresenter, fileMenuBuilder, kieView, metadata, overviewWidget, projectController, renamePopUpPresenter, savePopUpPresenter, workbenchContextbaseView, changeTitleNotification, concurrentDeleteAcceptedEvent, concurrentDeleteIgnoredEvent, concurrentRenameAcceptedEvent, concurrentRenameIgnoredEvent, concurrentUpdateSessionInfo, fileNameValidator, isReadOnly, isValidationRunning, menuBuilder, menuBuilderManagedInstance, menuItems, menus, metadataOriginalHash, notification, originalHash, place, placeManager, saveAndRenameCommandBuilder, type, versionRecordManager| Constructor and Description |
|---|
AbstractProjectDiagramEditor(AbstractProjectDiagramEditor.View view,
org.uberfire.client.mvp.PlaceManager placeManager,
org.uberfire.client.workbench.widgets.common.ErrorPopupPresenter errorPopupPresenter,
javax.enterprise.event.Event<org.uberfire.client.workbench.events.ChangeTitleWidgetEvent> changeTitleNotificationEvent,
org.uberfire.ext.editor.commons.client.file.popups.SavePopUpPresenter savePopUpPresenter,
R resourceType,
ClientProjectDiagramService projectDiagramServices,
org.jboss.errai.ioc.client.api.ManagedInstance<SessionEditorPresenter<EditorSession>> editorSessionPresenterInstances,
org.jboss.errai.ioc.client.api.ManagedInstance<SessionViewerPresenter<ViewerSession>> viewerSessionPresenterInstances,
AbstractProjectEditorMenuSessionItems<?> menuSessionItems,
javax.enterprise.event.Event<OnDiagramFocusEvent> onDiagramFocusEvent,
javax.enterprise.event.Event<OnDiagramLoseFocusEvent> onDiagramLostFocusEvent,
ProjectMessagesListener projectMessagesListener,
DiagramClientErrorHandler diagramClientErrorHandler,
ClientTranslationService translationService,
org.uberfire.ext.widgets.core.client.editors.texteditor.TextEditorView xmlEditorView,
org.jboss.errai.common.client.api.Caller<ProjectDiagramResourceService> projectDiagramResourceServiceCaller) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
destroySession() |
protected void |
doClose() |
protected void |
doFocus() |
protected void |
doLostFocus() |
protected void |
doOpen() |
protected void |
doSave(org.uberfire.mvp.Command continueSaveOnceValid) |
protected void |
doSave(String commitMessage) |
protected void |
doShowNoChangesSinceLastSaveMessage(String message) |
protected void |
doStartUp(org.uberfire.backend.vfs.ObservablePath path,
org.uberfire.mvp.PlaceRequest place) |
protected String |
formatTitle(String title)
Format the Diagram title to be displayed on the Editor.
|
protected CanvasHandler |
getCanvasHandler() |
protected abstract int |
getCanvasHeight() |
protected abstract int |
getCanvasWidth() |
protected Supplier<ProjectDiagramResource> |
getContentSupplier() |
protected Integer |
getCurrentContentHash() |
protected int |
getCurrentDiagramHash() |
protected ProjectDiagram |
getDiagram() |
protected abstract String |
getEditorIdentifier() |
protected ProjectDiagramEditorProxy |
getEditorProxy() |
protected org.uberfire.workbench.model.menu.Menus |
getMenus() |
AbstractProjectEditorMenuSessionItems |
getMenuSessionItems() |
protected org.uberfire.mvp.Command |
getSaveAndRename() |
protected org.jboss.errai.common.client.api.Caller<? extends org.uberfire.ext.editor.commons.service.support.SupportsSaveAndRename<ProjectDiagramResource,org.guvnor.common.services.shared.metadata.model.Metadata>> |
getSaveAndRenameServiceCaller() |
org.jboss.errai.common.client.api.RemoteCallback<org.uberfire.backend.vfs.Path> |
getSaveSuccessCallback(int newHash) |
SessionPresenter<? extends ClientSession,?,Diagram> |
getSessionPresenter() |
String |
getTitleText() |
protected ClientTranslationService |
getTranslationService() |
protected AbstractProjectDiagramEditor.View |
getView() |
protected boolean |
hasUnsavedChanges() |
void |
hideDiagramEditorDocks(org.uberfire.client.workbench.events.PlaceHiddenEvent event) |
protected void |
hideLoadingViews() |
void |
init() |
protected void |
initialiseKieEditorForSession(ProjectDiagram diagram) |
protected boolean |
isReadOnly() |
protected boolean |
isSameSession(ClientSession other) |
protected void |
loadContent() |
protected void |
log(Level level,
String message) |
protected void |
makeAdditionalStunnerMenus(FileMenuBuilder fileMenuBuilder) |
protected void |
makeMenuBar() |
protected ProjectDiagramEditorProxy |
makeStunnerEditorProxy() |
protected ProjectDiagramEditorProxy |
makeXmlEditorProxy() |
protected SessionEditorPresenter<EditorSession> |
newSessionEditorPresenter() |
protected SessionViewerPresenter<ViewerSession> |
newSessionViewerPresenter() |
protected void |
onDiagramLoad() |
protected void |
onLoadError(ClientRuntimeError error) |
protected void |
onSave() |
protected void |
onSaveError(ClientRuntimeError error) |
protected void |
onSaveSuccess() |
protected void |
onValidate(org.uberfire.mvp.Command finished) |
protected void |
onValidationFailed(Collection<DiagramElementViolation<RuleViolation>> violations) |
void |
open(ProjectDiagram diagram) |
protected void |
openReadOnlySession(ProjectDiagram diagram) |
protected void |
openSession(ProjectDiagram diagram) |
protected void |
save()
This method is called just once clicking on save.
|
protected void |
save(String commitMessage)
Considering the diagram valid at this point ,
it delegates the save operation to the diagram services bean.
|
protected void |
setEditorSessionPresenter(SessionEditorPresenter<EditorSession> presenter) |
protected void |
setReadOnlySessionPresenter(SessionViewerPresenter<ViewerSession> presenter) |
void |
showDiagramEditorDocks(org.uberfire.client.workbench.events.PlaceGainFocusEvent event) |
protected void |
showError(ClientRuntimeError error) |
protected void |
showError(String message) |
protected void |
showLoadingViews() |
protected void |
showSavingViews() |
protected void |
updateTitle(String title) |
addCommonActions, addCopy, addDelete, addDownloadMenuItem, addImportsTab, addPage, addRename, addSave, addSourcePage, buildMenuBar, canUpdateProject, createOriginalHash, getCouldNotGenerateSourceErrorCallback, getMetadataSupplier, getNoSuchFileExceptionErrorCallback, getRenameValidator, getSelectedTabIndex, getWidget, init, init, init, init, isEditorTabSelected, isOverviewTabSelected, mayClose, mayClose, OnClose, onEditTabSelected, onEditTabUnselected, onOverviewSelected, onRepositoryRemoved, onSourceTabSelected, resetEditorPages, saveAction, selectEditorTab, selectOverviewTab, setOriginalHash, setSelectedTab, showVersions, updateSourceaddDownloadMenuItem, downloadMenuItem, getCopyServiceCaller, getCopyValidator, getDeleteServiceCaller, getPathSupplier, getRenameServiceCaller, getSaveAndRenameCommandBuilder, getTitle, getValidateCommand, getVersionRecordManager, init, isDirty, isDirtySupplier, onAfterValidate, onBeforeValidate, onRename, onRestore, onSuccess, reload, setMetadataOriginalHash, showConcurrentUpdatePopupprotected ClientProjectDiagramService projectDiagramServices
protected ProjectDiagramEditorProxy editorProxy
@Inject public AbstractProjectDiagramEditor(AbstractProjectDiagramEditor.View view, org.uberfire.client.mvp.PlaceManager placeManager, org.uberfire.client.workbench.widgets.common.ErrorPopupPresenter errorPopupPresenter, javax.enterprise.event.Event<org.uberfire.client.workbench.events.ChangeTitleWidgetEvent> changeTitleNotificationEvent, org.uberfire.ext.editor.commons.client.file.popups.SavePopUpPresenter savePopUpPresenter, R resourceType, ClientProjectDiagramService projectDiagramServices, org.jboss.errai.ioc.client.api.ManagedInstance<SessionEditorPresenter<EditorSession>> editorSessionPresenterInstances, org.jboss.errai.ioc.client.api.ManagedInstance<SessionViewerPresenter<ViewerSession>> viewerSessionPresenterInstances, AbstractProjectEditorMenuSessionItems<?> menuSessionItems, javax.enterprise.event.Event<OnDiagramFocusEvent> onDiagramFocusEvent, javax.enterprise.event.Event<OnDiagramLoseFocusEvent> onDiagramLostFocusEvent, ProjectMessagesListener projectMessagesListener, DiagramClientErrorHandler diagramClientErrorHandler, ClientTranslationService translationService, org.uberfire.ext.widgets.core.client.editors.texteditor.TextEditorView xmlEditorView, org.jboss.errai.common.client.api.Caller<ProjectDiagramResourceService> projectDiagramResourceServiceCaller)
protected abstract int getCanvasWidth()
protected abstract int getCanvasHeight()
@PostConstruct public void init()
protected void doStartUp(org.uberfire.backend.vfs.ObservablePath path,
org.uberfire.mvp.PlaceRequest place)
protected void loadContent()
loadContent in class org.uberfire.ext.editor.commons.client.BaseEditor<ProjectDiagramResource,org.guvnor.common.services.shared.metadata.model.Metadata>public void open(ProjectDiagram diagram)
protected ProjectDiagramEditorProxy makeStunnerEditorProxy()
protected ProjectDiagramEditorProxy makeXmlEditorProxy()
protected boolean isReadOnly()
protected void openSession(ProjectDiagram diagram)
protected void openReadOnlySession(ProjectDiagram diagram)
protected void initialiseKieEditorForSession(ProjectDiagram diagram)
protected void onDiagramLoad()
protected SessionEditorPresenter<EditorSession> newSessionEditorPresenter()
protected SessionViewerPresenter<ViewerSession> newSessionViewerPresenter()
protected void onValidate(org.uberfire.mvp.Command finished)
onValidate in class org.uberfire.ext.editor.commons.client.BaseEditor<ProjectDiagramResource,org.guvnor.common.services.shared.metadata.model.Metadata>protected void save()
save in class KieEditor<ProjectDiagramResource>protected void doSave(org.uberfire.mvp.Command continueSaveOnceValid)
protected void save(String commitMessage)
save in class KieEditor<ProjectDiagramResource>commitMessage - The commit's message.protected void doSave(String commitMessage)
public org.jboss.errai.common.client.api.RemoteCallback<org.uberfire.backend.vfs.Path> getSaveSuccessCallback(int newHash)
getSaveSuccessCallback in class org.uberfire.ext.editor.commons.client.BaseEditor<ProjectDiagramResource,org.guvnor.common.services.shared.metadata.model.Metadata>public void hideDiagramEditorDocks(@Observes
org.uberfire.client.workbench.events.PlaceHiddenEvent event)
public void showDiagramEditorDocks(@Observes
org.uberfire.client.workbench.events.PlaceGainFocusEvent event)
protected void makeMenuBar()
makeMenuBar in class KieEditor<ProjectDiagramResource>protected org.uberfire.mvp.Command getSaveAndRename()
getSaveAndRename in class org.uberfire.ext.editor.commons.client.BaseEditor<ProjectDiagramResource,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<ProjectDiagramResource,org.guvnor.common.services.shared.metadata.model.Metadata>> getSaveAndRenameServiceCaller()
getSaveAndRenameServiceCaller in class org.uberfire.ext.editor.commons.client.BaseEditor<ProjectDiagramResource,org.guvnor.common.services.shared.metadata.model.Metadata>protected Supplier<ProjectDiagramResource> getContentSupplier()
getContentSupplier in class org.uberfire.ext.editor.commons.client.BaseEditor<ProjectDiagramResource,org.guvnor.common.services.shared.metadata.model.Metadata>protected ProjectDiagramEditorProxy getEditorProxy()
protected Integer getCurrentContentHash()
getCurrentContentHash in class org.uberfire.ext.editor.commons.client.BaseEditor<ProjectDiagramResource,org.guvnor.common.services.shared.metadata.model.Metadata>protected void doOpen()
protected void doFocus()
protected void doLostFocus()
protected void doClose()
protected void showLoadingViews()
protected void showSavingViews()
protected void hideLoadingViews()
protected boolean isSameSession(ClientSession other)
protected abstract String getEditorIdentifier()
public String getTitleText()
getTitleText in class org.uberfire.ext.editor.commons.client.BaseEditor<ProjectDiagramResource,org.guvnor.common.services.shared.metadata.model.Metadata>protected org.uberfire.workbench.model.menu.Menus getMenus()
protected void onSave()
onSave in class KieEditor<ProjectDiagramResource>protected void doShowNoChangesSinceLastSaveMessage(String message)
protected void destroySession()
protected void updateTitle(String title)
protected String formatTitle(String title)
title - diagram metadata titleprotected int getCurrentDiagramHash()
protected CanvasHandler getCanvasHandler()
protected ProjectDiagram getDiagram()
protected AbstractProjectDiagramEditor.View getView()
protected void onSaveSuccess()
protected void onSaveError(ClientRuntimeError error)
protected void onValidationFailed(Collection<DiagramElementViolation<RuleViolation>> violations)
protected void onLoadError(ClientRuntimeError error)
protected void showError(ClientRuntimeError error)
protected void showError(String message)
protected boolean hasUnsavedChanges()
protected ClientTranslationService getTranslationService()
protected void makeAdditionalStunnerMenus(FileMenuBuilder fileMenuBuilder)
public SessionPresenter<? extends ClientSession,?,Diagram> getSessionPresenter()
public AbstractProjectEditorMenuSessionItems getMenuSessionItems()
protected void setEditorSessionPresenter(SessionEditorPresenter<EditorSession> presenter)
protected void setReadOnlySessionPresenter(SessionViewerPresenter<ViewerSession> presenter)
Copyright © 2001–2018 JBoss by Red Hat. All rights reserved.