com.atlassian.bamboo.setup
Class DefaultBootstrapManager

java.lang.Object
  extended by com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager
      extended by com.atlassian.bamboo.setup.DefaultBootstrapManager
All Implemented Interfaces:
BootstrapManager, com.atlassian.config.bootstrap.AtlassianBootstrapManager

public class DefaultBootstrapManager
extends com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager
implements BootstrapManager

BootstrapManager is responsible for initializing the dependencies of Bamboo environment.

  1. Initializing the Bamboo environment, beginning with loading bamboo.cfg.xml from the bamboo.home property specified in bamboo-init.properties.
  2. Delegating, monitoring, and answering all client requests concerning Bamboo initialization routines.
  3. Providing the SetupPersister with whatever resources it needs to let a user bootstrapManager Bamboo.


Field Summary
static java.lang.String BUILD_WORKING_DIR
           
 
Fields inherited from class com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager
applicationConfig, bootstrapFailureReason, bootstrapped, hibernateConfig, hibernateConfigurator, homeLocator, log, setupPersister
 
Fields inherited from interface com.atlassian.bamboo.setup.BootstrapManager
FINGERPRINT_PARAM
 
Constructor Summary
DefaultBootstrapManager()
           
 
Method Summary
protected  void afterConfigurationLoaded()
           
 void bootstrapDatabase(com.atlassian.config.db.DatabaseDetails databaseDetails, boolean b)
           
 void bootstrapDatasource(java.lang.String datasourceName, java.lang.String hibernateDialect)
           
 java.net.URI getBrokerClientURI()
           
 java.net.URI getBrokerURI()
           
 java.lang.String getBuildDirectory()
          Gets the directory where Bamboo's build files sit.
 java.lang.String getBuildWorkingDirectory()
           
 java.lang.String getConfigDirectory()
          Gets the directory where Bamboo's administration.xml file sits
protected  java.lang.String getDbUrl(com.atlassian.config.db.DatabaseDetails dbDetails)
           
 java.lang.String getFingerprint()
          Provides a unique identifier for this startup
 int getHeartbeatInterval()
           
 java.io.File getIndexDirectory()
          Returns the index directory as stored in the cfg.xml file with the bambooHome preopty replaced
 java.lang.String getServerID()
           
protected  boolean performPersistenceUpgrade()
           
 void setBambooLicenseManager(BambooLicenseManager bambooLicenseManager)
           
 void setBrokerClientURI(java.net.URI brokerURI)
           
 void setBrokerURI(java.net.URI brokerURI)
           
 void setBuildDirectory(java.lang.String buildDirectory)
           
 void setBuildWorkingDirectory(java.lang.String buildWorkingDirectory)
           
 void setConfigDirectory(java.lang.String configurationDirectory)
           
 void setHeartbeatInterval(java.lang.Integer heartbeartInterval)
           
 void setServerID(java.lang.String serverId)
           
 
Methods inherited from class com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager
databaseContainsExistingData, finishBootstrapInitialisation, getApplicationConfig, getApplicationHome, getBootstrapFailureReason, getBuildNumber, getConfiguredApplicationHome, getFilePathProperty, getHibernateConfig, getHibernateConfigurator, getHibernateProperties, getHomeLocator, getOperation, getPropertiesWithPrefix, getProperty, getPropertyKeys, getSetupPersister, getString, getTables, getTestDatabaseConnection, getTestDatasourceConnection, init, isApplicationHomeValid, isBootstrapped, isPropertyTrue, isSetupComplete, postBootstrapDatabase, publishConfiguration, removeProperty, save, setApplicationConfig, setBuildNumber, setHibernateConfig, setHibernateConfigurator, setHomeLocator, setOperation, setProperty, setSetupComplete, setSetupPersister, setTables
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
databaseContainsExistingData, getApplicationConfig, getApplicationHome, getBootstrapFailureReason, getBuildNumber, getConfiguredApplicationHome, getFilePathProperty, getHibernateConfig, getHibernateConfigurator, getHibernateProperties, getOperation, getPropertiesWithPrefix, getProperty, getPropertyKeys, getSetupPersister, getString, getTestDatabaseConnection, getTestDatasourceConnection, init, isApplicationHomeValid, isBootstrapped, isPropertyTrue, isSetupComplete, publishConfiguration, removeProperty, save, setBuildNumber, setHibernateConfigurator, setOperation, setProperty, setSetupComplete
 

Field Detail

BUILD_WORKING_DIR

public static final java.lang.String BUILD_WORKING_DIR
See Also:
Constant Field Values
Constructor Detail

DefaultBootstrapManager

public DefaultBootstrapManager()
Method Detail

afterConfigurationLoaded

protected void afterConfigurationLoaded()
                                 throws com.atlassian.config.ConfigurationException
Overrides:
afterConfigurationLoaded in class com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager
Throws:
com.atlassian.config.ConfigurationException

getConfigDirectory

public java.lang.String getConfigDirectory()
Description copied from interface: BootstrapManager
Gets the directory where Bamboo's administration.xml file sits

Specified by:
getConfigDirectory in interface BootstrapManager
Returns:
String representing the path to the folder. Null if not configured

setConfigDirectory

public void setConfigDirectory(java.lang.String configurationDirectory)
Specified by:
setConfigDirectory in interface BootstrapManager

getBuildWorkingDirectory

public java.lang.String getBuildWorkingDirectory()
Specified by:
getBuildWorkingDirectory in interface BootstrapManager

setBuildWorkingDirectory

public void setBuildWorkingDirectory(java.lang.String buildWorkingDirectory)
Specified by:
setBuildWorkingDirectory in interface BootstrapManager

getIndexDirectory

@Nullable
public java.io.File getIndexDirectory()
Description copied from interface: BootstrapManager
Returns the index directory as stored in the cfg.xml file with the bambooHome preopty replaced

Specified by:
getIndexDirectory in interface BootstrapManager

getBuildDirectory

public java.lang.String getBuildDirectory()
Description copied from interface: BootstrapManager
Gets the directory where Bamboo's build files sit. This includes artifacts and the like

Specified by:
getBuildDirectory in interface BootstrapManager
Returns:
String representing the path to the folder. Null if not configured

setBuildDirectory

public void setBuildDirectory(java.lang.String buildDirectory)
Specified by:
setBuildDirectory in interface BootstrapManager

getBrokerURI

public java.net.URI getBrokerURI()
                          throws java.net.URISyntaxException
Specified by:
getBrokerURI in interface BootstrapManager
Throws:
java.net.URISyntaxException

setBrokerURI

public void setBrokerURI(java.net.URI brokerURI)
Specified by:
setBrokerURI in interface BootstrapManager

getBrokerClientURI

public java.net.URI getBrokerClientURI()
                                throws java.net.URISyntaxException
Specified by:
getBrokerClientURI in interface BootstrapManager
Throws:
java.net.URISyntaxException

setBrokerClientURI

public void setBrokerClientURI(java.net.URI brokerURI)
Specified by:
setBrokerClientURI in interface BootstrapManager

performPersistenceUpgrade

protected boolean performPersistenceUpgrade()
Overrides:
performPersistenceUpgrade in class com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager

bootstrapDatabase

public void bootstrapDatabase(com.atlassian.config.db.DatabaseDetails databaseDetails,
                              boolean b)
                       throws com.atlassian.config.bootstrap.BootstrapException
Specified by:
bootstrapDatabase in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
Overrides:
bootstrapDatabase in class com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager
Throws:
com.atlassian.config.bootstrap.BootstrapException

bootstrapDatasource

public void bootstrapDatasource(java.lang.String datasourceName,
                                java.lang.String hibernateDialect)
                         throws com.atlassian.config.bootstrap.BootstrapException
Specified by:
bootstrapDatasource in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
Overrides:
bootstrapDatasource in class com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager
Throws:
com.atlassian.config.bootstrap.BootstrapException

setBambooLicenseManager

public void setBambooLicenseManager(BambooLicenseManager bambooLicenseManager)

getDbUrl

protected java.lang.String getDbUrl(com.atlassian.config.db.DatabaseDetails dbDetails)
Overrides:
getDbUrl in class com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager

getServerID

public java.lang.String getServerID()
Specified by:
getServerID in interface BootstrapManager

setServerID

public void setServerID(java.lang.String serverId)
Specified by:
setServerID in interface BootstrapManager

getHeartbeatInterval

public int getHeartbeatInterval()

setHeartbeatInterval

public void setHeartbeatInterval(java.lang.Integer heartbeartInterval)

getFingerprint

@NotNull
public java.lang.String getFingerprint()
Description copied from interface: BootstrapManager
Provides a unique identifier for this startup

Specified by:
getFingerprint in interface BootstrapManager
Returns:


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.