project35.soa.plugins
Class PluginManager

java.lang.Object
  extended by project35.soa.plugins.PluginManager
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener, PluginSelectorComponent

public class PluginManager
extends java.lang.Object
implements PluginSelectorComponent, java.awt.event.ActionListener

determines what plugins are appropriate to associate with the currently displayed record


Copyright (c) 2008 Kevin Garwood for Project35. The original code was developed by Kevin Garwood for the University of Manchester. Revisions have been made for Project35, a project that is independent of that institution. This code is licensed under the Academic Free License version 3.0. The code attribution for the original code is included here:

Copyright (c) Kevin Garwood and University of Manchester 2007. All rights reserved. Licensed under the Academic Free License version 3.0. For more information on the terms and conditions, please see the file "LICENSE" that is included in this distribution.


Version:
1.0
Author:
Kevin Garwood (kgarwood@users.sourceforge.net)

Constructor Summary
PluginManager(Project35FormContext project35FormContext, java.util.ArrayList plugins, StatusBar statusBar, RecordModelFactory recordModelFactory)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent event)
           
 java.util.ArrayList getPlugins()
          returns a list of plugins relevant to the current record
 javax.swing.JComponent getSelectionControl()
           
 boolean hasAppropriatePlugins(RecordModel recordModel)
           
 void setRecordModel(RecordModel recordModel)
          checks which plugins apply to the current record model and prepares a list of plugins for user to choose.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PluginManager

public PluginManager(Project35FormContext project35FormContext,
                     java.util.ArrayList plugins,
                     StatusBar statusBar,
                     RecordModelFactory recordModelFactory)
Method Detail

hasAppropriatePlugins

public boolean hasAppropriatePlugins(RecordModel recordModel)
Specified by:
hasAppropriatePlugins in interface PluginSelectorComponent

getSelectionControl

public javax.swing.JComponent getSelectionControl()
Specified by:
getSelectionControl in interface PluginSelectorComponent
Returns:
the button used to choose the plugins

getPlugins

public java.util.ArrayList getPlugins()
returns a list of plugins relevant to the current record

Returns:
a collection of plugins that suit the current record model

setRecordModel

public void setRecordModel(RecordModel recordModel)
checks which plugins apply to the current record model and prepares a list of plugins for user to choose. Also does a count to see how many plugins are for analysis, import and export. Displays the counts on the status bar

Specified by:
setRecordModel in interface PluginSelectorComponent
Parameters:
recordModel - the current record model

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent event)
Specified by:
actionPerformed in interface java.awt.event.ActionListener