Package org.opencms.ade.upload.client.ui
Class CmsDialogUploadButtonHandler
java.lang.Object
org.opencms.ade.upload.client.ui.CmsDialogUploadButtonHandler
- All Implemented Interfaces:
I_CmsUploadButtonHandler
Default upload button handler which is used for the upload dialog.
-
Constructor Summary
ConstructorDescriptionCmsDialogUploadButtonHandler
(com.google.common.base.Supplier<I_CmsUploadContext> contextFactory) Creates a new upload button handler.CmsDialogUploadButtonHandler
(com.google.common.base.Supplier<I_CmsUploadContext> contextFactory, String targetFolder, boolean isRootPath) Creates a new upload button handler. -
Method Summary
Modifier and TypeMethodDescriptionvoid
initializeFileInput
(CmsFileInput fileInput) Custom setup method for newly created file inputs.void
onChange
(CmsFileInput fileInput) Notifies the button handler that the file input field's value has changed.void
openDialogWithFiles
(List<CmsFileInfo> files) Opens the upload dialog for the given file references.void
setButton
(I_CmsUploadButton button) This method should be called when the handler is set on a button.void
setCloseHandler
(com.google.gwt.event.logical.shared.CloseHandler<com.google.gwt.user.client.ui.PopupPanel> closeHandler) Sets the close handler for the dialog.void
setIsTargetRootPath
(boolean isTargetRootPath) Chooses whether the target folder should be interpreted as a root path.void
setPostCreateHandler
(String postCreateHandler) Sets the post-create handler.void
setTargetFolder
(String targetFolder) Sets the upload target folder.void
setUploadDialog
(A_CmsUploadDialog uploadDialog) Sets the upload dialog instance.protected void
Updates the dialog with the current close handler and target folder.
-
Constructor Details
-
CmsDialogUploadButtonHandler
public CmsDialogUploadButtonHandler(com.google.common.base.Supplier<I_CmsUploadContext> contextFactory) Creates a new upload button handler.- Parameters:
contextFactory
- the context factory to use for upload contexts
-
CmsDialogUploadButtonHandler
public CmsDialogUploadButtonHandler(com.google.common.base.Supplier<I_CmsUploadContext> contextFactory, String targetFolder, boolean isRootPath) Creates a new upload button handler.- Parameters:
contextFactory
- the context factory to use for upload contextstargetFolder
- the target folderisRootPath
- true fi the target folder is a root path
-
-
Method Details
-
initializeFileInput
Description copied from interface:I_CmsUploadButtonHandler
Custom setup method for newly created file inputs.- Specified by:
initializeFileInput
in interfaceI_CmsUploadButtonHandler
- Parameters:
fileInput
- the new file input- See Also:
-
onChange
Description copied from interface:I_CmsUploadButtonHandler
Notifies the button handler that the file input field's value has changed.- Specified by:
onChange
in interfaceI_CmsUploadButtonHandler
- Parameters:
fileInput
- the file input- See Also:
-
openDialogWithFiles
Opens the upload dialog for the given file references.- Parameters:
files
- the file references
-
setButton
Description copied from interface:I_CmsUploadButtonHandler
This method should be called when the handler is set on a button.- Specified by:
setButton
in interfaceI_CmsUploadButtonHandler
- Parameters:
button
- the button for which the handler instance has been set- See Also:
-
setIsTargetRootPath
Chooses whether the target folder should be interpreted as a root path.- Parameters:
isTargetRootPath
- true if the target folder should be treated as a root path
-
setPostCreateHandler
Sets the post-create handler.- Parameters:
postCreateHandler
- the post-create handler
-
setTargetFolder
Sets the upload target folder.- Parameters:
targetFolder
- the upload target folder
-
setUploadDialog
Sets the upload dialog instance.- Parameters:
uploadDialog
- the upload dialog instance
-
updateDialog
Updates the dialog with the current close handler and target folder.
-