Class CmsAutoSetupProperties

java.lang.Object
org.opencms.setup.CmsAutoSetupProperties

public final class CmsAutoSetupProperties extends Object
Reads and manages the configuration file for the OpenCms auto-setup.

Note that each property set in the file is overwritten if the identical property is set as Java system property (what is used, e.g., by the setup wizard). Moreover, the property setup.install.components can be set via an accordingly named environment variable.

Since:
6.0.0
  • Field Details

    • LOG

      public static final org.apache.commons.logging.Log LOG
      The log object for this class.
    • PROP_DB_CONNECTION_STRING_PARAMS

      The DB connection string parameters property name.
      See Also:
    • PROP_DB_CONNECTION_URL

      public static final String PROP_DB_CONNECTION_URL
      The property key db.connection.url for providing the JDBC connection string, e.g., jdbc:mysql://localhost:3306/ for the default MySQL installation.
      See Also:
    • PROP_DB_CREATE_DB

      public static final String PROP_DB_CREATE_DB
      The property key db.create.db for specifying if the database should be created during the setup.

      Set to true to create the database automatically, or false if it should not.

      NOTE: Automatic database creation is not supported for all DBMSs.

      See Also:
    • PROP_DB_CREATE_PWD

      public static final String PROP_DB_CREATE_PWD
      The property key db.create.pwd for specifying the password for the database user that is used during the setup connection.
      See Also:
    • PROP_DB_CREATE_TABLES

      public static final String PROP_DB_CREATE_TABLES
      The property key db.create.tables for specifying if the database tables in the OpenCms database should be created.

      Set to true to create the database automatically, or false if it should not.

      See Also:
    • PROP_DB_CREATE_USER

      public static final String PROP_DB_CREATE_USER
      The property key db.create.user for specifying the name of the database user that is used during the setup connection. NOTE: The user must have administration permissions. The user data is deleted, when the setup is finished.
      See Also:
    • PROP_DB_DEFAULT_TABLESPACE

      public static final String PROP_DB_DEFAULT_TABLESPACE
      The property key db.default.tablespace necessary dependent on the chosen DBMS.
      See Also:
    • PROP_DB_DROP_DB

      public static final String PROP_DB_DROP_DB
      The property key db.dropDb for specifying if an existing database should be dropped when the setup is configured to create a database with the same name. Set to true if existing databases should be dropped when necessary, or to false if not.
      See Also:
    • PROP_DB_INDEX_TABLESPACE

      public static final String PROP_DB_INDEX_TABLESPACE
      The property key db.index.tablespace necessary dependent on the chosen DBMS.
      See Also:
    • PROP_DB_JDBC_DRIVER

      public static final String PROP_DB_JDBC_DRIVER
      The property key db.jdbc.driver for specifying the fully qualified name of the Java class implementing the JDBC driver to use for the connection.

      Hint: The names can be found in the database.properties file in the webapp' folders setup/database/<db.product>/.

      See Also:
    • PROP_DB_NAME

      public static final String PROP_DB_NAME
      The property key db.name for specifying the name of the database used by OpenCms, e.g. choose "opencms".
      See Also:
    • PROP_DB_PRODUCT

      public static final String PROP_DB_PRODUCT
      The property key db.product for specifying the used DBMS. Values should match the folders under the OpenCms webapp's folder setup/database/.
      See Also:
    • PROP_DB_PROVIDER

      public static final String PROP_DB_PROVIDER
      The property key db.provider for specifying the database provider.

      Hint: The available providers are defined as constants in CmsSetupBean.

      See Also:
    • PROP_DB_TEMPLATE_DB

      public static final String PROP_DB_TEMPLATE_DB
      The property key db.template.db necessary dependent of the chosen DBMS.
      See Also:
    • PROP_DB_TEMPORARY_TABLESPACE

      public static final String PROP_DB_TEMPORARY_TABLESPACE
      The property key db.temporary.tablespace necessary dependent of the chosen DBMS..
      See Also:
    • PROP_DB_WORKER_PWD

      public static final String PROP_DB_WORKER_PWD
      The property key db.worker.pwd for providing the password of the database user that is used when running OpenCms after the setup. CAUTION: For security reasons, the user should not have administration permissions. The user data is stored in the opencms.properties file after the setup.
      See Also:
    • PROP_DB_WORKER_USER

      public static final String PROP_DB_WORKER_USER
      The property key db.worker.user for providing the name of the database user that is used for the connection when running OpenCms after the setup. CAUTION: For security reasons, the user should not have administration permissions. The user data is stored in the opencms.properties file after the setup. .
      See Also:
    • PROP_SERVER_ETHERNET_ADDRESS

      public static final String PROP_SERVER_ETHERNET_ADDRESS
      The property key server.ethernet.address. Specify a valid MAC-Address. It is used internally by OpenCms. (If not given, the address is generated automatically.)
      See Also:
    • PROP_SERVER_NAME

      public static final String PROP_SERVER_NAME
      The property key server.name for specifying the server's name. Special server names are of particular interest in a cluster installation.
      See Also:
    • PROP_SERVER_SERVLET_MAPPING

      public static final String PROP_SERVER_SERVLET_MAPPING
      The property key server.servlet.mapping for specifying the name of the OpenCms servlet (by default opencms).
      See Also:
    • PROP_SERVER_URL

      public static final String PROP_SERVER_URL
      The property key server.url for specifying the server's URL. It is used, e.g., for the site configuration.
      See Also:
    • PROP_SETUP_DEFAULT_WEBAPP

      public static final String PROP_SETUP_DEFAULT_WEBAPP
      The property key setup.default.webapp. Provide the default webapp in your servlet container (Default: ROOT).
      See Also:
    • PROP_SETUP_INSTALL_COMPONENTS

      The property key setup.install.components to choose the components that should be installed during the setup.

      The available components are configured in setup/components.properties in the webapp's folder.

      NOTE: You can specify the components to install also as Java system property (highest priority) or via an environment variable (second choice). The value specified in the configuration file is only the third choice.

      See Also:
    • PROP_SETUP_SHOW_PROGRESS

      public static final String PROP_SETUP_SHOW_PROGRESS
      The property key setup.show.progress to specify if dots '.' should be printed to the real STDOUT while a setup is in progress.
      See Also:
    • PROP_SETUP_WEBAPP_PATH

      public static final String PROP_SETUP_WEBAPP_PATH
      The property key setup.webapp.path to specify the path of the OpenCms webapp to install, e.g., /var/lib/tomcat7/webapps/opencms.
      See Also:
  • Constructor Details

  • Method Details

    • getConnectionUrl

      Returns the connectionUrl.

      Returns:
      the connectionUrl
    • getConStrParams

      Returns the DB connection string parameters.

      Returns:
      the DB connection string parameters
    • getCreatePwd

      public String getCreatePwd()
      Returns the createPwd.

      Returns:
      the createPwd
    • getCreateUser

      Returns the createUser.

      Returns:
      the createUser
    • getDbName

      public String getDbName()
      Returns:
      the name of the db name used
    • getDbProduct

      public String getDbProduct()
      Returns:
      the name of the db product used
    • getDbProvider

      Returns the dbProvider.

      Returns:
      the dbProvider
    • getDefaultTablespace

      Returns the defaultTablespace.

      Returns:
      the defaultTablespace
    • getEthernetAddress

      Returns the ethernetAddress.

      Returns:
      the ethernetAddress
    • getIndexTablespace

      Returns the indexTablespace.

      Returns:
      the indexTablespace
    • getInstallComponents

      Returns the installComponents.

      Returns:
      the installComponents
    • getJdbcDriver

      Returns the jdbcDriver.

      Returns:
      the jdbcDriver
    • getServeltMapping

      Returns the serveltMapping.

      Returns:
      the serveltMapping
    • getServerName

      Returns the serverName.

      Returns:
      the serverName
    • getServerUrl

      public String getServerUrl()
      Returns the serverUrl.

      Returns:
      the serverUrl
    • getSetupConfiguration

      public org.opencms.configuration.CmsParameterConfiguration getSetupConfiguration()
      Returns the setup configuration object.

      Returns:
      the setup configuration object
    • getSetupDefaultWebappName

      Returns the setupWebappName.

      Returns:
      the setupWebappName
    • getSetupWebappPath

      Returns the setupWebappPath.

      Returns:
      the setupWebappPath
    • getTemplateDb

      Returns the templateDb.

      Returns:
      the templateDb
    • getTemporaryTablespace

      Returns the temporaryTablespace.

      Returns:
      the temporaryTablespace
    • getWebappPath

      Returns the webappPath.

      Returns:
      the webappPath
    • getWorkerPwd

      public String getWorkerPwd()
      Returns the workerPwd.

      Returns:
      the workerPwd
    • getWorkerUser

      Returns the workerUser.

      Returns:
      the workerUser
    • isCreateDb

      public boolean isCreateDb()
      Returns the createDb.

      Returns:
      the createDb
    • isCreateTables

      public boolean isCreateTables()
      Returns the createTables.

      Returns:
      the createTables
    • isDropDb

      public boolean isDropDb()
      Returns the dropDb.

      Returns:
      the dropDb
    • isShowProgress

      public boolean isShowProgress()
      Indicates if dots '.' should be printed to the real STDOUT while a setup is in progress.

      Returns:
      true if dots '.' should be printed to the real STDOUT while a setup is in progress
    • toParameterMap

      Converts and returns this object as map.

      Returns:
      this object as map