Class A_CmsUploadDialog

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.ade.upload.client.ui.A_CmsUploadDialog
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
Direct Known Subclasses:
CmsUploadDialogFormDataImpl, CmsUploadDialogImpl

public abstract class A_CmsUploadDialog extends CmsPopup implements I_CmsUploadDialog
Provides an upload dialog.

Since:
8.0.0
  • 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)
    • createInfoBean

      public abstract org.opencms.gwt.shared.CmsListInfoBean createInfoBean(CmsFileInfo file)
      Creates a bean that can be used for the list item widget.

      Parameters:
      file - the info to create the bean for
      Returns:
      a list info bean
    • getFileSizeTooLargeMessage

      Returns the massage for too large files.

      Parameters:
      file - the file
      Returns:
      the message
    • isTooLarge

      public abstract boolean isTooLarge(CmsFileInfo cmsFileInfo)
      Returns true if the file is too large, false otherwise.

      Parameters:
      cmsFileInfo - the file to check
      Returns:
      true if the file is too large, false otherwise
    • loadAndShow

      public void loadAndShow()
      Loads and shows this dialog.

    • parseResponse

      public void parseResponse(String results)
      Description copied from interface: I_CmsUploadDialog
      Parses the upload response.

      Specified by:
      parseResponse in interface I_CmsUploadDialog
      Parameters:
      results - the upload response
      See Also:
    • setContext

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

      Parameters:
      context - the new upload context
    • setIsTargetRootPath

      public void setIsTargetRootPath(boolean isTargetRootPath)
      Sets the boolean flag to control whether the target folder is interpreted as a root path.

      Parameters:
      isTargetRootPath - true if the target folder should be treated as a root path
    • setPostCreateHandler

      public void setPostCreateHandler(String postCreateHandler)
      Sets the post-create handler.
      Parameters:
      postCreateHandler - the post-create handler
    • setTargetFolder

      public void setTargetFolder(String target)
      Sets the target folder.

      Parameters:
      target - the target folder to set
    • 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
    • submit

      public void submit()
      Executes the submit action.

    • updateHandler

      public void updateHandler()
      Updates the button handler.
    • updateSummary

      public abstract void updateSummary()
      Updates the file summary.

    • addFileInput

      protected void addFileInput(CmsFileInput fileInput)
      Adds the given file input field to this dialog.

      Parameters:
      fileInput - the file input field to add
    • addFiles

      protected void addFiles(List<CmsFileInfo> fileInfos)
      Adds the given file input field to this dialog.

      Parameters:
      fileInfos - the file info objects
    • cancelUpdateProgress

      protected void cancelUpdateProgress()
      Cancels the upload progress timer.

    • cancelUpload

      protected void cancelUpload()
      Cancels the upload.

    • createLoadingAnimation

      protected void createLoadingAnimation(String msg)
      Creates the loading animation HTML and adds is to the content wrapper.

      Parameters:
      msg - the message to display below the animation
    • disableOKButton

      protected void disableOKButton(String disabledReason)
      Disables the OK button.

      Parameters:
      disabledReason - the reason for disabling the OK button
    • doResize

      protected void doResize()
      Required to be called when the content has changed.

    • enableOKButton

      protected void enableOKButton()
      Enables the OK button.

    • getContentLength

      protected long getContentLength()
      Returns the contentLength.

      Returns:
      the contentLength
    • getContentWrapper

      protected com.google.gwt.user.client.ui.FlowPanel getContentWrapper()
      Returns the contentWrapper.

      Returns:
      the contentWrapper
    • getFilesToUnzip

      protected List<String> getFilesToUnzip(boolean all)
      Returns the list of file names that have to unziped.

      Parameters:
      all - true if the returned list should contain those filenames that are not inside the map of files to upload. false only those filenames are returned that are also inside the map of files to upload
      Returns:
      the list of file names that have to unziped
    • getFilesToUpload

      Returns the filesToUpload.

      Returns:
      the filesToUpload
    • getFileText

      protected String getFileText()
      Returns "files" or "file" depending on the files to upload.

      Returns:
      "files" or "file" depending on the files to upload
    • getPostCreateHandler

      Gets the post-create handler.
      Returns:
      the post-create handler
    • getResourceType

      Returns the resource type name for a given filename.

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

      protected String getTargetFolder()
      Returns the targetFolder.

      Returns:
      the targetFolder
    • 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
    • insertUploadForm

      protected void insertUploadForm(com.google.gwt.user.client.ui.FormPanel form)
      Inserts a hidden form into.

      Parameters:
      form - the form to insert
    • onOkClick

      protected void onOkClick()
      The action that is executed if the user clicks on the OK button.

      If the selection dialog is currently shown the selected files are checked otherwise the upload is triggered.

    • onResize

      protected void onResize()
      Required to be called when the content has changed.

    • proceedWorkflow

      protected void proceedWorkflow(org.opencms.gwt.shared.CmsUploadFileBean result)
      Decides how to go on depending on the information of the server response.

      Shows a warning if there is another upload process active (inside the same session).

      Otherwise if the list of files to upload contains already existent resources on the VFS or if there are files selected that have invalid file names the overwrite dialog is shown.

      Only if there is no other upload process running and none of the selected files is already existent on the VFS the upload is triggered.

      Parameters:
      result - the bean that contains the information to evaluate
    • removeDragAndDropMessage

      protected void removeDragAndDropMessage()
      Removes the drag and drop message.

    • setContentLength

      protected void setContentLength(long contentLength)
      Sets the contentLength.

      Parameters:
      contentLength - the contentLength to set
    • setContentWrapperHeight

      protected void setContentWrapperHeight()
      Execute to set the content wrapper height.

    • setDragAndDropMessage

      protected void setDragAndDropMessage()
      Displays the 'use drag and drop' / 'no drag and drop available' message.

    • setSummaryHTML

      protected void setSummaryHTML(String html)
      Sets the HTML of the selection summary.

      Parameters:
      html - the HTML to set as String
    • 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