com.xpn.xwiki.wysiwyg.client.plugin.link.ui
Class AttachmentUploadWizardStep

java.lang.Object
  extended by com.xpn.xwiki.wysiwyg.client.widget.wizard.util.AbstractFileUploadWizardStep
      extended by com.xpn.xwiki.wysiwyg.client.plugin.link.ui.AttachmentUploadWizardStep
All Implemented Interfaces:
WizardStep

public class AttachmentUploadWizardStep
extends AbstractFileUploadWizardStep

Specific file upload wizard step to handle upload of a new file attachment in order to create a link to it.

Version:
$Id: AttachmentUploadWizardStep.java 25780 2009-12-14 09:41:47Z mflorea $

Field Summary
 
Fields inherited from class com.xpn.xwiki.wysiwyg.client.widget.wizard.util.AbstractFileUploadWizardStep
FIELD_ERROR_STYLE
 
Constructor Summary
AttachmentUploadWizardStep(ResourceName editedResource)
          Builds an attachment upload wizard step for the currently edited resource.
 
Method Summary
protected  java.lang.String getFileHelpLabel()
          
 java.lang.String getNextStep()
          
protected  java.lang.String getPage()
          
 java.lang.Object getResult()
          
protected  java.lang.String getSpace()
          
protected  java.lang.String getWiki()
          
 void init(java.lang.Object data, com.google.gwt.user.client.rpc.AsyncCallback<?> cb)
          
protected  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.
 
Methods inherited from class com.xpn.xwiki.wysiwyg.client.widget.wizard.util.AbstractFileUploadWizardStep
display, displayError, extractFileName, getDirectionName, getFileLabel, getFileUploadInput, getFileUploadInputName, getMainPanel, getStepTitle, getUploadURL, getValidDirections, hideError, onCancel, onSubmit, onSubmitComplete, setWikiService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttachmentUploadWizardStep

public AttachmentUploadWizardStep(ResourceName editedResource)
Builds an attachment upload wizard step for the currently edited resource.

Parameters:
editedResource - the resource currently edited by this wizard step, i.e. the currently edited wiki document
Method Detail

getNextStep

public java.lang.String getNextStep()


getResult

public java.lang.Object getResult()


init

public void init(java.lang.Object data,
                 com.google.gwt.user.client.rpc.AsyncCallback<?> cb)

Specified by:
init in interface WizardStep
Overrides:
init in class AbstractFileUploadWizardStep

getPage

protected java.lang.String getPage()

Specified by:
getPage in class AbstractFileUploadWizardStep
Returns:
the document to upload this file to, or null if the default document should be used.

getSpace

protected java.lang.String getSpace()

Specified by:
getSpace in class AbstractFileUploadWizardStep
Returns:
the space of the document to upload this file to, or null if the default space should be used.

getWiki

protected java.lang.String getWiki()

Specified by:
getWiki in class AbstractFileUploadWizardStep
Returns:
the wiki of the document to upload this file to, or null if the default wiki should be used.

getFileHelpLabel

protected java.lang.String getFileHelpLabel()

Specified by:
getFileHelpLabel in class AbstractFileUploadWizardStep
Returns:
the help label for the file input

onAttachmentUploaded

protected 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.

Specified by:
onAttachmentUploaded in class AbstractFileUploadWizardStep
Parameters:
attach - the successfully uploaded attachment
async - 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.


Copyright © 2004-2010 XWiki. All Rights Reserved.