Package com.atlassian.confluence.setup
Class DefaultBootstrapManager
java.lang.Object
com.atlassian.config.internal.bootstrap.DefaultAtlassianBootstrapManager
com.atlassian.confluence.setup.DefaultBootstrapManager
- All Implemented Interfaces:
- com.atlassian.config.bootstrap.AtlassianBootstrapManager,- BootstrapManager,- BootstrapManagerInternal,- ConfluenceBootstrapConstants,- EventListener,- org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>
public class DefaultBootstrapManager
extends com.atlassian.config.internal.bootstrap.DefaultAtlassianBootstrapManager
implements BootstrapManagerInternal, org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>
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 SummaryFieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringDeprecated.static final StringSince 6.12 this field defines a bandana property, and not a field in the config filestatic final Stringstatic final StringFields inherited from class com.atlassian.config.internal.bootstrap.DefaultAtlassianBootstrapManagerapplicationConfig, bootstrapFailureReason, bootstrapped, hibernateConfig, hibernateConfigurator, homeLocator, setupPersisterFields inherited from interface com.atlassian.confluence.setup.BootstrapManagerJWT_KEY_LENGTH, JWT_PRIVATE_KEY, JWT_PUBLIC_KEY, SYNCHRONY_SERVICE_AUTHTOKENFields 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 SummaryConstructorsConstructorDescriptionDefaultBootstrapManager(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, com.atlassian.security.serialfilter.DeserializationFilterConfigurator deserializationFilterConfigurator) 
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidReturns the configured local home or null if not configured.Deprecated.Optional<com.atlassian.config.db.DatabaseDetails> getDatabaseDetail(String database) Get Db configuration from config file if we are using db.first setup typeReturns the name of the JNDI-based DataSource, if any.protected StringgetDbUrl(com.atlassian.config.db.DatabaseDetails dbDetails) "${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.Returns the SQL dialect being used by Hibernate.Confluence local home directory.Confluence shared home directory.getTestDatabaseConnection(com.atlassian.config.db.DatabaseDetails databaseDetails) voidinit()booleanvoidonApplicationEvent(org.springframework.context.ApplicationEvent event) booleanPerform upgrade of DB configurationprotected voidvoidDeprecated.since 5.9Methods inherited from class com.atlassian.config.internal.bootstrap.DefaultAtlassianBootstrapManagerbootstrapDatabase, bootstrapDatasource, databaseContainsExistingData, finishBootstrapInitialisation, getApplicationConfig, getBootstrapFailureReason, getBuildNumber, getConfiguredApplicationHome, getHibernateConfig, getHibernateConfigurator, getHomeLocator, getOperation, getPropertiesWithPrefix, getProperty, getPropertyKeys, getSetupPersister, getTables, getTestDatasourceConnection, isApplicationHomeValid, isBootstrapped, isPropertyTrue, isSetupComplete, removeProperty, save, setApplicationConfig, setBuildNumber, setHibernateConfig, setHibernateConfigurator, setHomeLocator, setOperation, setProperty, setSetupComplete, setSetupPersister, setTablesMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.context.ApplicationListenersupportsAsyncExecutionMethods inherited from interface com.atlassian.config.bootstrap.AtlassianBootstrapManagerbootstrapDatabase, bootstrapDatasource, databaseContainsExistingData, getApplicationConfig, getBootstrapFailureReason, getBuildNumber, getHibernateConfig, getHibernateConfigurator, getOperation, getPropertiesWithPrefix, getProperty, getPropertyKeys, getSetupPersister, getTestDatasourceConnection, isApplicationHomeValid, isBootstrapped, isPropertyTrue, isSetupComplete, removeProperty, save, setBuildNumber, setHibernateConfigurator, setOperation, setProperty, setSetupCompleteMethods inherited from interface com.atlassian.confluence.setup.BootstrapManagergetConfiguredApplicationHome
- 
Field Details- 
CONFIG_DIR_NAME- See Also:
 
- 
LOCK_FILE_NAME- See Also:
 
- 
SYNCHRONY_BTFDeprecated.This field no longer used- Since:
- 6.12
- See Also:
 
- 
SYNCHRONY_PROXY_ENABLED- See Also:
 
- 
SYNCHRONY_ENCRYPTION_DISABLED- See Also:
 
- 
SYNCHRONY_BTF_OFFSince 6.12 this field defines a bandana property, and not a field in the config file- See Also:
 
- 
CONFLUENCE_DATABASE_CHOICE- See Also:
 
- 
JTDS_PROTOCOL- See Also:
 
 
- 
- 
Constructor Details- 
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, com.atlassian.security.serialfilter.DeserializationFilterConfigurator deserializationFilterConfigurator) 
 
- 
- 
Method Details- 
initpublic void init() throws com.atlassian.config.bootstrap.BootstrapException- Specified by:
- initin interface- com.atlassian.config.bootstrap.AtlassianBootstrapManager
- Overrides:
- initin class- com.atlassian.config.internal.bootstrap.DefaultAtlassianBootstrapManager
- Throws:
- com.atlassian.config.bootstrap.BootstrapException
 
- 
publishConfigurationDeprecated.since 5.9- Specified by:
- publishConfigurationin interface- com.atlassian.config.bootstrap.AtlassianBootstrapManager
- Overrides:
- publishConfigurationin class- com.atlassian.config.internal.bootstrap.DefaultAtlassianBootstrapManager
 
- 
getDatabaseDetailDescription 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
 
- 
getString- Specified by:
- getStringin interface- com.atlassian.config.bootstrap.AtlassianBootstrapManager
- Overrides:
- getStringin class- com.atlassian.config.internal.bootstrap.DefaultAtlassianBootstrapManager
 
- 
getFilePathProperty"${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.internal.bootstrap.DefaultAtlassianBootstrapManager
- Parameters:
- key- the property key whose value you want to perform replacement upon.
 
- 
getDbUrl- Overrides:
- getDbUrlin class- com.atlassian.config.internal.bootstrap.DefaultAtlassianBootstrapManager
 
- 
getConfluenceHomeDeprecated.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
 
- 
getApplicationHome- Specified by:
- getApplicationHomein interface- com.atlassian.config.bootstrap.AtlassianBootstrapManager
- Specified by:
- getApplicationHomein interface- BootstrapManager
- Overrides:
- getApplicationHomein class- com.atlassian.config.internal.bootstrap.DefaultAtlassianBootstrapManager
 
- 
getLocalHomeDescription 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.
 
- 
getConfiguredLocalHomeDescription 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
 
- 
performPersistenceUpgradepublic boolean performPersistenceUpgrade()Description copied from interface:BootstrapManagerInternalPerform upgrade of DB configuration- Specified by:
- performPersistenceUpgradein interface- BootstrapManagerInternal
- Overrides:
- performPersistenceUpgradein class- com.atlassian.config.internal.bootstrap.DefaultAtlassianBootstrapManager
- Returns:
- true if successful, false if failed
 
- 
getHibernateProperties- Specified by:
- getHibernatePropertiesin interface- com.atlassian.config.bootstrap.AtlassianBootstrapManager
- Overrides:
- getHibernatePropertiesin class- com.atlassian.config.internal.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.internal.bootstrap.DefaultAtlassianBootstrapManager
- Throws:
- com.atlassian.config.bootstrap.BootstrapException
 
- 
getDataSourceNameDescription 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
 
- 
getHibernateDialectDescription copied from interface:BootstrapManagerReturns the SQL dialect being used by Hibernate.- Specified by:
- getHibernateDialectin interface- BootstrapManager
- Returns:
- see above
- See Also:
 
- 
onApplicationEventpublic void onApplicationEvent(org.springframework.context.ApplicationEvent event) - Specified by:
- onApplicationEventin interface- org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>
 
- 
afterConfigurationLoadedprotected void afterConfigurationLoaded() throws com.atlassian.config.ConfigurationException- Overrides:
- afterConfigurationLoadedin class- com.atlassian.config.internal.bootstrap.DefaultAtlassianBootstrapManager
- Throws:
- com.atlassian.config.ConfigurationException
 
- 
postBootstrapDatabaseprotected void postBootstrapDatabase() throws com.atlassian.config.bootstrap.BootstrapException- Overrides:
- postBootstrapDatabasein class- com.atlassian.config.internal.bootstrap.DefaultAtlassianBootstrapManager
- Throws:
- com.atlassian.config.bootstrap.BootstrapException
 
- 
getWebAppContextPath- Specified by:
- getWebAppContextPathin interface- BootstrapManager
 
- 
isWebAppContextPathSetpublic boolean isWebAppContextPathSet()- Specified by:
- isWebAppContextPathSetin interface- BootstrapManager
 
 
-