public class CmsSetupBean extends java.lang.Object implements I_CmsShellCommands
It is not allowed to customize this bean with methods for a specific database server setup!
Database server specific settings should be set/read using get/setDbProperty, as for example like:
setDbProperty("oracle.defaultTablespace", value);
限定符和类型 | 字段和说明 |
---|---|
static java.lang.String |
AS400_PROVIDER
DB provider constant for as400.
|
static java.lang.String |
COMPONENTS_PROPERTIES
The name of the components properties file.
|
static java.lang.String |
DB2_PROVIDER
DB provider constant for db2.
|
protected static int |
DEFAULT_POSITION
The default component position, is missing.
|
static byte |
DRIVER_TYPE_JPA
jpa type constant.
|
static byte |
DRIVER_TYPE_SQL
jpa type constant.
|
static java.lang.String |
FOLDER_BACKUP
Folder constant name.
|
static java.lang.String |
FOLDER_DATABASE
Folder constant name.
|
static java.lang.String |
FOLDER_LIB
Folder constant name.
|
static java.lang.String |
FOLDER_SETUP
Folder constant name.
|
static java.lang.String |
GENERIC_PROVIDER
DB provider constant.
|
static java.lang.String |
HSQLDB_PROVIDER
DB provider constant for hsqldb.
|
static java.lang.String |
HTML_MESSAGE_FILE
Name of the property file containing HTML fragments for setup wizard and error dialog.
|
static java.lang.String |
JPA_FACTOTY
The jpa CmsDbContextFactory for the opencms-system.xml node: runtimeclasses -> runtimeinfo.
|
static java.lang.String |
JPA_PROVIDER
DB provider constant for jpa.
|
protected java.util.Map<java.lang.String,CmsModule> |
m_availableModules
A map with all available modules.
|
protected CmsObject |
m_cms
A CmsObject to execute shell commands.
|
protected java.util.List<java.lang.String> |
m_installModules
A list with the package names of the modules to be installed .
|
protected java.lang.String |
m_logFile
Location for log file.
|
protected java.lang.String |
m_logsFolder
Location for logs relative to the webapp folder.
|
protected java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
m_moduleDependencies
A map with lists of dependent module package names keyed by module package names.
|
protected java.util.Map<java.lang.String,java.lang.String> |
m_moduleFilenames
A map with all available modules filenames.
|
protected java.lang.String |
m_modulesFolder
Location for module archives relative to the webapp folder.
|
protected int |
m_newLoggingOffset
The new logging offset in the workplace import thread.
|
protected int |
m_oldLoggingOffset
The lod logging offset in the workplace import thread.
|
protected java.lang.String |
m_webAppRfsPath
The absolute path to the home directory of the OpenCms webapp.
|
static java.lang.String |
MAXDB_PROVIDER
DB provider constant for maxdb.
|
static java.lang.String |
MSSQL_PROVIDER
DB provider constant for mssql.
|
static java.lang.String |
MYSQL_PROVIDER
DB provider constant for mysql.
|
static java.lang.String |
ORACLE_PROVIDER
DB provider constant for oracle.
|
static java.lang.String |
POSTGRESQL_PROVIDER
DB provider constant for postgresql.
|
protected static java.lang.String |
PROPKEY_CHECKED
Properties file key constant post fix.
|
protected static java.lang.String |
PROPKEY_COMPONENT
Properties file key constant prefix.
|
protected static java.lang.String |
PROPKEY_COMPONENTS
Properties file key constant.
|
protected static java.lang.String |
PROPKEY_DEPENDENCIES
Properties file key constant post fix.
|
protected static java.lang.String |
PROPKEY_DESCRIPTION
Properties file key constant post fix.
|
protected static java.lang.String |
PROPKEY_JPA_SUPPORTED
True if OpenCms supports a generic JPA driver implementation.
|
protected static java.lang.String |
PROPKEY_MODULES
Properties file key constant post fix.
|
protected static java.lang.String |
PROPKEY_NAME
Properties file key constant post fix.
|
protected static java.lang.String |
PROPKEY_POSITION
Properties file key constant post fix.
|
protected static java.lang.String |
PROPKEY_SQL_SUPPORTED
True if OpenCms supports a native SQL driver implementation.
|
构造器和说明 |
---|
CmsSetupBean()
Default constructor.
|
限定符和类型 | 方法和说明 |
---|---|
protected void |
addComponentsFromPath(java.lang.String fileName)
Reads all components from the given location, a folder or a zip file.
|
void |
backupConfiguration(java.lang.String filename,
java.lang.String originalFilename)
Restores the opencms.xml either to or from a backup file, depending
whether the setup wizard is executed the first time (the backup
does not exist) or not (the backup exists).
|
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
buildDepsForAllComponents()
Returns a map of dependencies.
|
void |
checkEthernetAddress()
Checks the ethernet address value and generates a dummy address, if necessary.
|
void |
clearCache()
Clears the cache.
|
void |
copyFile(java.lang.String source,
java.lang.String target)
Copies a given file.
|
java.lang.String |
displayError(java.lang.String pathPrefix)
Returns html code to display an error.
|
java.lang.String |
displayErrors(java.lang.String pathPrefix)
Returns html code to display the errors occurred.
|
java.util.Map<java.lang.String,CmsModule> |
getAvailableModules()
Returns a map with all available modules.
|
protected java.lang.String |
getComponentModules(java.util.List<java.lang.String> componentIds)
Returns a pipe separated list of module names for the given list of components.
|
CmsIdentifiableObjectContainer<CmsSetupComponent> |
getComponents()
Returns the components.
|
protected CmsParameterConfiguration |
getComponentsProperties(java.lang.String location)
Reads all properties from the components.properties file at the given location, a folder or a zip file.
|
java.lang.String |
getConfigRfsPath()
Returns the "config" path in the OpenCms web application.
|
java.lang.String |
getDatabase()
Returns the key of the selected database server (e.g.
|
java.lang.String |
getDatabaseConfigPage(java.lang.String key)
Returns the URI of a database config page (in step 3) for a specified database key.
|
java.util.List<java.lang.String> |
getDatabaseLibs(java.lang.String databaseKey)
Returns a list of needed jar filenames for a database server setup specified by a database key (e.g.
|
java.lang.String |
getDatabaseName(java.lang.String databaseKey)
Returns the clear text name for a database server setup specified by a database key (e.g.
|
java.util.Map<java.lang.String,java.util.Properties> |
getDatabaseProperties()
Returns a map with the database properties of *all* available database configurations keyed
by their database keys (e.g.
|
java.util.List<java.lang.String> |
getDatabases()
Returns a list with they keys (e.g.
|
java.lang.String |
getDb()
Returns the database name.
|
java.lang.String |
getDbConStrParams()
Returns the JDBC connect URL parameters.
|
java.lang.String |
getDbCreateConStr()
Returns the database create statement.
|
java.lang.String |
getDbCreatePwd()
Returns the password used for database creation.
|
java.lang.String |
getDbCreateUser()
Returns the database user that is used to connect to the database.
|
java.lang.String |
getDbDriver()
Returns the database driver belonging to the database
from the default configuration.
|
java.lang.String |
getDbProperty(java.lang.String key)
Returns the value for a given key from the database properties.
|
java.lang.String |
getDbTestQuery()
Returns the validation query belonging to the database
from the default configuration .
|
java.lang.String |
getDbWorkConStr()
Returns a connection string.
|
java.lang.String |
getDbWorkPwd()
Returns the password of the database from the properties .
|
java.lang.String |
getDbWorkUser()
Returns the user of the database from the properties.
|
java.lang.String |
getDefaultContentEncoding()
Returns the default content encoding.
|
java.lang.String |
getDefaultWebApplication()
Returns the name of the default web application, configured in
web.xml . |
java.lang.String |
getDisplayForModule(CmsModule module)
Returns the display string for a given module.
|
java.util.List<java.lang.String> |
getErrors()
Returns the error messages.
|
java.lang.String |
getEthernetAddress()
Returns the mac ethernet address.
|
protected java.lang.String |
getExtProperty(java.lang.String key)
Returns the value for a given key from the extended properties.
|
java.lang.String |
getFullDatabaseKey()
Returns the fullDatabaseKey.
|
java.lang.String |
getHtmlForDbSelection()
Generates the HTML code for the drop down for db selection.
|
java.lang.String |
getHtmlHelpIcon(java.lang.String id,
java.lang.String pathPrefix)
Returns a help image icon tag to display a help text in the setup wizard.
|
java.lang.String |
getHtmlPart(java.lang.String part)
Returns the specified HTML part of the HTML property file to create the output.
|
java.lang.String |
getHtmlPart(java.lang.String part,
java.lang.String replaceString)
Returns the specified HTML part of the HTML property file to create the output.
|
java.lang.String |
getLibFolder()
Returns the path to the /WEB-INF/lib folder.
|
java.lang.String |
getLogName()
Returns the name of the log file.
|
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getModuleDependencies()
Returns a map with lists of dependent module package names keyed by module package names.
|
java.lang.String |
getModuleFolder()
Returns the absolute path to the module root folder.
|
java.util.List<java.lang.String> |
getModulesToInstall()
Returns A list with the package names of the modules to be installed.
|
java.lang.String |
getPool()
Gets the default pool.
|
CmsParameterConfiguration |
getProperties()
Returns the parameter configuration.
|
java.util.Map<java.lang.String,java.lang.String> |
getReplacer()
Returns the replacer.
|
java.lang.String |
getServerName()
Return the OpenCms server name.
|
javax.servlet.ServletConfig |
getServletConfig()
Returns the initial servlet configuration.
|
java.lang.String |
getServletMapping()
Returns the OpenCms servlet mapping, configured in
web.xml . |
java.util.List<java.lang.String> |
getSortedDatabases()
Returns a sorted list with they keys (e.g.
|
java.lang.String |
getWebAppRfsPath()
Returns the absolute path to the OpenCms home directory.
|
boolean |
getWizardEnabled()
Checks if the setup wizard is enabled.
|
CmsSetupWorkplaceImportThread |
getWorkplaceImportThread()
Returns the workplace import thread.
|
java.lang.String |
getWorkplaceSite()
Return the OpenCms workplace site.
|
CmsSetupXmlHelper |
getXmlHelper()
Returns the xml Helper object.
|
protected java.lang.String |
htmlComponent(CmsSetupComponent component)
Returns html for the given component to fill the selection list.
|
java.lang.String |
htmlComponents()
Returns the html code for component selection.
|
protected java.lang.String |
htmlModule(CmsModule module,
int pos)
Returns html for the given module to fill the selection list.
|
java.lang.String |
htmlModuleHelpDescriptions()
Returns html code for the module descriptions in help ballons.
|
java.lang.String |
htmlModules()
Returns html for displaying a module selection box.
|
protected void |
importModuleFromDefault(java.lang.String importFile)
Imports a module (zipfile) from the default module directory,
creating a temporary project for this.
|
void |
importModulesFromSetupBean()
Installed all modules that have been set using
setInstallModules(String) . |
void |
init(javax.servlet.jsp.PageContext pageContext)
Creates a new instance of the setup Bean from a JSP page.
|
void |
init(java.lang.String webAppRfsPath,
java.lang.String servletMapping,
java.lang.String defaultWebApplication)
Creates a new instance of the setup Bean.
|
void |
initHtmlParts()
This method reads the properties from the htmlmsg.property file
and sets the HTML part properties with the matching values.
|
protected void |
initializeComponents(java.util.Collection<java.lang.String> modules)
Initializes and validates the read components.
|
void |
initShellCmsObject(CmsObject cms,
CmsShell shell)
Provides access to the shell CmsObject and the shell itself.
|
boolean |
isAutoMode()
Returns the autoMode.
|
java.lang.String |
isChecked(java.lang.String value1,
java.lang.String value2)
Over simplistic helper to compare two strings to check radio buttons.
|
protected boolean |
isImportRunning()
Returns
true if the import thread is currently running. |
boolean |
isInitialized()
Returns true if this setup bean is correctly initialized.
|
boolean |
isJpaSupported(java.lang.String dbKey)
Returns true if jpa is supported for the given dbKey.
|
boolean |
isSqlSupported(java.lang.String dbKey)
Returns true if sql is supported for the given dbKey.
|
java.lang.String |
jsComponentDependencies()
Returns js code with array definition for the available component dependencies.
|
java.lang.String |
jsComponentModules()
Returns js code with array definition for the component modules.
|
java.lang.String |
jsComponentNames()
Returns js code with array definition for the available components names.
|
java.lang.String |
jsModuleDependencies()
Returns js code with array definition for the available module dependencies.
|
java.lang.String |
jsModuleNames()
Returns js code with array definition for the available module names.
|
void |
lockWizard()
Locks (i.e. disables) the setup wizard.
|
void |
prepareStep10()
Prepares step 10 of the setup wizard.
|
boolean |
prepareStep8()
Prepares step 8 of the setup wizard.
|
void |
prepareStep8b()
Prepares step 8b of the setup wizard.
|
void |
prepareStep8bOutput(javax.servlet.jsp.JspWriter out)
Generates the output for step 8b of the setup wizard.
|
protected void |
readDatabaseConfig()
Stores the properties of all available database configurations in a
map keyed by their database key names (e.g.
|
void |
saveProperties(CmsParameterConfiguration properties,
java.lang.String file,
boolean backup)
Saves properties to specified file.
|
void |
saveProperties(CmsParameterConfiguration properties,
java.lang.String file,
boolean backup,
java.util.Set<java.lang.String> forceWrite)
Saves properties to specified file.
|
void |
setAutoMode(boolean autoMode)
Sets the autoMode.
|
void |
setDatabase(java.lang.String databaseKey)
Sets the database drivers to the given value.
|
void |
setDb(java.lang.String db)
Sets the database name.
|
void |
setDbConStrParams(java.lang.String value)
Sets the JDBC connect URL parameters.
|
void |
setDbCreateConStr(java.lang.String dbCreateConStr)
Sets the database create statement.
|
void |
setDbCreatePwd(java.lang.String dbCreatePwd)
Sets the password used for the initial OpenCms database creation.
|
void |
setDbCreateUser(java.lang.String dbCreateUser)
Set the database user that is used to connect to the database.
|
void |
setDbDriver(java.lang.String driver)
Sets the database driver belonging to the database.
|
boolean |
setDbParamaters(javax.servlet.http.HttpServletRequest request,
java.lang.String provider)
Sets the needed database parameters.
|
boolean |
setDbParamaters(java.util.Map<java.lang.String,java.lang.String[]> request,
java.lang.String provider,
java.lang.String contextPath,
javax.servlet.http.HttpSession session)
Sets the needed database parameters.
|
void |
setDbProperty(java.lang.String key,
java.lang.String value)
This method sets the value for a given key in the database properties.
|
void |
setDbWorkConStr(java.lang.String dbWorkConStr)
Sets the connection string to the database to the given value.
|
void |
setDbWorkPwd(java.lang.String dbWorkPwd)
Sets the password of the database to the given value.
|
void |
setDbWorkUser(java.lang.String dbWorkUser)
Sets the user of the database to the given value.
|
void |
setDriverType(java.lang.String type)
Sets the driver type.
|
void |
setEthernetAddress(java.lang.String ethernetAddress)
Set the mac ethernet address, required for UUID generation.
|
protected void |
setExtProperty(java.lang.String key,
java.lang.String value)
This method sets the value for a given key in the extended properties.
|
void |
setFullDatabaseKey(java.lang.String fullDatabaseKey)
Sets the fullDatabaseKey.
|
void |
setInstallModules(java.lang.String value)
Sets the list with the package names of the modules to be installed.
|
void |
setReplacer(java.util.Map<java.lang.String,java.lang.String> map)
Sets the replacer.
|
void |
setServerName(java.lang.String name)
Sets the OpenCms server name.
|
void |
setWorkplaceSite(java.lang.String newSite)
Sets the OpenCms workplace 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.
|
java.util.List<java.lang.String> |
sortModules(java.util.Collection<CmsModule> modules)
Sorts the modules for display.
|
boolean |
validateJdbc()
Checks the jdbc driver.
|
public static final java.lang.String AS400_PROVIDER
public static final java.lang.String COMPONENTS_PROPERTIES
public static final java.lang.String DB2_PROVIDER
public static final byte DRIVER_TYPE_JPA
public static final byte DRIVER_TYPE_SQL
public static final java.lang.String FOLDER_BACKUP
public static final java.lang.String FOLDER_DATABASE
public static final java.lang.String FOLDER_LIB
public static final java.lang.String FOLDER_SETUP
public static final java.lang.String GENERIC_PROVIDER
public static final java.lang.String HSQLDB_PROVIDER
public static final java.lang.String HTML_MESSAGE_FILE
public static final java.lang.String JPA_FACTOTY
public static final java.lang.String JPA_PROVIDER
public static final java.lang.String MAXDB_PROVIDER
public static final java.lang.String MSSQL_PROVIDER
public static final java.lang.String MYSQL_PROVIDER
public static final java.lang.String ORACLE_PROVIDER
public static final java.lang.String POSTGRESQL_PROVIDER
protected static final int DEFAULT_POSITION
protected static final java.lang.String PROPKEY_CHECKED
protected static final java.lang.String PROPKEY_COMPONENT
protected static final java.lang.String PROPKEY_COMPONENTS
protected static final java.lang.String PROPKEY_DEPENDENCIES
protected static final java.lang.String PROPKEY_DESCRIPTION
protected static final java.lang.String PROPKEY_JPA_SUPPORTED
protected static final java.lang.String PROPKEY_MODULES
protected static final java.lang.String PROPKEY_NAME
protected static final java.lang.String PROPKEY_POSITION
protected static final java.lang.String PROPKEY_SQL_SUPPORTED
protected java.util.Map<java.lang.String,CmsModule> m_availableModules
protected CmsObject m_cms
protected java.util.List<java.lang.String> m_installModules
protected java.lang.String m_logFile
protected java.lang.String m_logsFolder
protected java.util.Map<java.lang.String,java.util.List<java.lang.String>> m_moduleDependencies
protected java.util.Map<java.lang.String,java.lang.String> m_moduleFilenames
protected java.lang.String m_modulesFolder
protected int m_newLoggingOffset
protected int m_oldLoggingOffset
protected java.lang.String m_webAppRfsPath
public void backupConfiguration(java.lang.String filename, java.lang.String originalFilename)
filename
- something like e.g. "opencms.xml"originalFilename
- the configurations real file name, e.g. "opencms.xml.ori"public java.util.Map<java.lang.String,java.util.List<java.lang.String>> buildDepsForAllComponents()
The component dependencies are get from the setup and module components.properties files found.
public void checkEthernetAddress()
*
public void clearCache()
public void copyFile(java.lang.String source, java.lang.String target)
source
- the source filetarget
- the destination filepublic java.lang.String displayError(java.lang.String pathPrefix)
pathPrefix
- to adjust the pathpublic java.lang.String displayErrors(java.lang.String pathPrefix)
pathPrefix
- to adjust the pathpublic java.util.Map<java.lang.String,CmsModule> getAvailableModules()
The map contains maps keyed by module package names. Each of these maps contains various information about the module such as the module name, version, description, and a list of it's dependencies. You should refer to the source code of this method to understand the data structure of the map returned by this method!
public CmsIdentifiableObjectContainer<CmsSetupComponent> getComponents()
public java.lang.String getConfigRfsPath()
public java.lang.String getDatabase()
public java.lang.String getDatabaseConfigPage(java.lang.String key)
key
- the database key (e.g. "mysql", "generic" or "oracle")public java.util.List<java.lang.String> getDatabaseLibs(java.lang.String databaseKey)
databaseKey
- a database key (e.g. "mysql", "generic" or "oracle")public java.lang.String getDatabaseName(java.lang.String databaseKey)
databaseKey
- a database key (e.g. "mysql", "generic" or "oracle")public java.util.Map<java.lang.String,java.util.Properties> getDatabaseProperties()
public java.util.List<java.lang.String> getDatabases()
public java.lang.String getDb()
public java.lang.String getDbConStrParams()
public java.lang.String getDbCreateConStr()
public java.lang.String getDbCreatePwd()
public java.lang.String getDbCreateUser()
public java.lang.String getDbDriver()
public java.lang.String getDbProperty(java.lang.String key)
key
- the property keypublic java.lang.String getDbTestQuery()
public java.lang.String getDbWorkConStr()
public java.lang.String getDbWorkPwd()
public java.lang.String getDbWorkUser()
public java.lang.String getDefaultContentEncoding()
public java.lang.String getDefaultWebApplication()
web.xml
.
By default this is "ROOT"
.
web.xml
public java.lang.String getDisplayForModule(CmsModule module)
module
- a modulepublic java.util.List<java.lang.String> getErrors()
public java.lang.String getEthernetAddress()
public java.lang.String getFullDatabaseKey()
public java.lang.String getHtmlForDbSelection()
public java.lang.String getHtmlHelpIcon(java.lang.String id, java.lang.String pathPrefix)
id
- the id of the desired help divpathPrefix
- the path prefix to the imagepublic java.lang.String getHtmlPart(java.lang.String part)
part
- the name of the desired partpublic java.lang.String getHtmlPart(java.lang.String part, java.lang.String replaceString)
part
- the name of the desired partreplaceString
- String which is inserted in the found HTML part at the location of "$replace$"public java.lang.String getLibFolder()
public java.lang.String getLogName()
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getModuleDependencies()
public java.lang.String getModuleFolder()
public java.util.List<java.lang.String> getModulesToInstall()
public java.lang.String getPool()
public CmsParameterConfiguration getProperties()
public java.util.Map<java.lang.String,java.lang.String> getReplacer()
public java.lang.String getServerName()
public javax.servlet.ServletConfig getServletConfig()
public java.lang.String getServletMapping()
web.xml
.
By default this is "/opencms/*"
.
web.xml
public java.util.List<java.lang.String> getSortedDatabases()
public java.lang.String getWebAppRfsPath()
public boolean getWizardEnabled()
public CmsSetupWorkplaceImportThread getWorkplaceImportThread()
public java.lang.String getWorkplaceSite()
public CmsSetupXmlHelper getXmlHelper()
public java.lang.String htmlComponents()
public java.lang.String htmlModuleHelpDescriptions()
public java.lang.String htmlModules()
public void importModulesFromSetupBean() throws java.lang.Exception
setInstallModules(String)
.This method is invoked as a shell command.
java.lang.Exception
- if something goes wrongpublic void init(javax.servlet.jsp.PageContext pageContext)
pageContext
- the JSP's page contextpublic void init(java.lang.String webAppRfsPath, java.lang.String servletMapping, java.lang.String defaultWebApplication)
webAppRfsPath
- path to the OpenCms web applicationservletMapping
- the OpenCms servlet mappingdefaultWebApplication
- the name of the default web applicationpublic void initHtmlParts()
public void initShellCmsObject(CmsObject cms, CmsShell shell)
I_CmsShellCommands
initShellCmsObject
在接口中 I_CmsShellCommands
cms
- the shell CmsObjectshell
- the CmsShellI_CmsShellCommands.initShellCmsObject(org.opencms.file.CmsObject, org.opencms.main.CmsShell)
public boolean isAutoMode()
public java.lang.String isChecked(java.lang.String value1, java.lang.String value2)
value1
- the first valuevalue2
- the second valuepublic boolean isInitialized()
public boolean isJpaSupported(java.lang.String dbKey)
dbKey
- the database key to check the jpa support forpublic boolean isSqlSupported(java.lang.String dbKey)
dbKey
- the database key to check the sql support forpublic java.lang.String jsComponentDependencies()
public java.lang.String jsComponentModules()
public java.lang.String jsComponentNames()
public java.lang.String jsModuleDependencies()
public java.lang.String jsModuleNames()
public void lockWizard()
public void prepareStep10()
public boolean prepareStep8()
public void prepareStep8b()
public void prepareStep8bOutput(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 saveProperties(CmsParameterConfiguration properties, java.lang.String file, boolean backup)
properties
- the properties to be savedfile
- the file to save the properties tobackup
- if true, create a backupfilepublic void saveProperties(CmsParameterConfiguration properties, java.lang.String file, boolean backup, java.util.Set<java.lang.String> forceWrite)
properties
- the properties to be savedfile
- the file to save the properties tobackup
- if true, create a backupfileforceWrite
- the keys for the properties which should always be written, even if they don't exist in the configuration filepublic void setAutoMode(boolean autoMode)
autoMode
- the autoMode to setpublic void setDatabase(java.lang.String databaseKey)
databaseKey
- the key of the selected database server (e.g. "mysql", "generic" or "oracle")public void setDb(java.lang.String db)
db
- the database name to setpublic void setDbConStrParams(java.lang.String value)
value
- the JDBC connect URL parameterspublic void setDbCreateConStr(java.lang.String dbCreateConStr)
dbCreateConStr
- the database create statementpublic void setDbCreatePwd(java.lang.String dbCreatePwd)
This password will not be stored permanently, but used only in the setup wizard.
dbCreatePwd
- the password used for the initial OpenCms database creationpublic void setDbCreateUser(java.lang.String dbCreateUser)
dbCreateUser
- the user to setpublic void setDbDriver(java.lang.String driver)
driver
- name of the opencms driverpublic boolean setDbParamaters(javax.servlet.http.HttpServletRequest request, java.lang.String provider)
request
- the http requestprovider
- the db providerpublic boolean setDbParamaters(java.util.Map<java.lang.String,java.lang.String[]> request, java.lang.String provider, java.lang.String contextPath, javax.servlet.http.HttpSession session)
request
- the http requestprovider
- the db providercontextPath
- the context path to usesession
- the session to use or null
if running outside a servlet containerpublic void setDbProperty(java.lang.String key, java.lang.String value)
key
- The key of the propertyvalue
- The value of the propertypublic void setDbWorkConStr(java.lang.String dbWorkConStr)
dbWorkConStr
- the connection string used by the OpenCms corepublic void setDbWorkPwd(java.lang.String dbWorkPwd)
dbWorkPwd
- the password for the OpenCms database userpublic void setDbWorkUser(java.lang.String dbWorkUser)
dbWorkUser
- the database user used by the opencms corepublic void setDriverType(java.lang.String type)
type
- the type to setpublic void setEthernetAddress(java.lang.String ethernetAddress)
ethernetAddress
- the mac addess to setpublic void setFullDatabaseKey(java.lang.String fullDatabaseKey)
fullDatabaseKey
- the fullDatabaseKey to setpublic void setInstallModules(java.lang.String value)
value
- a string with the package names of the modules to be installed delimited by the pipe symbol "|"public void setReplacer(java.util.Map<java.lang.String,java.lang.String> map)
map
- the replacer to setpublic void setServerName(java.lang.String name)
name
- the OpenCms server namepublic void setWorkplaceSite(java.lang.String newSite)
newSite
- the OpenCms workplace sitepublic void shellExit()
I_CmsShellCommands
Please 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_CmsShellCommands
I_CmsShellCommands.shellExit()
public void shellStart()
I_CmsShellCommands
Please 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_CmsShellCommands
I_CmsShellCommands.shellStart()
public java.util.List<java.lang.String> sortModules(java.util.Collection<CmsModule> modules)
modules
- the list of CmsModule
objectspublic boolean validateJdbc()
true
if at least one of the recommended drivers is foundprotected void addComponentsFromPath(java.lang.String fileName) throws CmsConfigurationException
fileName
- the location to read the components fromCmsConfigurationException
- if something goes wrongprotected java.lang.String getComponentModules(java.util.List<java.lang.String> componentIds)
componentIds
- the list of component IDs to get the modules forprotected CmsParameterConfiguration getComponentsProperties(java.lang.String location) throws java.io.FileNotFoundException, CmsConfigurationException
location
- the location to read the properties fromjava.io.FileNotFoundException
- if the properties file could not be foundCmsConfigurationException
- if the something else goes wrongprotected java.lang.String getExtProperty(java.lang.String key)
key
- the property keyprotected java.lang.String htmlComponent(CmsSetupComponent component)
component
- the component to generate the code forprotected java.lang.String htmlModule(CmsModule module, int pos)
module
- the module to generate the code forpos
- the position in the listprotected void importModuleFromDefault(java.lang.String importFile) throws java.lang.Exception
importFile
- the name of the import module located in the default module directoryjava.lang.Exception
- if something goes wrongCmsImportExportManager.importData(CmsObject, org.opencms.report.I_CmsReport, CmsImportParameters)
protected void initializeComponents(java.util.Collection<java.lang.String> modules)
modules
- a modifiable list of the modules to be importedprotected boolean isImportRunning()
true
if the import thread is currently running.true
if the import thread is currently runningprotected void readDatabaseConfig()
protected void setExtProperty(java.lang.String key, java.lang.String value)
key
- The key of the propertyvalue
- The value of the property