Package com.atlassian.confluence.setup
Class DefaultBootstrapManager
- java.lang.Object
- 
- com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager
- 
- com.atlassian.confluence.setup.DefaultBootstrapManager
 
 
- 
- All Implemented Interfaces:
- com.atlassian.config.bootstrap.AtlassianBootstrapManager,- BootstrapManager,- BootstrapManagerInternal,- ConfluenceBootstrapConstants
 
 public class DefaultBootstrapManager extends com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager implements BootstrapManagerInternal BootstrapManager is responsible for initializing the dependencies of Confluence environment.- Initializing the Confluence environment, beginning with loading confluence.cfg.xml from the confluence.home property specified in confluence-init.properties.
- Delegating, monitoring, and answering all client requests concerning Confluence initialization routines.
- Providing the SetupPersister with whatever resources it needs to let a user bootstrapManager Confluence.
 
- 
- 
Field SummaryFields Modifier and Type Field Description static StringCONFIG_DIR_NAMEstatic StringCONFLUENCE_DATABASE_CHOICEstatic StringJTDS_PROTOCOLstatic StringLOCK_FILE_NAMEstatic StringSYNCHRONY_BTFDeprecated.static StringSYNCHRONY_BTF_OFFSince 6.12 this field defines a bandana property, and not a field in the config filestatic StringSYNCHRONY_ENCRYPTION_DISABLEDstatic StringSYNCHRONY_PROXY_ENABLED- 
Fields inherited from class com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManagerapplicationConfig, bootstrapFailureReason, bootstrapped, hibernateConfig, hibernateConfigurator, homeLocator, setupPersister
 - 
Fields inherited from interface com.atlassian.confluence.setup.BootstrapManagerJWT_KEY_LENGTH, JWT_PRIVATE_KEY, JWT_PUBLIC_KEY, SYNCHRONY_SERVICE_AUTHTOKEN
 - 
Fields inherited from interface com.atlassian.confluence.setup.ConfluenceBootstrapConstantsATLASSIAN_LICENSE_KEY, ATTACHMENTS_DIR_PROP, CONFLUENCE_HOME_CONSTANT, CONFLUENCE_LOCAL_HOME_CONSTANT, DEFAULT_LICENSE_REGISTRY_KEY, GLOBAL_PLUGIN_STATE, INSTALLATION_DATE_KEY, LICENSE_HASH_KEY, LICENSE_MESSAGE_KEY, LUCENE_INDEX_DIR_PROP, TEMP_DIR_PROP, WEBAPP_CONTEXT_PATH_KEY
 
- 
 - 
Constructor SummaryConstructors Constructor Description DefaultBootstrapManager(com.atlassian.config.ApplicationConfiguration applicationConfiguration, ClusterConfigurationHelperInternal clusterConfigurationHelper, SingleConnectionProvider databaseHelper, HealthCheckRunner healthCheckRunner, com.atlassian.config.db.HibernateConfigurator hibernateConfigurator, com.atlassian.config.HomeLocator homeLocator, com.atlassian.config.setup.SetupPersister setupPersister, List<String> tables)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidafterConfigurationLoaded()voidbootstrapSharedConfiguration(SharedConfigurationMap sharedConfig)Deprecated.since 5.9voidcheckConfigurationOnStartup()voidcleanupOnShutdown()If there's any resource that needs to be cleaned up, do it here.StringgetApplicationHome()FilegetConfiguredLocalHome()Returns the configured local home or null if not configured.StringgetConfluenceHome()Deprecated.Optional<com.atlassian.config.db.DatabaseDetails>getDatabaseDetail(String database)Get Db configuration from config file if we are using db.first setup typeOptional<String>getDataSourceName()Returns the name of the JNDI-based DataSource, if any.protected StringgetDbUrl(com.atlassian.config.db.DatabaseDetails dbDetails)StringgetFilePathProperty(String key)"${confluenceHome}" is replaced on the fly with the current location of confluence.
 This effectively allows Confluence to be moved without breaking some system paths (like attachments).
 This does not handle moves to a different drive though.StringgetHibernateDialect()Returns the SQL dialect being used by Hibernate.PropertiesgetHibernateProperties()FilegetLocalHome()Confluence local home directory.FilegetSharedHome()Confluence shared home directory.ConnectiongetTestDatabaseConnection(com.atlassian.config.db.DatabaseDetails databaseDetails)StringgetWebAppContextPath()voidinit()booleanisWebAppContextPathSet()protected booleanperformPersistenceUpgrade()protected voidpostBootstrapDatabase()voidpublishConfiguration()Deprecated.since 5.9voidsetConfluenceHome(String confluenceHome)voidsetWebAppContextPath(String webAppContextPath)- 
Methods inherited from class com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManagerbootstrapDatabase, bootstrapDatasource, databaseContainsExistingData, finishBootstrapInitialisation, getApplicationConfig, getBootstrapFailureReason, getBuildNumber, getConfiguredApplicationHome, getHibernateConfig, getHibernateConfigurator, getHomeLocator, getOperation, getPropertiesWithPrefix, getProperty, getPropertyKeys, getSetupPersister, getString, getTables, getTestDatasourceConnection, isApplicationHomeValid, isBootstrapped, isPropertyTrue, isSetupComplete, removeProperty, save, setApplicationConfig, setBuildNumber, setHibernateConfig, setHibernateConfigurator, setHomeLocator, setOperation, setProperty, setSetupComplete, setSetupPersister, setTables
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface com.atlassian.config.bootstrap.AtlassianBootstrapManagerbootstrapDatabase, bootstrapDatasource, databaseContainsExistingData, getApplicationConfig, getBootstrapFailureReason, getBuildNumber, getHibernateConfig, getHibernateConfigurator, getOperation, getPropertiesWithPrefix, getProperty, getPropertyKeys, getSetupPersister, getString, getTestDatasourceConnection, isApplicationHomeValid, isBootstrapped, isPropertyTrue, isSetupComplete, removeProperty, save, setBuildNumber, setHibernateConfigurator, setOperation, setProperty, setSetupComplete
 - 
Methods inherited from interface com.atlassian.confluence.setup.BootstrapManagergetConfiguredApplicationHome
 
- 
 
- 
- 
- 
Field Detail- 
CONFIG_DIR_NAMEpublic static final String CONFIG_DIR_NAME - See Also:
- Constant Field Values
 
 - 
LOCK_FILE_NAMEpublic static final String LOCK_FILE_NAME - See Also:
- Constant Field Values
 
 - 
SYNCHRONY_BTF@Deprecated public static final String SYNCHRONY_BTF Deprecated.This field no longer used- Since:
- 6.12
- See Also:
- Constant Field Values
 
 - 
SYNCHRONY_PROXY_ENABLEDpublic static final String SYNCHRONY_PROXY_ENABLED - See Also:
- Constant Field Values
 
 - 
SYNCHRONY_ENCRYPTION_DISABLEDpublic static final String SYNCHRONY_ENCRYPTION_DISABLED - See Also:
- Constant Field Values
 
 - 
SYNCHRONY_BTF_OFFpublic static final String SYNCHRONY_BTF_OFF Since 6.12 this field defines a bandana property, and not a field in the config file- See Also:
- Constant Field Values
 
 - 
CONFLUENCE_DATABASE_CHOICEpublic static final String CONFLUENCE_DATABASE_CHOICE - See Also:
- Constant Field Values
 
 - 
JTDS_PROTOCOLpublic static final String JTDS_PROTOCOL - See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
DefaultBootstrapManagerpublic DefaultBootstrapManager(com.atlassian.config.ApplicationConfiguration applicationConfiguration, ClusterConfigurationHelperInternal clusterConfigurationHelper, SingleConnectionProvider databaseHelper, HealthCheckRunner healthCheckRunner, com.atlassian.config.db.HibernateConfigurator hibernateConfigurator, com.atlassian.config.HomeLocator homeLocator, com.atlassian.config.setup.SetupPersister setupPersister, List<String> tables)
 
- 
 - 
Method Detail- 
initpublic void init() throws com.atlassian.config.bootstrap.BootstrapException- Specified by:
- initin interface- com.atlassian.config.bootstrap.AtlassianBootstrapManager
- Overrides:
- initin class- com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager
- Throws:
- com.atlassian.config.bootstrap.BootstrapException
 
 - 
publishConfiguration@Deprecated public void publishConfiguration() Deprecated.since 5.9- Specified by:
- publishConfigurationin interface- com.atlassian.config.bootstrap.AtlassianBootstrapManager
- Overrides:
- publishConfigurationin class- com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager
 
 - 
getDatabaseDetailpublic Optional<com.atlassian.config.db.DatabaseDetails> getDatabaseDetail(String database) Description copied from interface:BootstrapManagerInternalGet Db configuration from config file if we are using db.first setup type- Specified by:
- getDatabaseDetailin interface- BootstrapManagerInternal
- Parameters:
- database- the name of database
- Returns:
- Optional Database Configuration object
 
 - 
getFilePathPropertypublic String getFilePathProperty(String key) "${confluenceHome}" is replaced on the fly with the current location of confluence.
 This effectively allows Confluence to be moved without breaking some system paths (like attachments).
 This does not handle moves to a different drive though.- Specified by:
- getFilePathPropertyin interface- com.atlassian.config.bootstrap.AtlassianBootstrapManager
- Specified by:
- getFilePathPropertyin interface- BootstrapManager
- Overrides:
- getFilePathPropertyin class- com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager
- Parameters:
- key- the property key whose value you want to perform replacement upon.
 
 - 
getDbUrlprotected String getDbUrl(com.atlassian.config.db.DatabaseDetails dbDetails) - Overrides:
- getDbUrlin class- com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager
 
 - 
getConfluenceHome@Deprecated public String getConfluenceHome() Deprecated.Description copied from interface:BootstrapManagerReturns local home in standalone installation and shared home in clustered installation.- Specified by:
- getConfluenceHomein interface- BootstrapManager
- Returns:
- local home in standalone installation and shared home in clustered installation
 
 - 
getApplicationHomepublic String getApplicationHome() - Specified by:
- getApplicationHomein interface- com.atlassian.config.bootstrap.AtlassianBootstrapManager
- Specified by:
- getApplicationHomein interface- BootstrapManager
- Overrides:
- getApplicationHomein class- com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager
 
 - 
getSharedHomepublic File getSharedHome() Description copied from interface:BootstrapManagerConfluence shared home directory.This directory is shared between all nodes in a cluster. In non-clustered installations without a shared directory, directory called "shared-home" inside local home directory is returned instead. This directory should be used for data that can be safely shared across a cluster. Any users of this directory should take into account locking to prevent concurrency errors. - Specified by:
- getSharedHomein interface- BootstrapManager
- Returns:
- shared home directory
 
 - 
getLocalHomepublic File getLocalHome() Description copied from interface:BootstrapManagerConfluence local home directory.This directory is only visible to the local node in a cluster. This directory should be used for data that must be node specific and cannot be shared between cluster nodes. - Specified by:
- getLocalHomein interface- BootstrapManager
- Returns:
- String representing the path to Confluence's home directory on disk.
 
 - 
setConfluenceHomepublic void setConfluenceHome(String confluenceHome) throws com.atlassian.config.ConfigurationException - Specified by:
- setConfluenceHomein interface- BootstrapManager
- Throws:
- com.atlassian.config.ConfigurationException
 
 - 
bootstrapSharedConfiguration@Deprecated public void bootstrapSharedConfiguration(SharedConfigurationMap sharedConfig) Deprecated.since 5.9Starts Confluence with a database configuration that has been retrieved from another cluster node.- Specified by:
- bootstrapSharedConfigurationin interface- BootstrapManager
 
 - 
getConfiguredLocalHomepublic File getConfiguredLocalHome() Description copied from interface:BootstrapManagerReturns the configured local home or null if not configured.Only bootstrap code should need this method. Most code should use BootstrapManager.getLocalHome()instead.- Specified by:
- getConfiguredLocalHomein interface- BootstrapManager
- Returns:
- configured local home
 
 - 
performPersistenceUpgradeprotected boolean performPersistenceUpgrade() - Overrides:
- performPersistenceUpgradein class- com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager
 
 - 
getHibernatePropertiespublic Properties getHibernateProperties() - Specified by:
- getHibernatePropertiesin interface- com.atlassian.config.bootstrap.AtlassianBootstrapManager
- Overrides:
- getHibernatePropertiesin class- com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager
 
 - 
getTestDatabaseConnectionpublic Connection getTestDatabaseConnection(com.atlassian.config.db.DatabaseDetails databaseDetails) throws com.atlassian.config.bootstrap.BootstrapException - Specified by:
- getTestDatabaseConnectionin interface- com.atlassian.config.bootstrap.AtlassianBootstrapManager
- Overrides:
- getTestDatabaseConnectionin class- com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager
- Throws:
- com.atlassian.config.bootstrap.BootstrapException
 
 - 
checkConfigurationOnStartuppublic void checkConfigurationOnStartup() throws com.atlassian.config.bootstrap.BootstrapException- Specified by:
- checkConfigurationOnStartupin interface- BootstrapManager
- Throws:
- com.atlassian.config.bootstrap.BootstrapException
 
 - 
cleanupOnShutdownpublic void cleanupOnShutdown() Description copied from interface:BootstrapManagerIf there's any resource that needs to be cleaned up, do it here.- Specified by:
- cleanupOnShutdownin interface- BootstrapManager
 
 - 
getDataSourceNamepublic Optional<String> getDataSourceName() Description copied from interface:BootstrapManagerReturns the name of the JNDI-based DataSource, if any.- Specified by:
- getDataSourceNamein interface- BootstrapManager
- Returns:
- empty if Confluence is using a direct JDBC connection
 
 - 
getHibernateDialectpublic String getHibernateDialect() Description copied from interface:BootstrapManagerReturns the SQL dialect being used by Hibernate.- Specified by:
- getHibernateDialectin interface- BootstrapManager
- Returns:
- see above
- See Also:
- AvailableSettings.DIALECT
 
 - 
afterConfigurationLoadedprotected void afterConfigurationLoaded() throws com.atlassian.config.ConfigurationException- Overrides:
- afterConfigurationLoadedin class- com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager
- Throws:
- com.atlassian.config.ConfigurationException
 
 - 
postBootstrapDatabaseprotected void postBootstrapDatabase() throws com.atlassian.config.bootstrap.BootstrapException- Overrides:
- postBootstrapDatabasein class- com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager
- Throws:
- com.atlassian.config.bootstrap.BootstrapException
 
 - 
getWebAppContextPathpublic String getWebAppContextPath() - Specified by:
- getWebAppContextPathin interface- BootstrapManager
 
 - 
setWebAppContextPathpublic void setWebAppContextPath(String webAppContextPath) - Specified by:
- setWebAppContextPathin interface- BootstrapManager
 
 - 
isWebAppContextPathSetpublic boolean isWebAppContextPathSet() - Specified by:
- isWebAppContextPathSetin interface- BootstrapManager
 
 
- 
 
-