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
,java.io.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:
- Serialized Form
-
-
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<java.lang.String> updateListener)
Creates a new instance and binds it to a UI instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
editPointer(CmsResource resource)
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, java.util.List<CmsResource> directPublishResources)
Gets the publish data for the given resources.protected java.lang.String
getSerializedPublishData(CmsPublishData data)
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(java.util.List<java.lang.String> changedStructureIds, long delayMillis)
Disposes of the extension, and tells the server which resources have changed.void
openCategories(CmsResource resource)
Opens the categories dialog for the given resource.void
openContentEditor(java.lang.String structureId, java.lang.String sitePath)
Opens the content editor in a dialog for editing the provided file.void
openGalleryDialog(CmsResource resource)
Opens the gallery dialog for the given gallery folder.void
openInfoDialog(CmsResource resource, java.lang.String startTab)
Opens the resource info dialog.void
openLockReport(CmsResource resource)
Opens the lock report for the given resource.protected void
openPublishDailog(CmsProject project, java.util.List<CmsResource> directPublishResources)
Opens the publish dialog for the given project.void
openPublishDialog()
Opens the publish dialog.void
openPublishDialog(java.util.List<CmsResource> resources)
Tells the client to open the publish dialog for the given resources.void
openPublishDialog(CmsProject project)
Opens the publish dialog for the given project.void
openReplaceDialog(CmsUUID structureId)
Opens the 'Replace' dialog for the resource with the given structure id.void
showAbout()
Shows the OpenCms about dialog.void
showPreview(CmsUUID id, java.lang.Integer version, CmsHistoryVersion.OfflineOnline offlineOnline)
Shows the prewview dialog for a given resource and version.void
showUserPreferences()
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
-
-
-
-
Constructor Detail
-
CmsGwtDialogExtension
public CmsGwtDialogExtension(com.vaadin.ui.UI ui, I_CmsUpdateListener<java.lang.String> updateListener)
Creates a new instance and binds it to a UI instance.- Parameters:
ui
- the UI to bind this extension toupdateListener
- the update listener
-
-
Method Detail
-
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 resourceeditName
- 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 interfaceI_CmsGwtDialogServerRpc
- Parameters:
reinitUI
-true
to reinit the UI- See Also:
I_CmsGwtDialogServerRpc.onClose(boolean)
-
onClose
public void onClose(java.util.List<java.lang.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 interfaceI_CmsGwtDialogServerRpc
- Parameters:
changedStructureIds
- the structure ids of changed resources, as stringsdelayMillis
- time to delay the RPC (for allowing short background operations to finish)- See Also:
I_CmsGwtDialogServerRpc.onClose(java.util.List, long)
-
openCategories
public void openCategories(CmsResource resource)
Opens the categories dialog for the given resource.- Parameters:
resource
- the resource
-
openContentEditor
public void openContentEditor(java.lang.String structureId, java.lang.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, java.lang.String startTab)
Opens the resource info dialog.- Parameters:
resource
- the resourcestartTab
- 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(java.util.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, java.lang.Integer version, CmsHistoryVersion.OfflineOnline offlineOnline)
Shows the prewview dialog for a given resource and version.- Parameters:
id
- the structure id of the resourceversion
- the versionofflineOnline
- indicates whether we want the offlne or online version
-
showUserPreferences
public void showUserPreferences()
Shows the user preferences.
-
getPublishData
protected CmsPublishData getPublishData(CmsProject project, java.util.List<CmsResource> directPublishResources)
Gets the publish data for the given resources.- Parameters:
directPublishResources
- the resources to publishproject
- the project for which to open the dialog- Returns:
- the publish data for the resources
-
getSerializedPublishData
protected java.lang.String getSerializedPublishData(CmsPublishData data)
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, java.util.List<CmsResource> directPublishResources)
Opens the publish dialog for the given project.- Parameters:
project
- the project for which to open the dialogdirectPublishResources
- the resources for which to open the publish dialog.
-
-