com.finalist.jaggenerator
Class DatabaseManager

java.lang.Object
  extended bycom.finalist.jaggenerator.DatabaseManager

public class DatabaseManager
extends java.lang.Object

The DatabaseManager handles JAG's generic database support. This enables JAG to connect to any database, provided the database has a JDBC driver.

Author:
Michael O'Connor - Finalist IT Group

Field Summary
static java.lang.String APPSERVER_TYPEMAPPINGS
           
static java.lang.String NAME
           
 
Method Summary
 java.util.List addDrivers(java.io.File driverFile)
          Adds JDBC driver(s) from the specified File.
 org.w3c.dom.Element appendXML(org.w3c.dom.Element root)
          Persists the supported database information by appending an XML element to the config Document.
static DatabaseManager getInstance()
          The DatabaseManager is a singleton - this method obtains the one and only instance.
 Database[] getSupportedDatabases()
          Gets the list of supported databases.
 java.lang.String[] getTypeMappings()
          Gets the list of possible appserver typemappings.
 void setDatabases(java.util.ArrayList editedValues)
          Resets the list of supported databases (and also resets the list in the Datasource panel).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final java.lang.String NAME
See Also:
Constant Field Values

APPSERVER_TYPEMAPPINGS

public static final java.lang.String APPSERVER_TYPEMAPPINGS
See Also:
Constant Field Values
Method Detail

getInstance

public static DatabaseManager getInstance()
The DatabaseManager is a singleton - this method obtains the one and only instance.

Returns:

addDrivers

public java.util.List addDrivers(java.io.File driverFile)
Adds JDBC driver(s) from the specified File.

Parameters:
driverFile -
Returns:
a List of Database objects, one for each driver found in the file.

getSupportedDatabases

public Database[] getSupportedDatabases()
Gets the list of supported databases.

Returns:
an array of all currently supported databases.

setDatabases

public void setDatabases(java.util.ArrayList editedValues)
Resets the list of supported databases (and also resets the list in the Datasource panel).

Parameters:
editedValues -

getTypeMappings

public java.lang.String[] getTypeMappings()
Gets the list of possible appserver typemappings.

Returns:

appendXML

public org.w3c.dom.Element appendXML(org.w3c.dom.Element root)
Persists the supported database information by appending an XML element to the config Document.

Parameters:
root - The XML Element under which we append the XML.


Copyright © 2003-2005 SourceForge. All Rights Reserved.