com.xpn.xwiki.wysiwyg.client.plugin.importer
Class ImportPlugin

java.lang.Object
  extended by com.xpn.xwiki.wysiwyg.client.plugin.internal.AbstractPlugin
      extended by com.xpn.xwiki.wysiwyg.client.plugin.importer.ImportPlugin
All Implemented Interfaces:
Plugin, WizardListener

public class ImportPlugin
extends com.xpn.xwiki.wysiwyg.client.plugin.internal.AbstractPlugin
implements WizardListener

Plugin responsible for importing external content into wysiwyg editor.

Version:
$Id: ImportPlugin.java 25062 2009-11-14 12:26:11Z mflorea $

Constructor Summary
ImportPlugin(ImportServiceAsync importService, WikiServiceAsync wikiService)
          Creates a new import plug-in that used the given import service.
 
Method Summary
 void destroy()
          Notifies the plug-in to release its resources before being unloaded from the WYSIWYG editor.
 void init(RichTextArea textArea, Config config)
          Initialize the plug-in.
 void onCancel(Wizard sender)
          
 void onFinish(Wizard sender, java.lang.Object result)
          
 void onImportOfficeFile()
          Method invoked by ImportMenuExtension when "Import -> Office File" menu item is clicked.
 void onImportOfficePaste()
          Method invoked by ImportMenuExtension when "Import -> Office Content" menu item is clicked.
 
Methods inherited from class com.xpn.xwiki.wysiwyg.client.plugin.internal.AbstractPlugin
getConfig, getTextArea, getUIExtensionList, getUIExtensions, saveRegistration, saveRegistrations
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImportPlugin

public ImportPlugin(ImportServiceAsync importService,
                    WikiServiceAsync wikiService)
Creates a new import plug-in that used the given import service.

Parameters:
importService - the component used to clean content pasted from office documents and to import office documents
wikiService - the component used to access the import attachments
Method Detail

init

public void init(RichTextArea textArea,
                 Config config)
Initialize the plug-in. Plug-ins need to know the text area in order to provide only those feature that are supported.

Specified by:
init in interface Plugin
Overrides:
init in class com.xpn.xwiki.wysiwyg.client.plugin.internal.AbstractPlugin
Parameters:
textArea - the text area of the editor
config - the configuration object

onImportOfficeFile

public void onImportOfficeFile()
Method invoked by ImportMenuExtension when "Import -> Office File" menu item is clicked.


onImportOfficePaste

public void onImportOfficePaste()
Method invoked by ImportMenuExtension when "Import -> Office Content" menu item is clicked.


onCancel

public void onCancel(Wizard sender)

Specified by:
onCancel in interface WizardListener

onFinish

public void onFinish(Wizard sender,
                     java.lang.Object result)

Specified by:
onFinish in interface WizardListener

destroy

public void destroy()
Notifies the plug-in to release its resources before being unloaded from the WYSIWYG editor.

Specified by:
destroy in interface Plugin
Overrides:
destroy in class com.xpn.xwiki.wysiwyg.client.plugin.internal.AbstractPlugin


Copyright © 2004-2010 XWiki. All Rights Reserved.