|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface BackendHelper
Interface used by RDBMSDataResourceManager to manipulate a specific type of RDBMS.
| Field Summary | |
|---|---|
static String |
DAI_CALLBACK
|
static String |
DAI_DRIVER
|
static String |
DAI_NAME
|
static String |
DAI_VENDOR
|
static String |
DAI_VERSION
|
| 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. |
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. |
| Field Detail |
|---|
static final String DAI_NAME
static final String DAI_VERSION
static final String DAI_VENDOR
static final String DAI_CALLBACK
static final String DAI_DRIVER
| Method Detail |
|---|
void initalise(String jdbcUrl,
String systemDatabase,
String systemUsername,
String systemPassword)
throws ClassNotFoundException
jdbcUrl - 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.
void createDatabase(String dbName)
throws SQLException
SQLException
void dropDatabase(String dbName)
throws SQLException
SQLException
void addDauRo(String dbName,
String username,
String password)
throws SQLException
dbName - 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
void addDauRw(String dbName,
String username,
String password)
throws SQLException
dbName - 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
void addDaa(String dbName,
String username,
String password)
throws SQLException
dbName - 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
void initUsers(String dbName,
String usernameDauRo,
String usernameDauRw,
String usernameDaa)
throws SQLException
dbName - 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.
SQLException
void dropUser(String dbName,
String username)
throws SQLException
dbName - The name of the database from which the user should be removed.username - The name of the user to be removed.
SQLExceptionString getProperty(String property)
property - Name of the property. Can be one of DAI_CALLBACK,
DAI_DRIVER, DAI_NAME, DAI_VENDOR, or
DAI_VERSION.
String uncommentRelevantActivities(String fileContents)
fileContents -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||