com.anwrt.anycontent.plugin
Class AbstractPlugin

java.lang.Object
  extended bycom.anwrt.anycontent.plugin.AbstractPlugin
Direct Known Subclasses:
Plugin

public abstract class AbstractPlugin
extends java.lang.Object

Superclass of all plugins, brought either by the kernel or by external means.
This class' purpose is mainly to read plugin.xml files and to build corresponding Objects.
Do not extends this class, but Plugin instead.


Field Summary
static java.lang.String PLUGIN_ID_SEPARATOR
          Separator in plugin full id (between pluginName and pluginId)
 
Constructor Summary
AbstractPlugin()
           
 
Method Summary
 void configure(java.lang.String pluginName, java.lang.String pluginId, Configuration config)
          Standard method for plugin configuration, handling only extensions.
protected abstract  void extendedConfigure(Configuration config)
          This method may be overriden by subclasses to add specific fonctionnality.
 java.util.Collection getExtensions(java.lang.String extensionPoint)
          Get the extensions points.
 java.util.Collection getExtensionsPoints()
          Get the extensions points.
 java.lang.String getId()
          Return the plugin unique id (concat the plugin name with the plugin's id)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PLUGIN_ID_SEPARATOR

public static final java.lang.String PLUGIN_ID_SEPARATOR
Separator in plugin full id (between pluginName and pluginId)

See Also:
Constant Field Values
Constructor Detail

AbstractPlugin

public AbstractPlugin()
Method Detail

getId

public final java.lang.String getId()
Return the plugin unique id (concat the plugin name with the plugin's id)

Returns:
the unique id

configure

public final void configure(java.lang.String pluginName,
                            java.lang.String pluginId,
                            Configuration config)
                     throws ConfigurationException
Standard method for plugin configuration, handling only extensions.
Subclasses may implement extendedConfigure(Configuration) method to support their own configurations

Parameters:
pluginName - Name of the plugin (of the directory)
pluginId - Unique id of the plugin (in the plugin file)
config - The plugin configuration
Throws:
ConfigurationException - if the configuration is not valid

getExtensionsPoints

public final java.util.Collection getExtensionsPoints()
Get the extensions points.

Returns:
The collection of extensions points as String.

getExtensions

public final java.util.Collection getExtensions(java.lang.String extensionPoint)
Get the extensions points.

Parameters:
extensionPoint - The extension point name.
Returns:
The list of extensions points as String or null if there is no extension with that extension point.

extendedConfigure

protected abstract void extendedConfigure(Configuration config)
                                   throws ConfigurationException
This method may be overriden by subclasses to add specific fonctionnality.

Parameters:
config - this plugin's configuration
Throws:
ConfigurationException - if the configuration is not valid


Copyright © 2006 Anyware Technologies. All Rights Reserved.