Class CmsSingleFileUploadDialog

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.ui.client.CmsSingleFileUploadDialog
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, I_CmsUploadDialog

public class CmsSingleFileUploadDialog extends CmsPopup implements I_CmsUploadDialog
The single file upload dialog.

  • Field Details

  • Constructor Details

  • Method Details

    • addCloseHandler

      public com.google.gwt.event.shared.HandlerRegistration addCloseHandler(com.google.gwt.event.logical.shared.CloseHandler<com.google.gwt.user.client.ui.PopupPanel> handler)
      Specified by:
      addCloseHandler in interface com.google.gwt.event.logical.shared.HasCloseHandlers<com.google.gwt.user.client.ui.PopupPanel>
      Overrides:
      addCloseHandler in class com.google.gwt.user.client.ui.PopupPanel
      See Also:
      • PopupPanel.addCloseHandler(com.google.gwt.event.logical.shared.CloseHandler)
    • getFinishAction

      Returns the action which should be executed when the upload dialog is finished.

      Returns:
      an action to run when the upload dialog is finished
    • hide

      public void hide()
      Description copied from interface: I_CmsAutoHider
      Hides the widget.

      Specified by:
      hide in interface I_CmsAutoHider
      Overrides:
      hide in class CmsPopup
      See Also:
    • parseResponse

      public void parseResponse(String results)
      Parses the upload response of the server and decides what to do.

      Specified by:
      parseResponse in interface I_CmsUploadDialog
      Parameters:
      results - a JSON Object
    • setContext

      public void setContext(I_CmsUploadContext context)
      Sets the upload context.

      Parameters:
      context - the new upload context
    • setFinishAction

      public void setFinishAction(Runnable action)
      Sets an action that should be executed if the upload dialog is finished.

      Parameters:
      action - the action to execute when finished
    • showErrorReport

      public void showErrorReport(String message, String stacktrace)
      Shows the error report.

      Specified by:
      showErrorReport in interface I_CmsUploadDialog
      Parameters:
      message - the message to show
      stacktrace - the stacktrace to show
    • cancelReplace

      protected void cancelReplace()
      Cancels the replace process.

    • cancelUpdateProgress

      protected void cancelUpdateProgress()
      Cancels the upload progress timer.

    • getResourceType

      Returns the resource type name for a given filename.

      Parameters:
      file - the file info
      Returns:
      the resource type name
    • getUploadService

      protected org.opencms.gwt.shared.rpc.I_CmsUploadServiceAsync getUploadService()
      Returns the upload service instance.

      Returns:
      the upload service instance
    • getUploadUri

      protected String getUploadUri()
      Returns the upload JSP uri.

      Returns:
      the upload JSP uri
    • setFileInput

      protected void setFileInput(CmsFileInput fileInput)
      Sets the file input.

      Parameters:
      fileInput - the file input
    • updateProgress

      protected void updateProgress()
      Retrieves the progress information from the server.

    • updateProgressBar

      protected void updateProgressBar(org.opencms.gwt.shared.CmsUploadProgessInfo info)
      Updates the progress bar.

      Parameters:
      info - the progress info
    • uploadFile

      protected void uploadFile()
      Uploads the selected file.