public class MockBootstrapManager extends Object implements BootstrapManager
INSTANCE_FINGERPRINT_PARAM, SERVER_FINGERPRINT_PARAM
Constructor and Description |
---|
MockBootstrapManager(URI brokerUri) |
Modifier and Type | Method and Description |
---|---|
void |
bootstrapDatabase(com.atlassian.config.db.DatabaseDetails databaseDetails,
boolean b) |
void |
bootstrapDatasource(String s,
String s1) |
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 s) |
ServerFingerprint |
getFingerprint() |
String |
getH2VersionFromConfig() |
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 property replaced
|
String |
getOperation() |
Map |
getPropertiesWithPrefix(String s) |
Object |
getProperty(String s) |
Collection |
getPropertyKeys() |
String |
getRepositoryLogsDirectory() |
String |
getServerID() |
int |
getServerKey()
Returns server key used for
BambooEntityOid s of this Bamboo instance. |
com.atlassian.config.setup.SetupPersister |
getSetupPersister() |
String |
getString(String s) |
Connection |
getTestDatabaseConnection(com.atlassian.config.db.DatabaseDetails databaseDetails) |
Connection |
getTestDatasourceConnection(String s) |
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 s) |
boolean |
isSetupComplete() |
void |
publishConfiguration() |
void |
removeProperty(String s) |
boolean |
resetH2Version() |
void |
save() |
void |
setArtifactsDirectory(String artifactsDir) |
void |
setBrokerClientURI(URI brokerURI) |
void |
setBrokerURI(URI brokerUri) |
void |
setBuildDirectory(String buildDirectory) |
void |
setBuildNumber(String s) |
void |
setBuildWorkingDirectory(String buildWorkingDirectory) |
void |
setConfigDirectory(String configurationDirectory) |
void |
setHibernateConfigurator(com.atlassian.config.db.HibernateConfigurator hibernateConfigurator) |
void |
setOperation(String s) |
void |
setProperty(String s,
Object o) |
void |
setRepositoryLogsDirectory(String repositoryLogsDirectory) |
void |
setServerID(String serverId) |
void |
setServerKey(int serverKey)
Set server key used for
BambooEntityOid s for this Bamboo instance. |
void |
setSetupComplete(boolean b) |
public MockBootstrapManager(URI brokerUri)
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
@NotNull public String getRepositoryLogsDirectory()
getRepositoryLogsDirectory
in interface BootstrapManager
public void setRepositoryLogsDirectory(String repositoryLogsDirectory)
setRepositoryLogsDirectory
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 brokerUri)
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()
getFingerprint
in interface BootstrapManager
public boolean isBootstrapped()
isBootstrapped
in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
public Object getProperty(String s)
getProperty
in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
public void setProperty(String s, Object o)
setProperty
in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
public boolean isPropertyTrue(String s)
isPropertyTrue
in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
public void removeProperty(String s)
removeProperty
in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
public String getString(String s)
getString
in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
public String getFilePathProperty(String s)
getFilePathProperty
in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
public Collection getPropertyKeys()
getPropertyKeys
in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
public Map getPropertiesWithPrefix(String s)
getPropertiesWithPrefix
in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
public String getBuildNumber()
getBuildNumber
in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
public void setBuildNumber(String s)
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 s)
setOperation
in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
public void setSetupComplete(boolean b)
setSetupComplete
in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
public void bootstrapDatasource(String s, String s1) 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 String getApplicationHome()
getApplicationHome
in interface com.atlassian.config.bootstrap.AtlassianBootstrapManager
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 databaseDetails, boolean b) 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 s) 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
public String getH2VersionFromConfig()
getH2VersionFromConfig
in interface BootstrapManager
public boolean resetH2Version()
resetH2Version
in interface BootstrapManager
Copyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.