|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opencms.setup.CmsSetupDb
public class CmsSetupDb
Helper class to call database setup scripts.
| Field Summary | |
|---|---|
static String |
SETUP_DATA_FOLDER
The folder where to read the setup data from. |
static String |
SETUP_FOLDER
The folder where the setup wizard is located. |
| Constructor Summary | |
|---|---|
CmsSetupDb(String basePath)
Creates a new CmsSetupDb object. |
|
| Method Summary | |
|---|---|
void |
clearErrors()
Clears the error messages stored internally. |
void |
closeConnection()
Closes the internal connection to the database. |
void |
createDatabase(String database,
Map replacer)
Calls the create database script for the given database. |
void |
createDatabase(String database,
Map replacer,
boolean abortOnError)
Calls the create database script for the given database. |
void |
createTables(String database,
Map replacer)
Calls the create tables script for the given database. |
void |
createTables(String database,
Map replacer,
boolean abortOnError)
Calls the create tables script for the given database. |
void |
dropDatabase(String database,
Map replacer)
Calls the drop script for the given database. |
void |
dropDatabase(String database,
Map replacer,
boolean abortOnError)
Calls the drop script for the given database. |
void |
dropTables(String database)
Calls the drop tables script for the given database. |
void |
dropTables(String database,
Map replacer)
Calls the drop tables script for the given database. |
void |
dropTables(String database,
Map replacer,
boolean abortOnError)
Calls the drop tables script for the given database. |
protected void |
finalize()
|
Vector |
getErrors()
Returns a Vector of Error messages. |
boolean |
noErrors()
Checks if internal errors occured. |
void |
setConnection(Connection conn)
Sets a new internal connection to teh database. |
void |
setConnection(String DbDriver,
String DbConStr,
String DbConStrParams,
String DbUser,
String DbPwd)
Creates a new internal connection to the database. |
void |
updateDatabase(String updateScript,
Map replacers)
Calls an update script. |
void |
updateDatabase(String updateScript,
Map replacers,
boolean abortOnError)
Calls an update script. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String SETUP_DATA_FOLDER
public static final String SETUP_FOLDER
| Constructor Detail |
|---|
public CmsSetupDb(String basePath)
basePath - the location of the setup scripts| Method Detail |
|---|
public void clearErrors()
public void closeConnection()
public void createDatabase(String database,
Map replacer)
database - the name of the databasereplacer - the replacements to perform in the drop script
public void createDatabase(String database,
Map replacer,
boolean abortOnError)
database - the name of the databasereplacer - the replacements to perform in the drop scriptabortOnError - indicates if the script is aborted if an error occurs
public void createTables(String database,
Map replacer)
database - the name of the databasereplacer - the replacements to perform in the drop script
public void createTables(String database,
Map replacer,
boolean abortOnError)
database - the name of the databasereplacer - the replacements to perform in the drop scriptabortOnError - indicates if the script is aborted if an error occurs
public void dropDatabase(String database,
Map replacer)
database - the name of the databasereplacer - the replacements to perform in the drop script
public void dropDatabase(String database,
Map replacer,
boolean abortOnError)
database - the name of the databasereplacer - the replacements to perform in the drop scriptabortOnError - indicates if the script is aborted if an error occurspublic void dropTables(String database)
database - the name of the database
public void dropTables(String database,
Map replacer)
database - the name of the databasereplacer - the replacements to perform in the drop script
public void dropTables(String database,
Map replacer,
boolean abortOnError)
database - the name of the databasereplacer - the replacements to perform in the drop scriptabortOnError - indicates if the script is aborted if an error occurspublic Vector getErrors()
public boolean noErrors()
public void setConnection(Connection conn)
conn - the connection to use
public void setConnection(String DbDriver,
String DbConStr,
String DbConStrParams,
String DbUser,
String DbPwd)
DbDriver - JDBC driver class nameDbConStr - JDBC connect URLDbConStrParams - JDBC connect URL params, or nullDbUser - JDBC database userDbPwd - JDBC database password
public void updateDatabase(String updateScript,
Map replacers)
updateScript - the update script codereplacers - the replacers to use in the script code
public void updateDatabase(String updateScript,
Map replacers,
boolean abortOnError)
updateScript - the update script codereplacers - the replacers to use in the script codeabortOnError - indicates if the script is aborted if an error occurs
protected void finalize()
throws Throwable
finalize in class ObjectThrowableObject.finalize()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||