org.archiviststoolkit.plugin
Class ATPluginFactory

java.lang.Object
  extended by org.archiviststoolkit.plugin.ATPluginFactory

public class ATPluginFactory
extends java.lang.Object


Method Summary
 ATPlugin getEditorPlugin(DomainObject domainObject)
          Method to get a record editor plugin
static ATPluginFactory getInstance()
          Method to return the singleton of this class
 ATPlugin getPlugin(java.lang.String id)
          Method to return a plugin given an id.
 org.java.plugin.PluginManager getPluginManager()
          Method to return the plugin manger incase a developer would like to make use of it.
 java.util.HashMap getPluginNames()
          Method to return an list of all the plugin names and ids in a hasmap
 java.util.HashMap getPluginNamesByCategory(java.lang.String inCategory)
          Method to return the name of all plugins in a particular category.
 ATPlugin getViewerPlugin(DomainObject domainObject)
          Method to get a record viewer plugin
 boolean parsePluginDirectory()
          Method that loadsany plugins found in the plugin directory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static ATPluginFactory getInstance()
Method to return the singleton of this class

Returns:
ATPluginFactory Singleton

getPluginManager

public org.java.plugin.PluginManager getPluginManager()
Method to return the plugin manger incase a developer would like to make use of it.

Returns:
The plugin manager

parsePluginDirectory

public boolean parsePluginDirectory()
Method that loadsany plugins found in the plugin directory

Returns:
boolean indicating f any plugins were found

getPluginNames

public java.util.HashMap getPluginNames()
Method to return an list of all the plugin names and ids in a hasmap

Returns:
HashMap containing the names and ids of all the plugins found

getPluginNamesByCategory

public java.util.HashMap getPluginNamesByCategory(java.lang.String inCategory)
Method to return the name of all plugins in a particular category. It is used to add plugins to plugin menu in the main application frame

Returns:
HashMap containing the names and ids of all the plugins found

getPlugin

public ATPlugin getPlugin(java.lang.String id)
Method to return a plugin given an id. If it can't be found then null is returned

Parameters:
id - The id of the plugin to return
Returns:
The ATPlugin found or null

getViewerPlugin

public ATPlugin getViewerPlugin(DomainObject domainObject)
Method to get a record viewer plugin

Parameters:
domainObject - The domain object to look for plugin for
Returns:
The viewer plugin that is found or null

getEditorPlugin

public ATPlugin getEditorPlugin(DomainObject domainObject)
Method to get a record editor plugin

Parameters:
domainObject - The domain object to look for plugin for.
Returns:
The editor plugin that is found or null