Interface IDatasourceMgmtService
- All Superinterfaces:
IPentahoInitializer
Service to manage JDBC datasources in the platform. is a
IDatabaseConnection
.-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateDatasource
(org.pentaho.database.model.IDatabaseConnection databaseConnection) Creates a JDBC datasource in a given repository and return an idvoid
Permanently deletes a JDBC datasource from a repository by idvoid
deleteDatasourceByName
(String name) Permanently deletes a JDBC datasource from a repository by nameorg.pentaho.database.model.IDatabaseConnection
Retrieves a JDBC datasource form the repository by idorg.pentaho.database.model.IDatabaseConnection
getDatasourceByName
(String name) Retrieves a JDBC datasource form the repository by nameRetrieves all JDBC datasource ids from the repositoryList<org.pentaho.database.model.IDatabaseConnection>
Retrieves all JDBC datasources from the repositoryupdateDatasourceById
(String id, org.pentaho.database.model.IDatabaseConnection databaseConnection) Updates a given JDBC datasource by idupdateDatasourceByName
(String name, org.pentaho.database.model.IDatabaseConnection databaseConnection) Updates a given JDBC datasource by nameMethods inherited from interface org.pentaho.platform.api.engine.IPentahoInitializer
init
-
Field Details
-
IDATASOURCEMGMTSERVICE
- See Also:
-
-
Method Details
-
createDatasource
String createDatasource(org.pentaho.database.model.IDatabaseConnection databaseConnection) throws DuplicateDatasourceException, DatasourceMgmtServiceException Creates a JDBC datasource in a given repository and return an id- Parameters:
databaseConnection
-- Returns:
- id
- Throws:
DuplicateDatasourceException
DatasourceMgmtServiceException
-
deleteDatasourceByName
void deleteDatasourceByName(String name) throws NonExistingDatasourceException, DatasourceMgmtServiceException Permanently deletes a JDBC datasource from a repository by name- Parameters:
name
-- Throws:
NonExistingDatasourceException
DatasourceMgmtServiceException
-
deleteDatasourceById
void deleteDatasourceById(String id) throws NonExistingDatasourceException, DatasourceMgmtServiceException Permanently deletes a JDBC datasource from a repository by id- Parameters:
id
-- Throws:
NonExistingDatasourceException
DatasourceMgmtServiceException
-
getDatasourceByName
org.pentaho.database.model.IDatabaseConnection getDatasourceByName(String name) throws DatasourceMgmtServiceException Retrieves a JDBC datasource form the repository by name- Parameters:
name
-- Returns:
- IDatabaseConnection
- Throws:
DatasourceMgmtServiceException
-
getDatasourceById
org.pentaho.database.model.IDatabaseConnection getDatasourceById(String id) throws DatasourceMgmtServiceException Retrieves a JDBC datasource form the repository by id- Parameters:
id
-- Returns:
- IDatabaseConnection
- Throws:
DatasourceMgmtServiceException
-
getDatasources
List<org.pentaho.database.model.IDatabaseConnection> getDatasources() throws DatasourceMgmtServiceExceptionRetrieves all JDBC datasources from the repository- Returns:
- databaseConnection List
- Throws:
DatasourceMgmtServiceException
-
getDatasourceIds
Retrieves all JDBC datasource ids from the repository- Returns:
- list of ids
- Throws:
DatasourceMgmtServiceException
-
updateDatasourceByName
String updateDatasourceByName(String name, org.pentaho.database.model.IDatabaseConnection databaseConnection) throws NonExistingDatasourceException, DatasourceMgmtServiceException Updates a given JDBC datasource by name- Parameters:
name
-databaseConnection
-- Returns:
- id
- Throws:
NonExistingDatasourceException
DatasourceMgmtServiceException
-
updateDatasourceById
String updateDatasourceById(String id, org.pentaho.database.model.IDatabaseConnection databaseConnection) throws NonExistingDatasourceException, DatasourceMgmtServiceException Updates a given JDBC datasource by id- Parameters:
id
-databaseConnection
-- Returns:
- id
- Throws:
NonExistingDatasourceException
DatasourceMgmtServiceException
-