org.pfsw.plugin
Class BasePluginRegistration

java.lang.Object
  extended by org.pfsw.plugin.BasePluginRegistration
All Implemented Interfaces:
PluginRegistration

public abstract class BasePluginRegistration
extends java.lang.Object
implements PluginRegistration

An abstract implementation of the PluginRegistration interface that can be extended and filled with the relevant data by overriding the initialize() method.


Constructor Summary
BasePluginRegistration()
           
 
Method Summary
 void add(java.lang.String key, java.lang.Class<?> type)
          Add an entry to the registration data.
 java.util.Map<java.lang.String,java.lang.Class<?>> getClassesToRegister()
          Returns a map with all classes that should be registered for dynamic instantiation.
protected  java.util.Map<java.lang.String,java.lang.Class<?>> getRegistrationMap()
           
 void initialize()
          Will be called from the constructor to fill the internal map with values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasePluginRegistration

public BasePluginRegistration()
Method Detail

getClassesToRegister

public java.util.Map<java.lang.String,java.lang.Class<?>> getClassesToRegister()
Description copied from interface: PluginRegistration
Returns a map with all classes that should be registered for dynamic instantiation. The key is an alias names for the associated class.

Specified by:
getClassesToRegister in interface PluginRegistration
Returns:
A (perhaps empty) map, but never null.

add

public void add(java.lang.String key,
                java.lang.Class<?> type)
Add an entry to the registration data. If another entry with the same key exists it will be replaced.


initialize

public void initialize()
Will be called from the constructor to fill the internal map with values. This method should be overridden by subclasses.


getRegistrationMap

protected java.util.Map<java.lang.String,java.lang.Class<?>> getRegistrationMap()