@ThreadSafe public class TestBootstrapManager extends Object implements BootstrapManager
INSTANCE_FINGERPRINT_PARAM, SERVER_FINGERPRINT_PARAM
Constructor and Description |
---|
TestBootstrapManager() |
Modifier and Type | Method and Description |
---|---|
void |
bootstrapDatabase(com.atlassian.config.db.DatabaseDetails dbDetails,
boolean embedded) |
void |
bootstrapDatasource(String datasourceName,
String hibernateDialect) |
boolean |
databaseContainsExistingData(Connection connection) |
com.atlassian.config.ApplicationConfiguration |
getApplicationConfig() |
String |
getApplicationHome() |
String |
getArtifactsDirectory()
This method returns the root directory underneath which the artifacts are stored.
|
String |
getBootstrapFailureReason() |
URI |
getBrokerClientURI() |
URI |
getBrokerURI() |
String |
getBuildDirectory()
Gets the directory where Bamboo's build files sit.
|
String |
getBuildNumber() |
String |
getBuildWorkingDirectory()
This method returns the root directory underneath which the build directories are located.
|
String |
getConfigDirectory()
Gets the directory where Bamboo's administration.xml file sits
|
String |
getConfiguredApplicationHome() |
String |
getFilePathProperty(String key) |
ServerFingerprint |
getFingerprint()
Provides a unique identifier for this startup
|
com.atlassian.config.db.HibernateConfig |
getHibernateConfig() |
com.atlassian.config.db.HibernateConfigurator |
getHibernateConfigurator() |
Properties |
getHibernateProperties() |
File |
getIndexDirectory()
Returns the index directory as stored in the cfg.xml file with the bambooHome preopty replaced
|
String |
getOperation() |
Map |
getPropertiesWithPrefix(String prefix) |
Object |
getProperty(String key) |
Collection |
getPropertyKeys() |
String |
getServerID() |
int |
getServerKey()
Returns server key used for
BambooEntityOid s of this Bamboo instance. |
com.atlassian.config.setup.SetupPersister |
getSetupPersister() |
String |
getString(String key) |
Connection |
getTestDatabaseConnection(com.atlassian.config.db.DatabaseDetails databaseDetails) |
Connection |
getTestDatasourceConnection(String datasourceName) |
void |
init() |
boolean |
initializeServerKey()
Initializes server key used for
BambooEntityOid s of this Bamboo instance based on server ID . |
boolean |
isApplicationHomeValid() |
boolean |
isBootstrapped() |
boolean |
isPropertyTrue(String prop) |
boolean |
isSetupComplete() |
void |
publishConfiguration() |
void |
removeDelegate() |
void |
removeProperty(String key) |
void |
save() |
void |
setApplicationConfig(com.atlassian.config.ApplicationConfiguration applicationConfig) |
void |
setApplicationHome(String applicationHome)
Make sure you use either this method or
setApplicationConfig(ApplicationConfiguration) not both |
void |
setArtifactsDirectory(String artifactsDir) |
void |
setBrokerClientURI(URI brokerURI) |
void |
setBrokerURI(URI brokerUrl) |
void |
setBuildDirectory(String buildDirectory) |
void |
setBuildNumber(String buildNumber) |
void |
setBuildWorkingDirectory(String buildWorkingDirectory) |
void |
setConfigDirectory(String configurationDirectory) |
void |
setDelegate(BootstrapManager bootstrapManager) |
void |
setHibernateConfigurator(com.atlassian.config.db.HibernateConfigurator hibernateConfigurator) |
void |
setOperation(String operation) |
void |
setProperty(String key,
Object value) |
void |
setServerID(String serverId) |
void |
setServerKey(int serverKey)
Set server key used for
BambooEntityOid s for this Bamboo instance. |
void |
setSetupComplete(boolean complete) |
public void setDelegate(BootstrapManager bootstrapManager)
public void removeDelegate()
public String getConfigDirectory()
BootstrapManager
getConfigDirectory
in interface BootstrapManager
public void setConfigDirectory(String configurationDirectory)
setConfigDirectory
in interface BootstrapManager
public String getBuildDirectory()
BootstrapManager
getBuildDirectory
in interface BootstrapManager
public void setBuildDirectory(String buildDirectory)
setBuildDirectory
in interface BootstrapManager
public String getBuildWorkingDirectory()
BootstrapManager
getBuildWorkingDirectory
in interface BootstrapManager
public void setBuildWorkingDirectory(String buildWorkingDirectory)
setBuildWorkingDirectory
in interface BootstrapManager
public String getArtifactsDirectory()
BootstrapManager
getArtifactsDirectory
in interface BootstrapManager
public void setArtifactsDirectory(String artifactsDir)
setArtifactsDirectory
in interface BootstrapManager
@Nullable public File getIndexDirectory()
BootstrapManager
getIndexDirectory
in interface BootstrapManager
public String getServerID()
getServerID
in interface BootstrapManager
public void setServerID(String serverId)
setServerID
in interface BootstrapManager
public boolean initializeServerKey()
BootstrapManager
BambooEntityOid
s of this Bamboo instance based on server ID
. Does nothing if the server key is already configured.
This method should be externally synchronized.initializeServerKey
in interface BootstrapManager
public int getServerKey()
BootstrapManager
BambooEntityOid
s of this Bamboo instance.getServerKey
in interface BootstrapManager
public void setServerKey(int serverKey)
BootstrapManager
BambooEntityOid
s for this Bamboo instance.setServerKey
in interface BootstrapManager
serverKey
- server key of this instancepublic URI getBrokerURI() throws URISyntaxException
getBrokerURI
in interface BootstrapManager
URISyntaxException
public void setBrokerURI(URI brokerUrl)
setBrokerURI
in interface BootstrapManager
public URI getBrokerClientURI() throws URISyntaxException
getBrokerClientURI
in interface BootstrapManager
URISyntaxException
public void setBrokerClientURI(URI brokerURI)
setBrokerClientURI
in interface BootstrapManager
@NotNull public ServerFingerprint getFingerprint()
BootstrapManager
getFingerprint
in interface BootstrapManager
public boolean isBootstrapped()
isBootstrapped
in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
public Object getProperty(String key)
getProperty
in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
public void setProperty(String key, Object value)
setProperty
in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
public boolean isPropertyTrue(String prop)
isPropertyTrue
in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
public void removeProperty(String key)
removeProperty
in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
public String getString(String key)
getString
in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
public String getFilePathProperty(String key)
getFilePathProperty
in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
public Collection getPropertyKeys()
getPropertyKeys
in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
public Map getPropertiesWithPrefix(String prefix)
getPropertiesWithPrefix
in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
public String getBuildNumber()
getBuildNumber
in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
public void setBuildNumber(String buildNumber)
setBuildNumber
in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
public boolean isApplicationHomeValid()
isApplicationHomeValid
in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
public Properties getHibernateProperties()
getHibernateProperties
in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
public void save() throws com.atlassian.config.ConfigurationException
save
in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
com.atlassian.config.ConfigurationException
public boolean isSetupComplete()
isSetupComplete
in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
public String getOperation()
getOperation
in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
public void setOperation(String operation)
setOperation
in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
public void setSetupComplete(boolean complete)
setSetupComplete
in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
public void bootstrapDatasource(String datasourceName, String hibernateDialect) throws com.atlassian.config.bootstrap.BootstrapException
bootstrapDatasource
in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
com.atlassian.config.bootstrap.BootstrapException
public com.atlassian.config.setup.SetupPersister getSetupPersister()
getSetupPersister
in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
public com.atlassian.config.ApplicationConfiguration getApplicationConfig()
getApplicationConfig
in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
public void setApplicationConfig(com.atlassian.config.ApplicationConfiguration applicationConfig)
public String getApplicationHome()
getApplicationHome
in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
public void setApplicationHome(String applicationHome) throws com.atlassian.config.ConfigurationException
setApplicationConfig(ApplicationConfiguration)
not bothcom.atlassian.config.ConfigurationException
public String getConfiguredApplicationHome()
getConfiguredApplicationHome
in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
public String getBootstrapFailureReason()
getBootstrapFailureReason
in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
public void init() throws com.atlassian.config.bootstrap.BootstrapException
init
in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
com.atlassian.config.bootstrap.BootstrapException
public void publishConfiguration()
publishConfiguration
in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
public void bootstrapDatabase(com.atlassian.config.db.DatabaseDetails dbDetails, boolean embedded) throws com.atlassian.config.bootstrap.BootstrapException
bootstrapDatabase
in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
com.atlassian.config.bootstrap.BootstrapException
public com.atlassian.config.db.HibernateConfigurator getHibernateConfigurator()
getHibernateConfigurator
in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
public void setHibernateConfigurator(com.atlassian.config.db.HibernateConfigurator hibernateConfigurator)
setHibernateConfigurator
in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
public com.atlassian.config.db.HibernateConfig getHibernateConfig()
getHibernateConfig
in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
public Connection getTestDatasourceConnection(String datasourceName) throws com.atlassian.config.bootstrap.BootstrapException
getTestDatasourceConnection
in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
com.atlassian.config.bootstrap.BootstrapException
public boolean databaseContainsExistingData(Connection connection)
databaseContainsExistingData
in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
public Connection getTestDatabaseConnection(com.atlassian.config.db.DatabaseDetails databaseDetails) throws com.atlassian.config.bootstrap.BootstrapException
getTestDatabaseConnection
in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
com.atlassian.config.bootstrap.BootstrapException
Copyright © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.