Class CmsPublishDialog

  • All Implemented Interfaces:,<>,,,,,,,,,,,, java.lang.Iterable<>, 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.

    • Constructor Detail

      • CmsPublishDialog

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

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

        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,
                                   <> handler,
                                             java.lang.Runnable refreshAction,
                                             I_CmsContentEditorHandler editorHandler)
        Convenience method which opens a publish dialog.

        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.

        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.

        the publish service instance
      • executeAction

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

        actionKey - the workflow action
      • getFailureMessage

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

        the failure message
      • getLastAction

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

        the last workflow action
      • getPublishOptions

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

        a publish options bean
      • hasFailed

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

        checks whether the publish dialog has succeeded
      • hasSucceeded

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

        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.

        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.

        brokenResources - the list of broken resources
      • setIncludeRelated

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

        includeRelated - the include related option
      • setIncludeSiblings

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

        includeSiblings - the include siblings option
      • setPanel

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

        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.

        projectId - the project id
      • setWorkflowId

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

        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.

        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.

        the workflow action parameters
      • setLastAction

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

        action - a workflow action