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 ARTIFACTS_DIR
           
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.lang.String getArtifactsDirectory()
          This method returns the root directory underneath which the artifacts are stored.
 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()
          This method returns the root directory underneath which the build directories are located.
 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 setArtifactsDirectory(java.lang.String artifactsDir)
           
 void setBootstrapUpgradeManager(BootstrapUpgradeManager bootstrapUpgradeManager)
           
 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

ARTIFACTS_DIR

public static final java.lang.String ARTIFACTS_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()
Description copied from interface: BootstrapManager
This method returns the root directory underneath which the build directories are located. The structure below this directory is not documented - you most likely do not want to use this method, consider using DefaultBuildDirectoryManager methods instead.

Specified by:
getBuildWorkingDirectory in interface BootstrapManager

setBuildWorkingDirectory

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

setArtifactsDirectory

public void setArtifactsDirectory(java.lang.String artifactsDir)
Specified by:
setArtifactsDirectory in interface BootstrapManager

getArtifactsDirectory

public java.lang.String getArtifactsDirectory()
Description copied from interface: BootstrapManager
This method returns the root directory underneath which the artifacts are stored. The structure below this directory is not documented - you most likely do not want to use this method, consider using SystemDirectory methods instead.

Specified by:
getArtifactsDirectory 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

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:

setBootstrapUpgradeManager

public void setBootstrapUpgradeManager(BootstrapUpgradeManager bootstrapUpgradeManager)


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.