Class JdbcConnectionDefinitionManager
- java.lang.Object
-
- org.pentaho.reporting.ui.datasources.jdbc.connection.JdbcConnectionDefinitionManager
-
public class JdbcConnectionDefinitionManager extends Object
Manages the list of local database connections for this application. The list of local connections is contained in the user preferences for this user. The structure of the preferences is as follows:- One node per connection - the name of the node is the JNDI Connection name
- Under each node, the following set of string keys and values which define each connection
- driver - the JDBC driver class
- url - the URL of the database
- username - the username used to connect to the database
- password - the password used to connect to the database
-
-
Constructor Summary
Constructors Constructor Description JdbcConnectionDefinitionManager()
Initializes the instance by loading the database connection information from the configuration storage.JdbcConnectionDefinitionManager(String node)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JdbcConnectionDefinition[]
getSources()
Returns a copy of the current list of JNDI sourcesvoid
removeSource(String name)
Removes the specified connection-definition from the list of connections.boolean
updateSourceList(JdbcConnectionDefinition source)
Adds or updates the source list with the specified source entry.
-
-
-
Constructor Detail
-
JdbcConnectionDefinitionManager
public JdbcConnectionDefinitionManager()
Initializes the instance by loading the database connection information from the configuration storage.
-
JdbcConnectionDefinitionManager
public JdbcConnectionDefinitionManager(String node)
-
-
Method Detail
-
getSources
public JdbcConnectionDefinition[] getSources()
Returns a copy of the current list of JNDI sources
-
removeSource
public void removeSource(String name)
Removes the specified connection-definition from the list of connections.- Parameters:
name
- the name of the JNDI source to remove from the list
-
updateSourceList
public boolean updateSourceList(JdbcConnectionDefinition source)
Adds or updates the source list with the specified source entry. Delagates to JNDI or JDBC method- Parameters:
source
- the entry to add/update in the list- Throws:
IllegalArgumentException
- indicates the source isnull
-
-