net.sourceforge.blogentis.plugins
Class AbstractExtensionPoint

java.lang.Object
  extended bynet.sourceforge.blogentis.plugins.AbstractExtensionPoint
All Implemented Interfaces:
IExtensionPoint
Direct Known Subclasses:
AbstractBlogExtensionPoint, PageExtensionPointImpl, XmlRpcExtensionPoint

public abstract class AbstractExtensionPoint
extends java.lang.Object
implements IExtensionPoint

A simple IExtensionPoint base class implementation. It uses a LinkedList as an underlying extension store. Only the extension modification methods are synchronized.

Author:
abas

Field Summary
protected  java.util.LinkedList extensions
           
protected  IPlugin plugin
           
 
Constructor Summary
AbstractExtensionPoint(IPlugin plugin)
           
 
Method Summary
 void addExtension(IExtension ext)
          Add an extension to this extension point.
 java.util.Iterator getExtensions()
          Get the list of extensions that have been registered with this extension point.
 IPlugin getPlugin()
          Get the plugin that defines this extension point.
 void removeExtension(IExtension extension)
          Remove an extension from this extension point.
 void removeExtensions(IPlugin fromPlugin)
          Remove all extensions that belong to this plugin.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sourceforge.blogentis.plugins.IExtensionPoint
getExtensionClass, getName
 

Field Detail

extensions

protected java.util.LinkedList extensions

plugin

protected IPlugin plugin
Constructor Detail

AbstractExtensionPoint

public AbstractExtensionPoint(IPlugin plugin)
Method Detail

addExtension

public void addExtension(IExtension ext)
Description copied from interface: IExtensionPoint
Add an extension to this extension point.

Specified by:
addExtension in interface IExtensionPoint
Parameters:
ext - the extension to add.

removeExtension

public void removeExtension(IExtension extension)
Description copied from interface: IExtensionPoint
Remove an extension from this extension point.

Specified by:
removeExtension in interface IExtensionPoint
Parameters:
extension - the extension to remove.

removeExtensions

public void removeExtensions(IPlugin fromPlugin)
Description copied from interface: IExtensionPoint
Remove all extensions that belong to this plugin.

Specified by:
removeExtensions in interface IExtensionPoint
Parameters:
fromPlugin - the plugin whose extensions should be removed.

getExtensions

public java.util.Iterator getExtensions()
Description copied from interface: IExtensionPoint
Get the list of extensions that have been registered with this extension point. Depending on the extension point, order may be significant.

Specified by:
getExtensions in interface IExtensionPoint
Returns:
the list of extensions.

getPlugin

public IPlugin getPlugin()
Description copied from interface: IExtensionPoint
Get the plugin that defines this extension point.

Specified by:
getPlugin in interface IExtensionPoint
Returns:
The plugin that defines this extension.


Copyright © 2003-2004 SourceForge.net. All Rights Reserved.