public class CmsUpdateBean extends CmsSetupBean
| 限定符和类型 | 字段和说明 |
|---|---|
static java.lang.String |
FOLDER_UPDATE
name of the update folder.
|
protected int |
m_newLoggingDBOffset
The new logging offset in the database update thread.
|
protected int |
m_oldLoggingDBOffset
The old logging offset in the database update thread.
|
AS400_PROVIDER, COMPONENTS_PROPERTIES, DB2_PROVIDER, DEFAULT_POSITION, DRIVER_TYPE_JPA, DRIVER_TYPE_SQL, FOLDER_BACKUP, FOLDER_DATABASE, FOLDER_LIB, FOLDER_SETUP, GENERIC_PROVIDER, HSQLDB_PROVIDER, HTML_MESSAGE_FILE, JPA_FACTOTY, JPA_PROVIDER, m_availableModules, m_cms, m_installModules, m_logFile, m_logsFolder, m_moduleDependencies, m_moduleFilenames, m_modulesFolder, m_newLoggingOffset, m_oldLoggingOffset, m_webAppRfsPath, MAXDB_PROVIDER, MSSQL_PROVIDER, MYSQL_PROVIDER, ORACLE_PROVIDER, POSTGRESQL_PROVIDER, PROPKEY_CHECKED, PROPKEY_COMPONENT, PROPKEY_COMPONENTS, PROPKEY_DEPENDENCIES, PROPKEY_DESCRIPTION, PROPKEY_JPA_SUPPORTED, PROPKEY_MODULES, PROPKEY_NAME, PROPKEY_POSITION, PROPKEY_SQL_SUPPORTED| 构造器和说明 |
|---|
CmsUpdateBean()
Default constructor.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addSubscriptionDriver()
Adds the subscription driver to the properties.
|
boolean |
checkOceeVersion(java.lang.String version)
Compatibility check for OCEE modules.
|
void |
createSharedFolder()
Creates the shared folder if possible.
|
java.lang.String |
displayError(java.lang.String pathPrefix)
Returns html code to display an error.
|
protected java.lang.String |
getAdminGroup()
Returns the admin Group.
|
java.lang.String |
getAdminPwd()
Returns the admin Pwd.
|
java.lang.String |
getAdminUser()
Returns the admin User.
|
double |
getDetectedVersion()
Returns the detected mayor version, based on DB structure.
|
java.util.Map<java.lang.String,CmsModuleVersion> |
getInstalledModules()
Returns a map of all previously installed modules.
|
protected java.util.List<java.lang.String> |
getModulesToDelete()
Computes a list of modules which need to be removed before updating the other modules, e.g. because of resource type
conflicts.
|
java.util.List<java.lang.String> |
getModulesToUpdate()
List of modules to be updated.
|
CmsUpdateDBThread |
getUpdateDBThread()
Returns the update database thread.
|
java.lang.String |
getUpdateProject()
Returns the update Project.
|
java.lang.String |
getUpdateSite()
Returns the update site.
|
java.util.List<java.lang.String> |
getUptodateModules()
Returns the modules that does not need to be updated.
|
CmsUpdateThread |
getWorkplaceUpdateThread()
Returns the workplace update thread.
|
java.lang.String |
htmlModules()
Returns html for displaying a module selection box.
|
void |
init(java.lang.String webAppRfsPath,
java.lang.String servletMapping,
java.lang.String defaultWebApplication)
Creates a new instance of the setup Bean.
|
boolean |
isKeepHistory()
Returns the keep History parameter value.
|
boolean |
isNeedDbUpdate()
Returns
true if a DB update is needed. |
void |
preload()
Try to preload necessary classes, to avoid ugly class loader issues caused by JARs being deleted during the update.
|
void |
preload(java.lang.Class<?> cls)
Preloads classes from the same jar file as a given class.
|
void |
prepareUpdateStep1()
Prepares step 1 of the update wizard.
|
void |
prepareUpdateStep1b()
Prepares step 1 of the update wizard.
|
void |
prepareUpdateStep1bOutput(javax.servlet.jsp.JspWriter out)
Generates the output for step 1 of the setup wizard.
|
void |
prepareUpdateStep5()
Prepares step 5 of the update wizard.
|
void |
prepareUpdateStep5b()
Prepares step 5 of the update wizard.
|
void |
prepareUpdateStep5bOutput(javax.servlet.jsp.JspWriter out)
Generates the output for the update wizard.
|
void |
prepareUpdateStep6()
Prepares step 6 of the update wizard.
|
protected void |
removeModule(java.lang.String moduleName,
I_CmsReport report)
Removes a module.
|
protected void |
setAdminGroup(java.lang.String adminGroup)
Sets the admin Group.
|
void |
setAdminPwd(java.lang.String adminPwd)
Sets the admin Pwd.
|
void |
setAdminUser(java.lang.String adminUser)
Sets the admin User.
|
void |
setDetectedVersion(double detectedVersion)
Sets the detected mayor version.
|
void |
setKeepHistory(boolean keepHistory)
Sets the keep History parameter value.
|
void |
setUpdateProject(java.lang.String updateProject)
Sets the update Project.
|
void |
setUpdateSite(java.lang.String site)
Sets the update site.
|
void |
shellExit()
May be called after shell exit, can e.g. be used to ouput a goodbye message.
|
void |
shellStart()
May be called before shell startup, can e.g. be used to ouput a welcome message.
|
protected void |
updateModule(java.lang.String moduleName,
java.lang.String importFile,
I_CmsReport report)
Imports a module (zipfile) from the default module directory,
creating a temporary project for this.
|
void |
updateModulesFromUpdateBean()
Installed all modules that have been set using
CmsSetupBean.setInstallModules(String). |
void |
updateRelations()
Fills the relations db tables during the update.
|
addComponentsFromPath, backupConfiguration, buildDepsForAllComponents, checkEthernetAddress, clearCache, copyFile, displayErrors, getAvailableModules, getComponentModules, getComponents, getComponentsProperties, getConfigRfsPath, getDatabase, getDatabaseConfigPage, getDatabaseLibs, getDatabaseName, getDatabaseProperties, getDatabases, getDb, getDbConStrParams, getDbCreateConStr, getDbCreatePwd, getDbCreateUser, getDbDriver, getDbProperty, getDbTestQuery, getDbWorkConStr, getDbWorkPwd, getDbWorkUser, getDefaultContentEncoding, getDefaultWebApplication, getDisplayForModule, getErrors, getEthernetAddress, getExtProperty, getFullDatabaseKey, getHtmlForDbSelection, getHtmlHelpIcon, getHtmlPart, getHtmlPart, getLibFolder, getLogName, getModuleDependencies, getModuleFolder, getModulesToInstall, getPool, getProperties, getReplacer, getServerName, getServletConfig, getServletMapping, getSortedDatabases, getWebAppRfsPath, getWizardEnabled, getWorkplaceImportThread, getWorkplaceSite, getXmlHelper, htmlComponent, htmlComponents, htmlModule, htmlModuleHelpDescriptions, importModuleFromDefault, importModulesFromSetupBean, init, initHtmlParts, initializeComponents, initShellCmsObject, isAutoMode, isChecked, isImportRunning, isInitialized, isJpaSupported, isSqlSupported, jsComponentDependencies, jsComponentModules, jsComponentNames, jsModuleDependencies, jsModuleNames, lockWizard, prepareStep10, prepareStep8, prepareStep8b, prepareStep8bOutput, readDatabaseConfig, saveProperties, saveProperties, setAutoMode, setDatabase, setDb, setDbConStrParams, setDbCreateConStr, setDbCreatePwd, setDbCreateUser, setDbDriver, setDbParamaters, setDbParamaters, setDbProperty, setDbWorkConStr, setDbWorkPwd, setDbWorkUser, setDriverType, setEthernetAddress, setExtProperty, setFullDatabaseKey, setInstallModules, setReplacer, setServerName, setWorkplaceSite, sortModules, validateJdbcpublic static final java.lang.String FOLDER_UPDATE
protected int m_newLoggingDBOffset
protected int m_oldLoggingDBOffset
public void addSubscriptionDriver()
public boolean checkOceeVersion(java.lang.String version)
version - the opencms versionfalse if OCEE is present but not compatible with opencms versionpublic void createSharedFolder()
throws java.lang.Exception
java.lang.Exception - if something goes wrongpublic java.lang.String displayError(java.lang.String pathPrefix)
displayError 在类中 CmsSetupBeanpathPrefix - to adjust the pathpublic java.lang.String getAdminPwd()
public java.lang.String getAdminUser()
public double getDetectedVersion()
public java.util.Map<java.lang.String,CmsModuleVersion> getInstalledModules()
[String, CmsModuleVersion] objectsCmsModuleManager.getAllInstalledModules()public java.util.List<java.lang.String> getModulesToUpdate()
public CmsUpdateDBThread getUpdateDBThread()
public java.lang.String getUpdateProject()
public java.lang.String getUpdateSite()
public java.util.List<java.lang.String> getUptodateModules()
public CmsUpdateThread getWorkplaceUpdateThread()
public java.lang.String htmlModules()
CmsSetupBeanhtmlModules 在类中 CmsSetupBeanCmsSetupBean.htmlModules()public void init(java.lang.String webAppRfsPath,
java.lang.String servletMapping,
java.lang.String defaultWebApplication)
init 在类中 CmsSetupBeanwebAppRfsPath - path to the OpenCms web applicationservletMapping - the OpenCms servlet mappingdefaultWebApplication - the name of the default web applicationpublic boolean isKeepHistory()
public boolean isNeedDbUpdate()
true if a DB update is needed.true if a DB update is neededpublic void preload()
public void preload(java.lang.Class<?> cls)
cls - the class for which the classes from the same jar file should be loadedpublic void prepareUpdateStep1()
public void prepareUpdateStep1b()
public void prepareUpdateStep1bOutput(javax.servlet.jsp.JspWriter out)
throws java.io.IOException
out - the JSP print streamjava.io.IOException - in case errors occur while writing to "out"public void prepareUpdateStep5()
public void prepareUpdateStep5b()
public void prepareUpdateStep5bOutput(javax.servlet.jsp.JspWriter out)
throws java.io.IOException
out - the JSP print streamjava.io.IOException - in case errors occur while writing to "out"public void prepareUpdateStep6()
public void setAdminPwd(java.lang.String adminPwd)
adminPwd - the admin Pwd to setpublic void setAdminUser(java.lang.String adminUser)
adminUser - the admin User to setpublic void setDetectedVersion(double detectedVersion)
detectedVersion - the value to setpublic void setKeepHistory(boolean keepHistory)
keepHistory - the keep History parameter value to setpublic void setUpdateProject(java.lang.String updateProject)
updateProject - the update Project to setpublic void setUpdateSite(java.lang.String site)
site - the update site to setpublic void shellExit()
I_CmsShellCommandsPlease note: This method is not guaranteed to be called. For a shell that has more then one shell command object initialized, only the exit method of one of thouse will be called.
shellExit 在接口中 I_CmsShellCommandsshellExit 在类中 CmsSetupBeanI_CmsShellCommands.shellExit()public void shellStart()
I_CmsShellCommandsPlease note: This method is not guaranteed to be called. For a shell that has more then one shell command object initialized, only the start method of one of thouse will be called.
shellStart 在接口中 I_CmsShellCommandsshellStart 在类中 CmsSetupBeanI_CmsShellCommands.shellStart()public void updateModulesFromUpdateBean()
throws java.lang.Exception
CmsSetupBean.setInstallModules(String).This method is invoked as a shell command.
java.lang.Exception - if something goes wrongpublic void updateRelations()
throws java.lang.Exception
java.lang.Exception - if something goes wrongprotected java.lang.String getAdminGroup()
protected java.util.List<java.lang.String> getModulesToDelete()
protected void removeModule(java.lang.String moduleName,
I_CmsReport report)
throws CmsException
moduleName - the name of the module to removereport - the report to write toCmsExceptionprotected void setAdminGroup(java.lang.String adminGroup)
adminGroup - the admin Group to setprotected void updateModule(java.lang.String moduleName,
java.lang.String importFile,
I_CmsReport report)
throws java.lang.Exception
moduleName - the name of the module to replaceimportFile - the name of the import .zip file located in the update module directoryreport - the shell report to write the outputjava.lang.Exception - if something goes wrongCmsImportExportManager.importData(org.opencms.file.CmsObject, I_CmsReport, org.opencms.importexport.CmsImportParameters)