Class CmsGwtDialogExtension

java.lang.Object
com.vaadin.server.AbstractClientConnector
com.vaadin.server.AbstractExtension
org.opencms.ui.components.extensions.CmsGwtDialogExtension
All Implemented Interfaces:
com.vaadin.event.MethodEventSource, com.vaadin.server.ClientConnector, com.vaadin.server.Extension, com.vaadin.shared.communication.ServerRpc, com.vaadin.shared.Connector, Serializable, I_CmsGwtDialogServerRpc

public class CmsGwtDialogExtension extends com.vaadin.server.AbstractExtension implements I_CmsGwtDialogServerRpc
Extension used to open existing GWT based dialogs (from ADE, etc.) from the server side, for use in context menu actions.

See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from interface com.vaadin.server.ClientConnector

    com.vaadin.server.ClientConnector.AttachEvent, com.vaadin.server.ClientConnector.AttachListener, com.vaadin.server.ClientConnector.ConnectorErrorEvent, com.vaadin.server.ClientConnector.DetachEvent, com.vaadin.server.ClientConnector.DetachListener
  • Constructor Summary

    Constructors
    Constructor
    Description
    CmsGwtDialogExtension(com.vaadin.ui.UI ui, I_CmsUpdateListener<String> updateListener)
    Creates a new instance and binds it to a UI instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Opens the dialog for editing pointer resources.
    void
    editProperties(CmsUUID structureId, boolean editName)
    Open property editor for the resource with the given structure id.
    protected CmsPublishData
    getPublishData(CmsProject project, List<CmsResource> directPublishResources)
    Gets the publish data for the given resources.
    protected String
    Serializes a CmsPublishData object into string form using the GWT serialization.
    void
    onClose(boolean reinitUI)
    Disposes of the extension and tells the server whether to re-init the UI.
    void
    onClose(List<String> changedStructureIds, long delayMillis)
    Disposes of the extension, and tells the server which resources have changed.
    void
    Opens the categories dialog for the given resource.
    void
    openContentEditor(String structureId, String sitePath)
    Opens the content editor in a dialog for editing the provided file.
    void
    Opens the gallery dialog for the given gallery folder.
    void
    openInfoDialog(CmsResource resource, String startTab)
    Opens the resource info dialog.
    void
    Opens the lock report for the given resource.
    protected void
    openPublishDailog(CmsProject project, List<CmsResource> directPublishResources)
    Opens the publish dialog for the given project.
    void
    Opens the publish dialog.
    void
    Tells the client to open the publish dialog for the given resources.
    void
    Opens the publish dialog for the given project.
    void
    Opens the 'Replace' dialog for the resource with the given structure id.
    void
    Shows the OpenCms about dialog.
    void
    Shows the prewview dialog for a given resource and version.
    void
    Shows the user preferences.

    Methods inherited from class com.vaadin.server.AbstractExtension

    extend, getParent, getSupportedParentType, remove, setParent

    Methods inherited from class com.vaadin.server.AbstractClientConnector

    addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addListener, addListener, addListener, addMethodInvocationToQueue, attach, beforeClientResponse, createState, detach, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getState, getState, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isConnectorEnabled, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource, updateDiffstate

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.vaadin.server.ClientConnector

    addAttachListener, addDetachListener, attach, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, getUI, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler

    Methods inherited from interface com.vaadin.shared.Connector

    getConnectorId
  • Constructor Details

    • CmsGwtDialogExtension

      public CmsGwtDialogExtension(com.vaadin.ui.UI ui, I_CmsUpdateListener<String> updateListener)
      Creates a new instance and binds it to a UI instance.

      Parameters:
      ui - the UI to bind this extension to
      updateListener - the update listener
  • Method Details

    • editPointer

      public void editPointer(CmsResource resource)
      Opens the dialog for editing pointer resources.

      Parameters:
      resource - the pointer resource
    • editProperties

      public void editProperties(CmsUUID structureId, boolean editName)
      Open property editor for the resource with the given structure id.

      Parameters:
      structureId - the structure id of a resource
      editName - controls whether the file name should be editable
    • onClose

      public void onClose(boolean reinitUI)
      Description copied from interface: I_CmsGwtDialogServerRpc
      Disposes of the extension and tells the server whether to re-init the UI.

      Specified by:
      onClose in interface I_CmsGwtDialogServerRpc
      Parameters:
      reinitUI - true to reinit the UI
      See Also:
    • onClose

      public void onClose(List<String> changedStructureIds, long delayMillis)
      Description copied from interface: I_CmsGwtDialogServerRpc
      Disposes of the extension, and tells the server which resources have changed.

      Specified by:
      onClose in interface I_CmsGwtDialogServerRpc
      Parameters:
      changedStructureIds - the structure ids of changed resources, as strings
      delayMillis - time to delay the RPC (for allowing short background operations to finish)
      See Also:
    • openCategories

      public void openCategories(CmsResource resource)
      Opens the categories dialog for the given resource.

      Parameters:
      resource - the resource
    • openContentEditor

      public void openContentEditor(String structureId, String sitePath)
      Opens the content editor in a dialog for editing the provided file.
      Parameters:
      structureId - structure id of the file to edit.
      sitePath - site path of the file to edit.
    • openGalleryDialog

      public void openGalleryDialog(CmsResource resource)
      Opens the gallery dialog for the given gallery folder.

      Parameters:
      resource - the gallery folder resource
    • openInfoDialog

      public void openInfoDialog(CmsResource resource, String startTab)
      Opens the resource info dialog.

      Parameters:
      resource - the resource
      startTab - the start tab id
    • openLockReport

      public void openLockReport(CmsResource resource)
      Opens the lock report for the given resource.

      Parameters:
      resource - the resource for which to display the lock report
    • openPublishDialog

      public void openPublishDialog()
      Opens the publish dialog.

    • openPublishDialog

      public void openPublishDialog(CmsProject project)
      Opens the publish dialog for the given project.

      Parameters:
      project - the project for which to open the dialog
    • openPublishDialog

      public void openPublishDialog(List<CmsResource> resources)
      Tells the client to open the publish dialog for the given resources.

      Parameters:
      resources - the resources for which to open the publish dialog.
    • openReplaceDialog

      public void openReplaceDialog(CmsUUID structureId)
      Opens the 'Replace' dialog for the resource with the given structure id.

      Parameters:
      structureId - the structure id
    • showAbout

      public void showAbout()
      Shows the OpenCms about dialog.

    • showPreview

      public void showPreview(CmsUUID id, Integer version, CmsHistoryVersion.OfflineOnline offlineOnline)
      Shows the prewview dialog for a given resource and version.

      Parameters:
      id - the structure id of the resource
      version - the version
      offlineOnline - indicates whether we want the offlne or online version
    • showUserPreferences

      public void showUserPreferences()
      Shows the user preferences.

    • getPublishData

      protected CmsPublishData getPublishData(CmsProject project, List<CmsResource> directPublishResources)
      Gets the publish data for the given resources.

      Parameters:
      directPublishResources - the resources to publish
      project - the project for which to open the dialog
      Returns:
      the publish data for the resources
    • getSerializedPublishData

      Serializes a CmsPublishData object into string form using the GWT serialization.

      Parameters:
      data - the publish data
      Returns:
      the serialized publish data
    • openPublishDailog

      protected void openPublishDailog(CmsProject project, List<CmsResource> directPublishResources)
      Opens the publish dialog for the given project.

      Parameters:
      project - the project for which to open the dialog
      directPublishResources - the resources for which to open the publish dialog.