edu.uci.isr.yancees.plugin
Class AbstractPluginManager

java.lang.Object
  extended by edu.uci.isr.yancees.plugin.AbstractPluginManager
All Implemented Interfaces:
PluginManagerInterface
Direct Known Subclasses:
MOPluginManager, ProtocolPluginManager

public abstract class AbstractPluginManager
extends java.lang.Object
implements PluginManagerInterface

Author:
rsilvafi class created at May 3, 2004 Keeps a list of all the factories (representing installed plug-ins) of the system.

Field Summary
protected  java.util.HashMap factoriesMap
           
protected  PluginFactoryInterface genericFactory
           
protected  java.util.HashMap tagsMap
           
 
Constructor Summary
AbstractPluginManager()
           
 
Method Summary
 void addFactory(PluginFactoryInterface factory)
          Registers a new factory in the plug-in manager to process the set of tags.
 void addUnknownTagFactory(PluginFactoryInterface factory)
          Registers the generic factory that handles unknown tags in the subscription process.
 PluginFactoryInterface[] getFactoriesList()
          Gets the list of all factories registered in the PluginManager
 java.lang.String[] getRegisteredTags()
           
 boolean isTagRegistered(java.lang.String tag)
           
 void removeFactory(PluginFactoryInterface factory)
          Registers a new factory in the plug-in manager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factoriesMap

protected java.util.HashMap factoriesMap

tagsMap

protected java.util.HashMap tagsMap

genericFactory

protected PluginFactoryInterface genericFactory
Constructor Detail

AbstractPluginManager

public AbstractPluginManager()
Method Detail

addFactory

public void addFactory(PluginFactoryInterface factory)
Description copied from interface: PluginManagerInterface
Registers a new factory in the plug-in manager to process the set of tags. The list of tags is collected in the PluginFactoryInterface

Specified by:
addFactory in interface PluginManagerInterface
Parameters:
factory - the factory instance

addUnknownTagFactory

public void addUnknownTagFactory(PluginFactoryInterface factory)
Description copied from interface: PluginManagerInterface
Registers the generic factory that handles unknown tags in the subscription process. This factory is used to implement the dynamic download of plug-ins in case they are not currently installed.

Specified by:
addUnknownTagFactory in interface PluginManagerInterface
Parameters:
factory - the factory instance

removeFactory

public void removeFactory(PluginFactoryInterface factory)
Description copied from interface: PluginManagerInterface
Registers a new factory in the plug-in manager

Specified by:
removeFactory in interface PluginManagerInterface

getFactoriesList

public PluginFactoryInterface[] getFactoriesList()
Description copied from interface: PluginManagerInterface
Gets the list of all factories registered in the PluginManager

Specified by:
getFactoriesList in interface PluginManagerInterface

getRegisteredTags

public java.lang.String[] getRegisteredTags()
Specified by:
getRegisteredTags in interface PluginManagerInterface
Returns:
a list of all the supported tags in this plugin manager. In other words, returs the list of tags registered for all plugins installed.

isTagRegistered

public boolean isTagRegistered(java.lang.String tag)
Specified by:
isTagRegistered in interface PluginManagerInterface
Parameters:
tag - to be checked
Returns:
true if the tag is already registered, false otherwise.