com.xpn.xwiki.wysiwyg.client.plugin.internal
Class DefaultPluginManager

java.lang.Object
  extended by com.xpn.xwiki.wysiwyg.client.plugin.internal.DefaultPluginManager
All Implemented Interfaces:
PluginManager

public class DefaultPluginManager
extends java.lang.Object
implements PluginManager

Default implementation of the PluginManager interface. We don't plan to provide another implementation.


Constructor Summary
DefaultPluginManager(Wysiwyg wysiwyg, XRichTextArea textArea, Config config)
           
 
Method Summary
 PluginFactoryManager getPluginFactoryManager()
          
 UIExtension getUIExtension(java.lang.String role, java.lang.String feature)
          
 void load(java.lang.String pluginName)
          Loads the specified plug-in.
 void setPluginFactoryManager(PluginFactoryManager pfm)
          Sets the manager of the available plug-in factories.
 void unload(java.lang.String pluginName)
          Unloads the specified plug-in.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultPluginManager

public DefaultPluginManager(Wysiwyg wysiwyg,
                            XRichTextArea textArea,
                            Config config)
Method Detail

getPluginFactoryManager

public PluginFactoryManager getPluginFactoryManager()

Specified by:
getPluginFactoryManager in interface PluginManager
Returns:
The manager of the available plug-in factories.
See Also:
PluginManager.getPluginFactoryManager()

setPluginFactoryManager

public void setPluginFactoryManager(PluginFactoryManager pfm)
Sets the manager of the available plug-in factories.

Specified by:
setPluginFactoryManager in interface PluginManager
Parameters:
pfm - The plug-in factory manager to use.
See Also:
PluginManager.setPluginFactoryManager(PluginFactoryManager)

load

public void load(java.lang.String pluginName)
Loads the specified plug-in. A new instance of this plug-in is obtained using the current plug-in factory manager. The Plugin.init(Wysiwyg, XRichTextArea, Config) method is called.

Specified by:
load in interface PluginManager
Parameters:
pluginName - The name of the plug-in to be loaded. This name should match the value returned by PluginFactory.getPluginName() method of this plug-in's factory.
See Also:
PluginManager.load(String)

unload

public void unload(java.lang.String pluginName)
Unloads the specified plug-in. The Plugin.destroy() method is called.

Specified by:
unload in interface PluginManager
Parameters:
pluginName - The name of the plug-in to be unloaded. This name should match the value returned by PluginFactory.getPluginName() method of this plug-in's factory.
See Also:
PluginManager.unload(String)

getUIExtension

public UIExtension getUIExtension(java.lang.String role,
                                  java.lang.String feature)

Specified by:
getUIExtension in interface PluginManager
Parameters:
role - The extension point. See UIExtension.getRole().
feature - The feature name. See UIExtension.getFeatures().
Returns:
The user interface extension for the given role and the given feature.
See Also:
PluginManager.getUIExtension(String, String)


Copyright © 2004-2008 XWiki. All Rights Reserved.