|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xwiki.gwt.wysiwyg.client.widget.wizard.util.AbstractFileUploadWizardStep
public abstract class AbstractFileUploadWizardStep
Wizard step to handle the upload of a file to a wiki page: display the file input and upload on finish.
| Field Summary | |
|---|---|
protected static java.lang.String |
FIELD_ERROR_STYLE
The style of the fields under error. |
| Constructor Summary | |
|---|---|
AbstractFileUploadWizardStep(WikiServiceAsync wikiService)
Creates a new file upload wizard step that uses the given service to get information about the uploaded files. |
|
| Method Summary | |
|---|---|
com.google.gwt.user.client.ui.Widget |
display()
|
protected void |
displayError(java.lang.String errorMessage)
Displays the error message and markers for this dialog. |
protected java.lang.String |
extractFileName()
|
java.lang.String |
getDirectionName(NavigationListener.NavigationDirection direction)
|
java.lang.String |
getFileHelpLabel()
|
protected java.lang.String |
getFileLabel()
|
protected com.google.gwt.user.client.ui.FileUpload |
getFileUploadInput()
|
protected java.lang.String |
getFileUploadInputName()
|
protected com.google.gwt.user.client.ui.Panel |
getMainPanel()
Method for retrieving the main UI (panel) by sub-classes so that they can customize it. |
java.lang.String |
getStepTitle()
|
protected abstract WikiPageReference |
getTargetPageReference()
|
protected void |
getUploadURL(com.google.gwt.user.client.rpc.AsyncCallback<java.lang.String> cb)
Requests the upload URL from the server. |
java.util.EnumSet<NavigationListener.NavigationDirection> |
getValidDirections()
|
WikiServiceAsync |
getWikiService()
|
protected void |
hideError()
Hides the error message and markers for this dialog. |
void |
init(java.lang.Object data,
com.google.gwt.user.client.rpc.AsyncCallback<?> cb)
|
protected abstract void |
onAttachmentUploaded(Attachment attach,
com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Boolean> async)
Notifies the successful completion of a file upload, to be overridden by subclasses to provide specific behavior. |
void |
onCancel()
|
void |
onSubmit(com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Boolean> async)
|
protected void |
onSubmitComplete(com.google.gwt.user.client.ui.FormPanel.SubmitCompleteEvent event,
com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Boolean> async)
Handles the submit completion in asynchronous mode, to pass the result of processing the result in the received callback. |
void |
setFileHelpLabel(java.lang.String fileHelpLabelText)
Sets the help label for the file input. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.xwiki.gwt.user.client.ui.wizard.WizardStep |
|---|
getNextStep, getResult |
| Field Detail |
|---|
protected static final java.lang.String FIELD_ERROR_STYLE
| Constructor Detail |
|---|
public AbstractFileUploadWizardStep(WikiServiceAsync wikiService)
wikiService - the service used to access the uploaded attachments| Method Detail |
|---|
protected java.lang.String getFileLabel()
public java.lang.String getFileHelpLabel()
public void setFileHelpLabel(java.lang.String fileHelpLabelText)
fileHelpLabelText - the new help label text for the file inputprotected void getUploadURL(com.google.gwt.user.client.rpc.AsyncCallback<java.lang.String> cb)
cb - the object to be notified when the upload URL is receivedprotected java.lang.String getFileUploadInputName()
name attribute of the fileUploadInput, to be returned by subclasses implementing
#getUploadURL() to set the file upload form data
public void init(java.lang.Object data,
com.google.gwt.user.client.rpc.AsyncCallback<?> cb)
init in interface WizardSteppublic com.google.gwt.user.client.ui.Widget display()
display in interface WizardSteppublic java.lang.String getDirectionName(NavigationListener.NavigationDirection direction)
getDirectionName in interface WizardSteppublic java.lang.String getStepTitle()
getStepTitle in interface WizardSteppublic java.util.EnumSet<NavigationListener.NavigationDirection> getValidDirections()
getValidDirections in interface WizardSteppublic void onCancel()
onCancel in interface WizardStepWizardStep.onCancel()public void onSubmit(com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Boolean> async)
onSubmit in interface WizardStepWizardStep.onSubmit(AsyncCallback)
protected void onSubmitComplete(com.google.gwt.user.client.ui.FormPanel.SubmitCompleteEvent event,
com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Boolean> async)
event - the original FormPanel.SubmitCompleteEventasync - the callback used to send back the response of form event processing#onSubmit}
protected abstract void onAttachmentUploaded(Attachment attach,
com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Boolean> async)
attach - the successfully uploaded attachmentasync - the call-back used to indicate the completion of this method. It's required that the sub-classes
invoke async.onSuccess(true); method once they are done with processing the attachment. Without this
method being invoked, the submission of this wizard step will not complete.protected abstract WikiPageReference getTargetPageReference()
protected java.lang.String extractFileName()
protected com.google.gwt.user.client.ui.Panel getMainPanel()
protected com.google.gwt.user.client.ui.FileUpload getFileUploadInput()
protected void displayError(java.lang.String errorMessage)
errorMessage - the error message to display.protected void hideError()
public WikiServiceAsync getWikiService()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||