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

java.lang.Object
  extended by org.xwiki.gwt.user.client.ui.wizard.AbstractNavigationAwareWizardStep
      extended by org.xwiki.gwt.user.client.ui.wizard.AbstractInteractiveWizardStep
          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: b36b327acc8e171260db5fd245bb4c406b90d79d $

Field Summary
 
Fields inherited from class org.xwiki.gwt.wysiwyg.client.widget.wizard.util.AbstractFileUploadWizardStep
FIELD_ERROR_STYLE, FIELD_HINT_STYLE, FIELD_LABEL_STYLE
 
Constructor Summary
LinkUploadWizardStep(WikiServiceAsync wikiService)
          Creates a new upload wizard step that uses the given service to access the attachments.
 
Method Summary
 Object getResult()
          
protected  WikiPageReference getTargetPageReference()
          
 void init(Object data, com.google.gwt.user.client.rpc.AsyncCallback<?> cb)
          
protected  void onAttachmentUploaded(Attachment attachment, com.google.gwt.user.client.rpc.AsyncCallback<Boolean> callback)
          Notifies the successful completion of a file upload, to be overridden by subclasses to provide specific behavior.
 
Methods inherited from class org.xwiki.gwt.wysiwyg.client.widget.wizard.util.AbstractFileUploadWizardStep
displayError, extractFileName, getFileHelpLabel, getFileLabel, getFileUploadInput, getFileUploadInputName, getUploadURL, hideError, onCancel, onSubmit, onSubmitComplete, setFileHelpLabel
 
Methods inherited from class org.xwiki.gwt.user.client.ui.wizard.AbstractInteractiveWizardStep
display, getStepTitle, isAutoSubmit, setStepTitle
 
Methods inherited from class org.xwiki.gwt.user.client.ui.wizard.AbstractNavigationAwareWizardStep
getDirectionName, getNextStep, getValidDirections, setDirectionName, setNextStep, setValidDirections
 
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(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<Boolean> callback)
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
callback - 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 Object getResult()

See Also:
WizardStep.getResult()


Copyright © 2004-2013 XWiki. All Rights Reserved.