public class ODriverConfigurator extends Object
Constructor and Description |
---|
ODriverConfigurator() |
Modifier and Type | Method and Description |
---|---|
void |
checkConnection(String driver,
String uri,
String username,
String password)
Checks connection to a source database identified through the 4 access parameters.
|
void |
checkConnection(String driver,
String uri,
String username,
String password,
String driverClassPath)
Checks connection to a source database identified through the 4 access parameters.
|
void |
checkDriverConfiguration(String driverName)
It Checks if the requested driver is already present in the classpath, if not present it downloads the last available driver
version.
|
void |
checkDriverConfiguration(String driverName,
String driverClassPath) |
String |
fetchDriverClassName(String driverName)
It performs a fetching of the driver class name from the driver name (corresponding to the chosen DBMS)
Connection to the 'http://orientdb.com/jdbc-drivers.json' resource if needed.
|
Connection |
getDBMSConnection(String driver,
String uri,
String username,
String password)
It gets the connection to the source database.
|
com.orientechnologies.orient.core.record.impl.ODocument |
readJsonFromRemoteUrl(String url)
It reads the driver config from remote url and saves it in local.
|
public static final String DRIVERS
public String fetchDriverClassName(String driverName)
driverName
- (case insensitive)public void checkDriverConfiguration(String driverName)
driverName
- (case insensitive)public void checkDriverConfiguration(String driverName, String driverClassPath)
driverName
- driverClassPath
- public com.orientechnologies.orient.core.record.impl.ODocument readJsonFromRemoteUrl(String url)
url
- public void checkConnection(String driver, String uri, String username, String password) throws Exception
driver
- uri
- username
- password
- Exception
public void checkConnection(String driver, String uri, String username, String password, String driverClassPath) throws Exception
driver
- uri
- username
- password
- driverClassPath
- Exception
public Connection getDBMSConnection(String driver, String uri, String username, String password) throws SQLException
driver
- uri
- username
- password
- SQLException
Copyright © 2015–2020 OrientDB. All rights reserved.