org.opennms.bb.dp.capsd.components
Class CapsdPluginLoader
java.lang.Object
|
+--org.opennms.bb.dp.capsd.components.CapsdPluginLoader
- public class CapsdPluginLoader
- extends Object
CapsdPluginLoader loads the plugins from the 'capsdPluginXml' xml file
into the 'service' table of the database. Also includes the serviceID
of the services to the plugins vector.
- Version:
- $Revision: 1.13 $
- Author:
- Sowmya, OpenNMS
Field Summary |
private List |
m_plugins
The list of plugin modules that were successfully
loaded. |
Method Summary |
List |
getPlugins()
Returns the list of valid plugins loaded
by the class. |
private void |
sync(Connection con)
Checks each service plugin to see if its already loaded in
database. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
m_plugins
private List m_plugins
The list of plugin modules that were successfully
loaded.
CapsdPluginLoader
public CapsdPluginLoader()
throws CapsdPluginException
- Constructs a new CapsdPluginLoader. Reads the database login
parameters from properties loaded and throws an exception if
these parameters are not found or if it cannot connect or load
data into the database
- Throws:
CapsdPluginException
- Thrown
if the plugins cannot be loaded.java.lang.NullPointerException
- Thrown if there is an error
loading or getting properity strings.
sync
private void sync(Connection con)
throws SQLException
Checks each service plugin to see if its already loaded in
database. If it is, the service ID is read and added to the
m_plugins structure. If not already in the database,
a new row is added for this plugin to the SERVICE table and
this data is added to the m_plugins.
- Parameters:
con
- The connection to the database.- Throws:
java.lang.NullPointerException
- Thrown if a requried
property cannot be found.SQLException
- Thrown if a JDBC error occurs accessing
the database.
getPlugins
public List getPlugins()
Returns the list of valid plugins loaded
by the class.