Package org.opencms.ade.publish.client
Class CmsPublishDialog
java.lang.Object
com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Panel
com.google.gwt.user.client.ui.SimplePanel
com.google.gwt.user.client.ui.PopupPanel
org.opencms.gwt.client.ui.CmsPopup
org.opencms.ade.publish.client.CmsPublishDialog
- All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers
,com.google.gwt.event.logical.shared.HasCloseHandlers<com.google.gwt.user.client.ui.PopupPanel>
,com.google.gwt.event.shared.HasHandlers
,com.google.gwt.user.client.EventListener
,com.google.gwt.user.client.EventPreview
,com.google.gwt.user.client.ui.AcceptsOneWidget
,com.google.gwt.user.client.ui.HasAnimation
,com.google.gwt.user.client.ui.HasOneWidget
,com.google.gwt.user.client.ui.HasVisibility
,com.google.gwt.user.client.ui.HasWidgets
,com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
,com.google.gwt.user.client.ui.IsWidget
,com.google.gwt.user.client.ui.SourcesPopupEvents
,Iterable<com.google.gwt.user.client.ui.Widget>
,I_CmsAutoHider
Main class for the publish dialog.
This class is mostly responsible for the control flow and RPC calls of the publish dialog.
It delegates most of the actual GUI work to the CmsPublishSelectPanel
and CmsBrokenLinksPanel
classes.
- Since:
- 8.0.0
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
A type which represents the state of a publish action.Nested classes/interfaces inherited from class org.opencms.gwt.client.ui.CmsPopup
CmsPopup.HistoryHandler
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.PopupPanel
com.google.gwt.user.client.ui.PopupPanel.AnimationType, com.google.gwt.user.client.ui.PopupPanel.PositionCallback
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets
com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The dialog width in pixels.protected CmsPublishSelectPanel
The panel for selecting the resources to publish or remove from the publish list.The project map used by showPublishDialog.static final int
The index of the "broken links" panel.static final int
The index of the publish selection panel.Fields inherited from class org.opencms.gwt.client.ui.CmsPopup
DEFAULT_WIDTH, m_closeCommand, m_notificationWidgetInstalled, m_windowWidth, WIDE_WIDTH
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
-
Constructor Summary
ConstructorDescriptionCmsPublishDialog
(org.opencms.ade.publish.shared.CmsPublishData initData, Runnable refreshAction, I_CmsContentEditorHandler editorHandler) Constructs a new publish dialog. -
Method Summary
Modifier and TypeMethodDescriptionvoid
executeAction
(org.opencms.ade.publish.shared.CmsWorkflowAction actionKey) Executes the specified action for the selected resources.Gets the context menu handler.Returns the content editor handler.Gets the failure message.org.opencms.ade.publish.shared.CmsWorkflowAction
Gets the last workflow action.Gets the context menu handler.org.opencms.ade.publish.shared.CmsPublishOptions
Returns the current publish options.protected org.opencms.ade.publish.shared.CmsWorkflow
Returns the selected workflow.protected static org.opencms.ade.publish.shared.rpc.I_CmsPublishServiceAsync
Returns the publish service instance.getState()
Gets the publish dialog state.protected org.opencms.ade.publish.shared.CmsWorkflowActionParams
Gets the workflow action parameters to which the workflow action should be applied.boolean
Checks whether the publish dialog has failed.boolean
Checks whether the publish dialog has succeeded.void
onCancel()
Method which is called when the cancel button is pressed.void
onGoBack()
Method which is called when the back button is pressed.void
onReceivePublishList
(org.opencms.ade.publish.shared.CmsPublishGroupList groups) Method which is called after the publish list has been received from the server.void
onReceiveStatus
(org.opencms.ade.publish.shared.CmsWorkflowResponse brokenResources) Method which is called after the status from a publish action has arrived.void
setIncludeRelated
(boolean includeRelated) Sets the include related resources option.void
setIncludeSiblings
(boolean includeSiblings) Sets the include sibling resources option.protected void
setLastAction
(org.opencms.ade.publish.shared.CmsWorkflowAction action) Sets the last workflow action.void
setPanel
(int panelId) Changes the currently active panel.void
This is called when the user just changed the project.void
setProjectId
(org.opencms.util.CmsUUID projectId) Sets the selected project id.void
setWorkflowId
(String workflowId) Sets the selected workflow id.static void
showPublishDialog
(Runnable refreshAction) Convenience method which opens a publish dialog.static void
showPublishDialog
(HashMap<String, String> params, com.google.gwt.event.logical.shared.CloseHandler<com.google.gwt.user.client.ui.PopupPanel> handler, Runnable refreshAction, I_CmsContentEditorHandler editorHandler) Convenience method which opens a publish dialog.static void
showPublishDialog
(org.opencms.ade.publish.shared.CmsPublishData result, com.google.gwt.event.logical.shared.CloseHandler<com.google.gwt.user.client.ui.PopupPanel> handler, Runnable refreshAction, I_CmsContentEditorHandler editorHandler) Shows the publish dialog.void
succeed()
Sets the publish dialog state to 'success'.void
Method which is called when the publish options are changed.Methods inherited from class org.opencms.gwt.client.ui.CmsPopup
add, add, addButton, addButton, addDialogClose, adjustIndex, beginDragging, catchNotifications, center, centerHorizontally, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, clear, continueDragging, createDialogNotificationWidget, doAttachChildren, doDetachChildren, endDragging, getAvailableHeight, getCaption, getChildren, getContainerElement, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, getWidth, hasCaption, hide, hide, insert, insert, insertFront, installNotificationWidget, iterator, onBrowserEvent, onDetach, onPreviewNativeEvent, remove, remove, removeAllButtons, removeButton, removePadding, setBackgroundColor, setCaption, setHeight, setHeight, setMainContent, setPixelSize, setPositionFixed, setSize, setSpecialBackgroundClass, setUseAnimation, setWidget, setWidth, setWidth, show, showArrow, wrapWithBorderPadding
Methods inherited from class com.google.gwt.user.client.ui.PopupPanel
addAutoHidePartner, addCloseHandler, addPopupListener, getAnimationType, getGlassElement, getGlassStyleName, getOffsetHeight, getOffsetWidth, getPopupLeft, getPopupTop, getStyleElement, getTitle, isAnimationEnabled, isAutoHideEnabled, isAutoHideOnHistoryEventsEnabled, isGlassEnabled, isModal, isPreviewingAllNativeEvents, isShowing, isVisible, onEventPreview, onKeyDownPreview, onKeyPressPreview, onKeyUpPreview, onUnload, removeAutoHidePartner, removePopupListener, setAnimationEnabled, setAnimationType, setAutoHideEnabled, setAutoHideOnHistoryEventsEnabled, setGlassEnabled, setGlassStyleName, setModal, setPopupPosition, setPopupPositionAndShow, setPreviewingAllNativeEvents, setTitle, setVisible, showRelativeTo
Methods inherited from class com.google.gwt.user.client.ui.SimplePanel
getWidget, setWidget
Methods inherited from class com.google.gwt.user.client.ui.Panel
add, adopt, orphan, remove
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onLoad, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
Methods inherited from interface org.opencms.gwt.client.ui.I_CmsAutoHider
addAutoHidePartner, isAutoHideEnabled, isAutoHideOnHistoryEventsEnabled, removeAutoHidePartner, setAutoHideEnabled, setAutoHideOnHistoryEventsEnabled
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
DIALOG_WIDTH
The dialog width in pixels.- See Also:
-
m_staticProjects
The project map used by showPublishDialog. -
PANEL_BROKEN_LINKS
The index of the "broken links" panel.- See Also:
-
PANEL_SELECT
The index of the publish selection panel.- See Also:
-
m_publishSelectPanel
The panel for selecting the resources to publish or remove from the publish list.
-
-
Constructor Details
-
Method Details
-
showPublishDialog
Convenience method which opens a publish dialog.- Parameters:
refreshAction
- the action to execute after a context menu triggered refresh
-
getService
Returns the publish service instance.- Returns:
- the publish service instance
-
getContextMenuHandler
Gets the context menu handler.- Returns:
- the context menu handler
-
getEditorHandler
Returns the content editor handler.- Returns:
- the content editor handler
-
getFailureMessage
Gets the failure message.- Returns:
- the failure message
-
getLastAction
Gets the last workflow action.- Returns:
- the last workflow action
-
getMenuHandler
Gets the context menu handler. -
getPublishOptions
Returns the current publish options.- Returns:
- a publish options bean
-
getState
Gets the publish dialog state.- Returns:
- the publish dialog state
-
hasFailed
Checks whether the publish dialog has failed.- Returns:
- checks whether the publish dialog has succeeded
-
hasSucceeded
Checks whether the publish dialog has succeeded.- Returns:
- true if the publish dialog has succeeded
-
onCancel
Method which is called when the cancel button is pressed. -
onGoBack
Method which is called when the back button is pressed. -
setIncludeRelated
Sets the include related resources option.- Parameters:
includeRelated
- the include related option
-
setIncludeSiblings
Sets the include sibling resources option.- Parameters:
includeSiblings
- the include siblings option
-
setPanel
Changes the currently active panel.- Parameters:
panelId
- the number of the panel to show
-
setProjectChanged
This is called when the user just changed the project. -
setProjectId
Sets the selected project id.- Parameters:
projectId
- the project id
-
setWorkflowId
Sets the selected workflow id.- Parameters:
workflowId
- the workflow id
-
succeed
Sets the publish dialog state to 'success'. -
updateResourceList
Method which is called when the publish options are changed. -
getSelectedWorkflow
Returns the selected workflow.- Returns:
- the selected workflow
-
getWorkflowActionParams
Gets the workflow action parameters to which the workflow action should be applied.- Returns:
- the workflow action parameters