org.xwiki.gwt.wysiwyg.client.plugin.importer.ui
Class ImportOfficeFileWizardStep

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.plugin.importer.ui.ImportOfficeFileWizardStep
All Implemented Interfaces:
WizardStep

public class ImportOfficeFileWizardStep
extends AbstractFileUploadWizardStep

Wizard step responsible for importing the content of an office document into the wysiwyg editor.

Since:
2.0.1
Version:
$Id: b5687b5fab391b17dae92baddf8e3e9cb7d533fe $

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
ImportOfficeFileWizardStep(Config config, WikiServiceAsync wikiService, ImportServiceAsync importService)
          Instantiates the office document import wizard step.
 
Method Summary
protected  Map<String,String> getHTMLCleaningParams()
          Prepares the cleaning parameters map.
 Object getResult()
          
protected  WikiPageReference getTargetPageReference()
          
protected  void onAttachmentUploaded(Attachment attach, com.google.gwt.user.client.rpc.AsyncCallback<Boolean> async)
          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, init, 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

ImportOfficeFileWizardStep

public ImportOfficeFileWizardStep(Config config,
                                  WikiServiceAsync wikiService,
                                  ImportServiceAsync importService)
Instantiates the office document import wizard step.

Parameters:
config - the object used to configure this wizard step
wikiService - the component used to upload office documents
importService - the component used to import office documents
Method Detail

onAttachmentUploaded

protected void onAttachmentUploaded(Attachment attach,
                                    com.google.gwt.user.client.rpc.AsyncCallback<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.

getResult

public Object getResult()


getHTMLCleaningParams

protected Map<String,String> getHTMLCleaningParams()
Prepares the cleaning parameters map.

Returns:
a Map with cleaning parameters for office importer.

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()


Copyright © 2004–2015 XWiki. All rights reserved.