net.sourceforge.blogentis.plugins.impl
Class BlogPluginServiceImpl

java.lang.Object
  extended byorg.apache.turbine.services.BaseInitable
      extended byorg.apache.turbine.services.BaseService
          extended byorg.apache.turbine.services.TurbineBaseService
              extended bynet.sourceforge.blogentis.plugins.impl.BlogPluginServiceImpl
All Implemented Interfaces:
org.apache.turbine.services.Initable, IPluginService, org.apache.turbine.services.Service

public class BlogPluginServiceImpl
extends org.apache.turbine.services.TurbineBaseService
implements IPluginService

Author:
abas

Field Summary
 
Fields inherited from class org.apache.turbine.services.BaseService
configuration, name, serviceBroker
 
Fields inherited from class org.apache.turbine.services.BaseInitable
initableBroker, isInitialized
 
Fields inherited from interface net.sourceforge.blogentis.plugins.IPluginService
SERVICE_NAME
 
Fields inherited from interface org.apache.turbine.services.Service
SERVICE_NAME
 
Constructor Summary
BlogPluginServiceImpl()
           
 
Method Summary
 void deregisterExtensionPoint(Blog blog, IBlogExtensionPoint point)
          Remove a blog-specific extension point
 void deregisterExtensionPoint(IExtensionPoint point)
          Remove a global extension point.
 java.util.Iterator getExtensionPoints(Blog blog)
          Get an Iterator over the extension points active for a blog.
 java.util.Iterator getPlugins()
          List the plugins in the order of their definition.
 IPrefs getPreferencesFor(Blog blog, java.lang.Class extensionClass)
          Get the preferences object.
 void init()
           
 IBlogExtensionPoint locateExtensionPoint(Blog blog, java.lang.Class className)
          Locate the first extension point that has the specified class in the extension point list of the blog.
 IExtensionPoint locateExtensionPoint(java.lang.Class className)
          Locate the specified extension point in the global extension point list
 void registerExtensionPoint(Blog blog, IBlogExtensionPoint point)
          Register a blog-specific extension point.
 void registerExtensionPoint(IExtensionPoint point)
          Register a global extension point.
 void reloadExtensionPointsForBlog(Blog blog)
          Causes the active plugins, extensions points and extensions for a blog to be recomputed.
 void shutdown()
           
 
Methods inherited from class org.apache.turbine.services.TurbineBaseService
init, init, init
 
Methods inherited from class org.apache.turbine.services.BaseService
getConfiguration, getName, getProperties, getServiceBroker, setName, setServiceBroker
 
Methods inherited from class org.apache.turbine.services.BaseInitable
getInit, getInitableBroker, setInit, setInitableBroker
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.turbine.services.Initable
getInit, setInitableBroker
 

Constructor Detail

BlogPluginServiceImpl

public BlogPluginServiceImpl()
Method Detail

init

public void init()
Specified by:
init in interface org.apache.turbine.services.Initable

shutdown

public void shutdown()
Specified by:
shutdown in interface org.apache.turbine.services.Initable

getPlugins

public java.util.Iterator getPlugins()
List the plugins in the order of their definition.

Specified by:
getPlugins in interface IPluginService
Returns:
an iterator that returns IPlugin

registerExtensionPoint

public void registerExtensionPoint(IExtensionPoint point)
Register a global extension point.

Specified by:
registerExtensionPoint in interface IPluginService
Parameters:
point - the global extension point to register.

deregisterExtensionPoint

public void deregisterExtensionPoint(IExtensionPoint point)
Remove a global extension point.

Specified by:
deregisterExtensionPoint in interface IPluginService
Parameters:
point - the extension point to remove.

registerExtensionPoint

public void registerExtensionPoint(Blog blog,
                                   IBlogExtensionPoint point)
Register a blog-specific extension point.

Specified by:
registerExtensionPoint in interface IPluginService
Parameters:
blog - the blog that the extension point will apply.
point - the extension point that will be registered.

deregisterExtensionPoint

public void deregisterExtensionPoint(Blog blog,
                                     IBlogExtensionPoint point)
Remove a blog-specific extension point

Specified by:
deregisterExtensionPoint in interface IPluginService
Parameters:
blog - the blog that should contain the extension point.
point - the extension point to remove.

locateExtensionPoint

public IExtensionPoint locateExtensionPoint(java.lang.Class className)
Description copied from interface: IPluginService
Locate the specified extension point in the global extension point list

Specified by:
locateExtensionPoint in interface IPluginService
Parameters:
className - the class of the extension point
Returns:
the global extension point, or null if not found.

locateExtensionPoint

public IBlogExtensionPoint locateExtensionPoint(Blog blog,
                                                java.lang.Class className)
Description copied from interface: IPluginService
Locate the first extension point that has the specified class in the extension point list of the blog.

Specified by:
locateExtensionPoint in interface IPluginService
Parameters:
blog - the blog that will be searched for the extension point.
className - the class of the extension point.
Returns:
the extension point if found, null otherwise.

reloadExtensionPointsForBlog

public void reloadExtensionPointsForBlog(Blog blog)
Description copied from interface: IPluginService
Causes the active plugins, extensions points and extensions for a blog to be recomputed.

Specified by:
reloadExtensionPointsForBlog in interface IPluginService
Parameters:
blog - the blog to reload the plugins.

getExtensionPoints

public java.util.Iterator getExtensionPoints(Blog blog)
Description copied from interface: IPluginService
Get an Iterator over the extension points active for a blog.

Specified by:
getExtensionPoints in interface IPluginService
Parameters:
blog -
Returns:

getPreferencesFor

public IPrefs getPreferencesFor(Blog blog,
                                java.lang.Class extensionClass)
Description copied from interface: IPluginService
Get the preferences object.

Specified by:
getPreferencesFor in interface IPluginService
Parameters:
blog - the blog to search for.
extensionClass - the extension or extension point
Returns:
the preferences object for that class.


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