org.xwiki.gwt.wysiwyg.client.widget.wizard.util
Class LinkUploadWizardStep<C extends EntityConfig>

java.lang.Object
  extended by org.xwiki.gwt.wysiwyg.client.widget.wizard.util.AbstractFileUploadWizardStep
      extended by org.xwiki.gwt.wysiwyg.client.widget.wizard.util.LinkUploadWizardStep<C>
Type Parameters:
C - the type of configuration data associated with a link
All Implemented Interfaces:
WizardStep

public class LinkUploadWizardStep<C extends EntityConfig>
extends AbstractFileUploadWizardStep

Generic wizard step that can be used by wizards that create links to attachments.

Version:
$Id: LinkUploadWizardStep.java 31743 2010-10-13 01:20:32Z mflorea $

Field Summary
 
Fields inherited from class org.xwiki.gwt.wysiwyg.client.widget.wizard.util.AbstractFileUploadWizardStep
FIELD_ERROR_STYLE
 
Constructor Summary
LinkUploadWizardStep(WikiServiceAsync wikiService)
          Creates a new upload wizard step that uses the given service to access the attachments.
 
Method Summary
 java.lang.String getNextStep()
          
 java.lang.Object getResult()
          
protected  WikiPageReference getTargetPageReference()
          
 void init(java.lang.Object data, com.google.gwt.user.client.rpc.AsyncCallback<?> cb)
          
protected  void onAttachmentUploaded(Attachment attachment, 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 setNextStep(java.lang.String nextStep)
          Sets the next step.
 
Methods inherited from class org.xwiki.gwt.wysiwyg.client.widget.wizard.util.AbstractFileUploadWizardStep
display, displayError, extractFileName, getDirectionName, getFileHelpLabel, getFileLabel, getFileUploadInput, getFileUploadInputName, getMainPanel, getStepTitle, getUploadURL, getValidDirections, getWikiService, hideError, onCancel, onSubmit, onSubmitComplete, setFileHelpLabel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinkUploadWizardStep

public LinkUploadWizardStep(WikiServiceAsync wikiService)
Creates a new upload wizard step that uses the given service to access the attachments.

Parameters:
wikiService - the service used to access the attachments
Method Detail

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
See Also:
AbstractFileUploadWizardStep.init(Object, AsyncCallback)

getTargetPageReference

protected WikiPageReference getTargetPageReference()

Specified by:
getTargetPageReference in class AbstractFileUploadWizardStep
Returns:
a reference to the page where the attachment will be uploaded
See Also:
AbstractFileUploadWizardStep.getTargetPageReference()

onAttachmentUploaded

protected void onAttachmentUploaded(Attachment attachment,
                                    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:
attachment - 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.
See Also:
AbstractFileUploadWizardStep.onAttachmentUploaded(Attachment, AsyncCallback)

getResult

public java.lang.Object getResult()

See Also:
WizardStep.getResult()

getNextStep

public java.lang.String getNextStep()

See Also:
WizardStep.getNextStep()

setNextStep

public void setNextStep(java.lang.String nextStep)
Sets the next step.

Parameters:
nextStep - the new next step


Copyright © 2004-2011 XWiki. All Rights Reserved.