public abstract class A_CmsUploadDialog extends CmsPopup implements I_CmsUploadDialog
com.google.gwt.user.client.ui.PopupPanel.PositionCallback
限定符和类型 | 字段和说明 |
---|---|
protected I_CmsUploadContext |
m_context
The upload context.
|
protected com.google.gwt.user.client.ui.HTML |
m_dragAndDropMessage
The drag and drop message.
|
protected CmsScrollPanel |
m_scrollPanel
The scroll panel.
|
protected java.util.List<java.lang.String> |
m_uploadedFiles
The uploaded file names.
|
m_closeCommand, m_notificationWidgetInstalled, m_windowWidth
构造器和说明 |
---|
A_CmsUploadDialog()
Default constructor.
|
限定符和类型 | 方法和说明 |
---|---|
com.google.gwt.event.shared.HandlerRegistration |
addCloseHandler(com.google.gwt.event.logical.shared.CloseHandler<com.google.gwt.user.client.ui.PopupPanel> handler) |
protected void |
addFileInput(CmsFileInput fileInput)
Adds the given file input field to this dialog.
|
protected void |
addFiles(java.util.List<CmsFileInfo> fileInfos)
Adds the given file input field to this dialog.
|
protected void |
cancelUpdateProgress()
Cancels the upload progress timer.
|
protected void |
cancelUpload()
Cancels the upload.
|
abstract CmsListInfoBean |
createInfoBean(CmsFileInfo file)
Creates a bean that can be used for the list item widget.
|
protected void |
createLoadingAnimation(java.lang.String msg)
Creates the loading animation HTML and adds is to the content wrapper.
|
protected void |
disableOKButton(java.lang.String disabledReason)
Disables the OK button.
|
protected void |
doResize()
Required to be called when the content has changed.
|
protected void |
enableOKButton()
Enables the OK button.
|
protected long |
getContentLength()
Returns the contentLength.
|
protected com.google.gwt.user.client.ui.FlowPanel |
getContentWrapper()
Returns the contentWrapper.
|
abstract java.lang.String |
getFileSizeTooLargeMessage(CmsFileInfo file)
Returns the massage for too large files.
|
protected java.util.List<java.lang.String> |
getFilesToUnzip(boolean all)
Returns the list of file names that have to unziped.
|
protected java.util.Map<java.lang.String,CmsFileInfo> |
getFilesToUpload()
Returns the filesToUpload.
|
protected java.lang.String |
getFileText()
Returns "files" or "file" depending on the files to upload.
|
protected java.lang.String |
getResourceType(CmsFileInfo file)
Returns the resource type name for a given filename.
|
protected java.lang.String |
getTargetFolder()
Returns the targetFolder.
|
protected I_CmsUploadServiceAsync |
getUploadService()
Returns the upload service instance.
|
protected java.lang.String |
getUploadUri()
Returns the upload JSP uri.
|
protected void |
insertUploadForm(com.google.gwt.user.client.ui.FormPanel form)
Inserts a hidden form into.
|
abstract boolean |
isTooLarge(CmsFileInfo cmsFileInfo)
Returns
true if the file is too large, false otherwise. |
void |
loadAndShow()
Loads and shows this dialog.
|
protected void |
onOkClick()
The action that is executed if the user clicks on the OK button.
|
void |
parseResponse(java.lang.String results)
Parses the upload response of the server and decides what to do.
|
protected void |
proceedWorkflow(CmsUploadFileBean result)
Decides how to go on depending on the information of the server response.
|
protected void |
removeDragAndDropMessage()
Removes the drag and drop message.
|
protected void |
setContentLength(long contentLength)
Sets the contentLength.
|
protected void |
setContentWrapperHeight()
Execute to set the content wrapper height.
|
void |
setContext(I_CmsUploadContext context)
Sets the upload context.
|
protected void |
setDragAndDropMessage()
Displays the 'use drag and drop' / 'no drag and drop available' message.
|
void |
setIsTargetRootPath(boolean isTargetRootPath)
Sets the boolean flag to control whether the target folder is interpreted as a root path.
|
protected void |
setSummaryHTML(java.lang.String html)
Sets the HTML of the selection summary.
|
void |
setTargetFolder(java.lang.String target)
Sets the target folder.
|
void |
showErrorReport(java.lang.String message,
java.lang.String stacktrace)
Shows the error report.
|
void |
submit()
Executes the submit action.
|
protected void |
updateProgress()
Retrieves the progress information from the server.
|
protected void |
updateProgressBar(CmsUploadProgessInfo info)
Updates the progress bar.
|
abstract void |
updateSummary()
Updates the file summary.
|
add, add, addButton, addButton, addDialogClose, adjustIndex, beginDragging, catchNotifications, center, centerHorizontally, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, clear, continueDragging, createDialogNotificationWidget, doAttachChildren, doDetachChildren, endDragging, getAvailableHeight, getCaption, getChildren, getContainerElement, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, getWidth, hasCaption, hide, insert, insert, insertFront, installNotificationWidget, iterator, onBrowserEvent, onDetach, onPreviewNativeEvent, remove, remove, removeAllButtons, removeButton, removePadding, setBackgroundColor, setCaption, setHeight, setHeight, setMainContent, setPixelSize, setPositionFixed, setSize, setSpecialBackgroundClass, setUseAnimation, setWidget, setWidth, setWidth, show, showArrow, wrapWithBorderPadding
addAutoHidePartner, addPopupListener, getGlassElement, getGlassStyleName, getOffsetHeight, getOffsetWidth, getPopupLeft, getPopupTop, getStyleElement, getTitle, hide, isAnimationEnabled, isAutoHideEnabled, isAutoHideOnHistoryEventsEnabled, isGlassEnabled, isModal, isPreviewingAllNativeEvents, isShowing, isVisible, onEventPreview, onKeyDownPreview, onKeyPressPreview, onKeyUpPreview, onUnload, removeAutoHidePartner, removePopupListener, setAnimationEnabled, setAutoHideEnabled, setAutoHideOnHistoryEventsEnabled, setGlassEnabled, setGlassStyleName, setModal, setPopupPosition, setPopupPositionAndShow, setPreviewingAllNativeEvents, setTitle, setVisible, showRelativeTo
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onLoad, removeFromParent, setLayoutData, sinkEvents
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent, toString, unsinkEvents
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addAutoHidePartner, isAutoHideEnabled, isAutoHideOnHistoryEventsEnabled, removeAutoHidePartner, setAutoHideEnabled, setAutoHideOnHistoryEventsEnabled
protected I_CmsUploadContext m_context
protected com.google.gwt.user.client.ui.HTML m_dragAndDropMessage
protected CmsScrollPanel m_scrollPanel
protected java.util.List<java.lang.String> m_uploadedFiles
public com.google.gwt.event.shared.HandlerRegistration addCloseHandler(com.google.gwt.event.logical.shared.CloseHandler<com.google.gwt.user.client.ui.PopupPanel> handler)
addCloseHandler
在接口中 com.google.gwt.event.logical.shared.HasCloseHandlers<com.google.gwt.user.client.ui.PopupPanel>
addCloseHandler
在类中 com.google.gwt.user.client.ui.PopupPanel
PopupPanel.addCloseHandler(com.google.gwt.event.logical.shared.CloseHandler)
public abstract CmsListInfoBean createInfoBean(CmsFileInfo file)
file
- the info to create the bean forpublic abstract java.lang.String getFileSizeTooLargeMessage(CmsFileInfo file)
file
- the filepublic abstract boolean isTooLarge(CmsFileInfo cmsFileInfo)
true
if the file is too large, false
otherwise.cmsFileInfo
- the file to checktrue
if the file is too large, false
otherwisepublic void loadAndShow()
public void parseResponse(java.lang.String results)
parseResponse
在接口中 I_CmsUploadDialog
results
- a JSON Objectpublic void setContext(I_CmsUploadContext context)
context
- the new upload contextpublic void setIsTargetRootPath(boolean isTargetRootPath)
isTargetRootPath
- true if the target folder should be treated as a root pathpublic void setTargetFolder(java.lang.String target)
target
- the target folder to setpublic void showErrorReport(java.lang.String message, java.lang.String stacktrace)
showErrorReport
在接口中 I_CmsUploadDialog
message
- the message to showstacktrace
- the stacktrace to showpublic void submit()
public abstract void updateSummary()
protected void addFileInput(CmsFileInput fileInput)
fileInput
- the file input field to addprotected void addFiles(java.util.List<CmsFileInfo> fileInfos)
fileInfos
- the file info objectsprotected void cancelUpdateProgress()
protected void cancelUpload()
protected void createLoadingAnimation(java.lang.String msg)
msg
- the message to display below the animationprotected void disableOKButton(java.lang.String disabledReason)
disabledReason
- the reason for disabling the OK buttonprotected void doResize()
protected void enableOKButton()
protected long getContentLength()
protected com.google.gwt.user.client.ui.FlowPanel getContentWrapper()
protected java.util.List<java.lang.String> getFilesToUnzip(boolean all)
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 uploadprotected java.util.Map<java.lang.String,CmsFileInfo> getFilesToUpload()
protected java.lang.String getFileText()
protected java.lang.String getResourceType(CmsFileInfo file)
file
- the file infoprotected java.lang.String getTargetFolder()
protected I_CmsUploadServiceAsync getUploadService()
protected java.lang.String getUploadUri()
protected void insertUploadForm(com.google.gwt.user.client.ui.FormPanel form)
form
- the form to insertprotected void onOkClick()
If the selection dialog is currently shown the selected files are checked otherwise the upload is triggered.
protected void proceedWorkflow(CmsUploadFileBean result)
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.
result
- the bean that contains the information to evaluateprotected void removeDragAndDropMessage()
protected void setContentLength(long contentLength)
contentLength
- the contentLength to setprotected void setContentWrapperHeight()
protected void setDragAndDropMessage()
protected void setSummaryHTML(java.lang.String html)
html
- the HTML to set as Stringprotected void updateProgress()
protected void updateProgressBar(CmsUploadProgessInfo info)
info
- the progress info