|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.soton.itinnovation.grid.service.ogsadai.rdbms.MySQLBackendHelper
public class MySQLBackendHelper
| Field Summary |
|---|
| Fields inherited from interface uk.ac.soton.itinnovation.grid.service.ogsadai.rdbms.BackendHelper |
|---|
DAI_CALLBACK, DAI_DRIVER, DAI_NAME, DAI_VENDOR, DAI_VERSION |
| Constructor Summary | |
|---|---|
MySQLBackendHelper()
|
|
| Method Summary | |
|---|---|
void |
addDaa(String dbName,
String username,
String password)
Add a user with administrator privileges to the database. |
void |
addDauRo(String dbName,
String username,
String password)
Add a user with administrator privileges to the database. |
void |
addDauRw(String dbName,
String username,
String password)
Add a user with administrator privileges to the database. |
void |
createDatabase(String dbName)
Create a new database on the RDMBS with the given name. |
void |
dropDatabase(String dbName)
Drop the database on the RDMBS with the given name. |
void |
dropUser(String dbName,
String username)
Remove a user and all his permissions from a database. |
void |
dropUser(String dbName,
String username,
String hostname)
|
String |
getProperty(String property)
Returns the value of a property specific to this database backend. |
void |
initalise(String jdbcUrl,
String systemDatabase,
String systemUsername,
String systemPassword)
Load the backend JDBC driver and store the given RDBMS login credentials. |
void |
initUsers(String dbName,
String usernameDauRo,
String usernameDauRw,
String usernameDaa)
Perform any necessary actions to initalise the DAA, DAU-RW, and DAU-RO users. |
String |
uncommentRelevantActivities(String fileContents)
Uncomment activities to this backend. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MySQLBackendHelper()
| Method Detail |
|---|
public void initalise(String jdbcUrl,
String systemDatabase,
String systemUsername,
String systemPassword)
throws ClassNotFoundException
BackendHelper
initalise in interface BackendHelperjdbcUrl - The base URL of the RDBMS without any database. eg: jdbc:mysql://localhost/systemDatabase - The name of a system database to connect to when performing database
manipulation operations.systemUsername - The username of an administrator user.systemPassword - The password for an administrator user.
ClassNotFoundException - Thrown if the JDBC driver could not be found.
public void createDatabase(String dbName)
throws SQLException
BackendHelper
createDatabase in interface BackendHelperSQLException
public void dropDatabase(String dbName)
throws SQLException
BackendHelper
dropDatabase in interface BackendHelperSQLException
public void addDaa(String dbName,
String username,
String password)
throws SQLException
BackendHelper
addDaa in interface BackendHelperdbName - The name of the database to which the user should be given access.username - The name of the new user.password - The password for the new user.
SQLException
public void addDauRw(String dbName,
String username,
String password)
throws SQLException
BackendHelper
addDauRw in interface BackendHelperdbName - The name of the database to which the user should be given access.username - The name of the new user.password - The password for the new user.
SQLException
public void addDauRo(String dbName,
String username,
String password)
throws SQLException
BackendHelper
addDauRo in interface BackendHelperdbName - The name of the database to which the user should be given access.username - The name of the new user.password - The password for the new user.
SQLException
public void dropUser(String dbName,
String username)
throws SQLException
BackendHelper
dropUser in interface BackendHelperdbName - The name of the database from which the user should be removed.username - The name of the user to be removed.
SQLException
public void dropUser(String dbName,
String username,
String hostname)
throws SQLException
SQLException
public void initUsers(String dbName,
String usernameDauRo,
String usernameDauRw,
String usernameDaa)
throws SQLException
BackendHelper
initUsers in interface BackendHelperdbName - The name of the database.usernameDauRo - The name of the DAU-RO user.usernameDauRw - The name of the DAU-RW user.usernameDaa - The name of the DAA user.
SQLExceptionpublic String uncommentRelevantActivities(String fileContents)
BackendHelper
uncommentRelevantActivities in interface BackendHelperpublic String getProperty(String property)
BackendHelper
getProperty in interface BackendHelperproperty - Name of the property. Can be one of BackendHelper.DAI_CALLBACK,
BackendHelper.DAI_DRIVER, BackendHelper.DAI_NAME, BackendHelper.DAI_VENDOR, or
BackendHelper.DAI_VERSION.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||