public class CmsUpdateDBManager
extends java.lang.Object
构造器和说明 |
---|
CmsUpdateDBManager()
Default constructor.
|
限定符和类型 | 方法和说明 |
---|---|
java.lang.String |
getDbDriver(java.lang.String pool)
Returns the configured jdbc driver for the given pool.
|
java.lang.String |
getDbName()
Returns the database name.
|
java.lang.String |
getDbParams(java.lang.String pool)
Returns the configured jdbc url parameters for the given pool.
|
java.lang.String |
getDbUrl(java.lang.String pool)
Returns the configured jdbc connection url for the given pool.
|
java.lang.String |
getDbUser(java.lang.String pool)
Returns the configured database user for the given pool.
|
double |
getDetectedVersion()
Returns the detected mayor version, based on DB structure.
|
protected I_CmsUpdateDBPart |
getInstanceForDb(I_CmsUpdateDBPart dbUpdater,
java.lang.String dbName)
Creates a new instance for the given database and setting the db pool data.
|
protected void |
getMySqlEngine(java.util.Map<java.lang.String,java.lang.String> dbPoolData)
Retrieves the mysql engine name.
|
protected void |
getOracleTablespaces(java.util.Map<java.lang.String,java.lang.String> dbPoolData)
Retrieves the oracle tablespace names.
|
java.util.List<java.lang.String> |
getPools()
Returns all configured database pools.
|
protected void |
getPostgreSqlTablespaces(java.util.Map<java.lang.String,java.lang.String> dbPoolData)
Retrieves the postgresql tablespace names.
|
java.lang.String |
htmlPool(java.lang.String pool)
Generates html code for the given db pool.
|
void |
initialize(CmsUpdateBean updateBean)
Initializes the Update Manager object with the updateBean to get the database connection.
|
boolean |
needUpdate()
Checks if an update is needed.
|
void |
run()
Updates all database pools.
|
void |
updateDatabase(java.lang.String pool)
Updates the database.
|
public java.lang.String getDbDriver(java.lang.String pool)
pool
- the db pool to get the driver forpublic java.lang.String getDbName()
public java.lang.String getDbParams(java.lang.String pool)
pool
- the db pool to get the params forpublic java.lang.String getDbUrl(java.lang.String pool)
pool
- the db pool to get the url forpublic java.lang.String getDbUser(java.lang.String pool)
pool
- the db pool to get the user forpublic double getDetectedVersion()
public java.util.List<java.lang.String> getPools()
String
objectspublic java.lang.String htmlPool(java.lang.String pool) throws java.lang.Exception
pool
- the db pool to generate html forjava.lang.Exception
- if something goes wrongpublic void initialize(CmsUpdateBean updateBean) throws java.lang.Exception
updateBean
- the update bean with the database connectionjava.lang.Exception
- if the setup bean is not initializedpublic boolean needUpdate()
public void run()
public void updateDatabase(java.lang.String pool)
pool
- the database pool to updateprotected I_CmsUpdateDBPart getInstanceForDb(I_CmsUpdateDBPart dbUpdater, java.lang.String dbName)
dbUpdater
- the generic updater partdbName
- the database to get a new instance forprotected void getMySqlEngine(java.util.Map<java.lang.String,java.lang.String> dbPoolData)
dbPoolData
- the database pool dataprotected void getOracleTablespaces(java.util.Map<java.lang.String,java.lang.String> dbPoolData)
dbPoolData
- the database pool dataprotected void getPostgreSqlTablespaces(java.util.Map<java.lang.String,java.lang.String> dbPoolData)
dbPoolData
- the database pool data