Class 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, java.lang.Iterable<com.google.gwt.user.client.ui.Widget>, I_CmsAutoHider

    public class CmsPublishDialog
    extends CmsPopup
    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
    • Constructor Detail

      • CmsPublishDialog

        public CmsPublishDialog​(org.opencms.ade.publish.shared.CmsPublishData initData,
                                java.lang.Runnable refreshAction,
                                I_CmsContentEditorHandler editorHandler)
        Constructs a new publish dialog.

        Parameters:
        initData - the initial data
        refreshAction - the action to perform on a context menu triggered refresh
        editorHandler - the content editor handler
    • Method Detail

      • showPublishDialog

        public 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,
                                             java.lang.Runnable refreshAction,
                                             I_CmsContentEditorHandler editorHandler)
        Shows the publish dialog.

        Parameters:
        result - the publish data
        handler - the dialog close handler (may be null)
        refreshAction - the action to execute on a context menu triggered refresh
        editorHandler - the content editor handler (may be null)
      • showPublishDialog

        public static void showPublishDialog​(java.util.HashMap<java.lang.String,​java.lang.String> params,
                                             com.google.gwt.event.logical.shared.CloseHandler<com.google.gwt.user.client.ui.PopupPanel> handler,
                                             java.lang.Runnable refreshAction,
                                             I_CmsContentEditorHandler editorHandler)
        Convenience method which opens a publish dialog.

        Parameters:
        handler - the close handler
        params - the additional publish dialog parameters
        refreshAction - the action to execute after a context menu triggered refresh
        editorHandler - the content editor handler
      • showPublishDialog

        public static void showPublishDialog​(java.lang.Runnable refreshAction)
        Convenience method which opens a publish dialog.

        Parameters:
        refreshAction - the action to execute after a context menu triggered refresh
      • getService

        protected static org.opencms.ade.publish.shared.rpc.I_CmsPublishServiceAsync getService()
        Returns the publish service instance.

        Returns:
        the publish service instance
      • executeAction

        public void executeAction​(org.opencms.ade.publish.shared.CmsWorkflowAction actionKey)
        Executes the specified action for the selected resources.

        Parameters:
        actionKey - the workflow action
      • getFailureMessage

        public java.lang.String getFailureMessage()
        Gets the failure message.

        Returns:
        the failure message
      • getLastAction

        public org.opencms.ade.publish.shared.CmsWorkflowAction getLastAction()
        Gets the last workflow action.

        Returns:
        the last workflow action
      • getPublishOptions

        public org.opencms.ade.publish.shared.CmsPublishOptions getPublishOptions()
        Returns the current publish options.

        Returns:
        a publish options bean
      • hasFailed

        public boolean hasFailed()
        Checks whether the publish dialog has failed.

        Returns:
        checks whether the publish dialog has succeeded
      • hasSucceeded

        public boolean hasSucceeded()
        Checks whether the publish dialog has succeeded.

        Returns:
        true if the publish dialog has succeeded
      • onCancel

        public void onCancel()
        Method which is called when the cancel button is pressed.

      • onGoBack

        public void onGoBack()
        Method which is called when the back button is pressed.

      • onReceivePublishList

        public void onReceivePublishList​(org.opencms.ade.publish.shared.CmsPublishGroupList groups)
        Method which is called after the publish list has been received from the server.

        Parameters:
        groups - the groups of the publish list
      • onReceiveStatus

        public void onReceiveStatus​(org.opencms.ade.publish.shared.CmsWorkflowResponse brokenResources)
        Method which is called after the status from a publish action has arrived.

        Parameters:
        brokenResources - the list of broken resources
      • setIncludeRelated

        public void setIncludeRelated​(boolean includeRelated)
        Sets the include related resources option.

        Parameters:
        includeRelated - the include related option
      • setIncludeSiblings

        public void setIncludeSiblings​(boolean includeSiblings)
        Sets the include sibling resources option.

        Parameters:
        includeSiblings - the include siblings option
      • setPanel

        public void setPanel​(int panelId)
        Changes the currently active panel.

        Parameters:
        panelId - the number of the panel to show
      • setProjectChanged

        public void setProjectChanged()
        This is called when the user just changed the project.

      • setProjectId

        public void setProjectId​(org.opencms.util.CmsUUID projectId)
        Sets the selected project id.

        Parameters:
        projectId - the project id
      • setWorkflowId

        public void setWorkflowId​(java.lang.String workflowId)
        Sets the selected workflow id.

        Parameters:
        workflowId - the workflow id
      • succeed

        public void succeed()
        Sets the publish dialog state to 'success'.

      • updateResourceList

        public void updateResourceList()
        Method which is called when the publish options are changed.

      • getSelectedWorkflow

        protected org.opencms.ade.publish.shared.CmsWorkflow getSelectedWorkflow()
        Returns the selected workflow.

        Returns:
        the selected workflow
      • getWorkflowActionParams

        protected org.opencms.ade.publish.shared.CmsWorkflowActionParams getWorkflowActionParams()
        Gets the workflow action parameters to which the workflow action should be applied.

        Returns:
        the workflow action parameters
      • setLastAction

        protected void setLastAction​(org.opencms.ade.publish.shared.CmsWorkflowAction action)
        Sets the last workflow action.

        Parameters:
        action - a workflow action