## org.eclipse.datatools.connectivity.drivers
Class DriverManager

    java.lang.Object
      org.eclipse.datatools.connectivity.drivers.DriverManager

    public class DriverManager

extends java.lang.Object

This class provides a management-level interface for drivers.

Author:
  brianf

Method Summary
`void` `addDriverInstance(DriverInstance di)`
`void` `addDriverInstance(IPropertySet pset)` Adds a new driver instance to the Drivers file
`IPropertySet` `createDefaultInstance(java.lang.String id)` Creates a default instance of the driver.
`DriverInstance` `createNewDriverInstance(java.lang.String templateID, java.lang.String name, java.lang.String jarList)` Create a new DriverInstance based on the incoming templateID, driver name, and jar list.
`DriverInstance` `createNewDriverInstance(java.lang.String templateID, java.lang.String name, java.lang.String jarList, java.lang.String driverClass)` Create a new DriverInstance based on the incoming templateID, driver name, and jar list.
`static void` `debug(java.lang.String msg)`
`DriverInstance[]` `getAllDriverInstances()` Returns an array of all driver instances
`DriverInstance` `getDriverInstanceByID(java.lang.String id)` Retrieve a DriverInstance by Id
`DriverInstance` `getDriverInstanceByName(java.lang.String name)` Retrieve a DriverInstance by name.
`DriverInstance[]` `getDriverInstancesByCategory(java.lang.String categoryid)`
`DriverInstance[]` `getDriverInstancesByName(java.lang.String name)` Retrieve DriverInstances by name.
`DriverInstance[]` `getDriverInstancesByTemplate(java.lang.String templateid)`
`java.lang.String` `getFullJarList()` Return a comma-delimited list of all jars for all drivers.
`java.lang.String[]` `getFullJarListAsArray()` Return an array of all jars for all drivers.
`static DriverManager` `getInstance()` Retrieve an instance of the DriverManager
`DriverInstance[]` `getValidDriverInstances()` Returns an array of valid driver instances
`boolean` `removeDriverInstance(java.lang.String id)` Removes a driver instance based on the id.
`boolean` `removeInvalidDefaultInstance(java.lang.String driverTemplateId, boolean resetDefaultCreated)` Removes the default driver instance of the specified driver template, if it is invalid.
`void` `resetDefaultInstances()` Creates any default driver template instances that need to be created.
`java.lang.String` `updatePluginJarList(TemplateDescriptor template)` Updates the jar list if it contains any [PLUGIN] tags, replacing them with the actual path referenced.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getInstance

    public static DriverManager getInstance()

  Retrieve an instance of the DriverManager

  Returns:
    DriverManager

### getDriverInstanceByID

    public DriverInstance getDriverInstanceByID(java.lang.String id)

  Retrieve a DriverInstance by Id

  Parameters:
    `id` - ID of the driver
  Returns:
    DriverInstance

### getDriverInstancesByCategory

    public DriverInstance[] getDriverInstancesByCategory(java.lang.String categoryid)

### getDriverInstancesByTemplate

    public DriverInstance[] getDriverInstancesByTemplate(java.lang.String templateid)

### getDriverInstanceByName

    public DriverInstance getDriverInstanceByName(java.lang.String name)

  Retrieve a DriverInstance by name.

  Parameters:
    `name` - Name of the driver
  Returns:
    Driver Instance

### getDriverInstancesByName

    public DriverInstance[] getDriverInstancesByName(java.lang.String name)

  Retrieve DriverInstances by name.

  Parameters:
    `name` - Name of the driver
  Returns:
    Driver Instances

### getFullJarList

    public java.lang.String getFullJarList()

  Return a comma-delimited list of all jars for all drivers.

  Returns:
    String

### getFullJarListAsArray

    public java.lang.String[] getFullJarListAsArray()

  Return an array of all jars for all drivers.

  Returns:
    String[]

### getValidDriverInstances

    public DriverInstance[] getValidDriverInstances()

  Returns an array of valid driver instances

  Returns:
    DriverInstance[]

### getAllDriverInstances

    public DriverInstance[] getAllDriverInstances()

  Returns an array of all driver instances

  Returns:
    DriverInstance[]

### createNewDriverInstance

    public DriverInstance createNewDriverInstance(java.lang.String templateID,
                                                  java.lang.String name,
                                                  java.lang.String jarList,
                                                  java.lang.String driverClass)

  Create a new DriverInstance based on the incoming templateID, driver name, and jar list.

  Parameters:
    `templateID` - String ID of the template
    `name` - String name to give the driver
    `jarList` - String jar list to give the driver
  Returns:
    DriverInstance

### createNewDriverInstance

    public DriverInstance createNewDriverInstance(java.lang.String templateID,
                                                  java.lang.String name,
                                                  java.lang.String jarList)

  Create a new DriverInstance based on the incoming templateID, driver name, and jar list.

  Parameters:
    `templateID` - String ID of the template
    `name` - String name to give the driver
    `jarList` - String jar list to give the driver
  Returns:
    DriverInstance

### removeDriverInstance

    public boolean removeDriverInstance(java.lang.String id)

  Removes a driver instance based on the id.

  Parameters:
    `id` - String ID of the driver instance
  Returns:
    true on success, false otherwise

### addDriverInstance

    public void addDriverInstance(DriverInstance di)

### addDriverInstance

    public void addDriverInstance(IPropertySet pset)

  Adds a new driver instance to the Drivers file

  Parameters:
    `pset` - IPropertySet

### resetDefaultInstances

    public void resetDefaultInstances()

  Creates any default driver template instances that need to be created. This is when the plug-in is loaded.

### createDefaultInstance

    public IPropertySet createDefaultInstance(java.lang.String id)

  Creates a default instance of the driver.

  Parameters:
    `id` - String ID of driver
  Returns:
    IPropertySet

### removeInvalidDefaultInstance

    public boolean removeInvalidDefaultInstance(java.lang.String driverTemplateId,
                                                boolean resetDefaultCreated)

  Removes the default driver instance of the specified driver template, if it is invalid. It may also optionally reset the state of having created a default instance to false.

  Parameters:
    `driverTemplateId` - the id of a driver template type
    `resetDefaultCreated` - true to reset the state of having created a default instance if it is removed; false to leave the state as is
  Returns:
    true if the specified driver template's default driver instance is invalid and successfully removed; false otherwise
  Since:
    1.7.2

### updatePluginJarList

    public java.lang.String updatePluginJarList(TemplateDescriptor template)

  Updates the jar list if it contains any [PLUGIN] tags, replacing them with the actual path referenced. For instance, the install location in the file system for the given plugin.

  Parameters:
    `template` - TemplateDescriptor
  Returns:
    String Updated jar list

### debug

    public static void debug(java.lang.String msg)