Class MockBootstrapManager
java.lang.Object
it.com.atlassian.bamboo.agent.elastic.mocks.MockBootstrapManager
- All Implemented Interfaces:
BootstrapManager
,com.atlassian.config.bootstrap.AtlassianBootstrapManager
Created by rstephens on 21/04/15.
-
Field Summary
Fields inherited from interface com.atlassian.bamboo.setup.BootstrapManager
INSTANCE_FINGERPRINT_PARAM, SERVER_FINGERPRINT_PARAM
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
bootstrapDatabase
(com.atlassian.config.db.DatabaseDetails databaseDetails, boolean b) void
bootstrapDatasource
(String s, String s1) boolean
databaseContainsExistingData
(Connection connection) com.atlassian.config.ApplicationConfiguration
This method returns the root directory underneath which the artifacts are stored.Shared home properties (bamboo-shared.cfg.xml)Gets the directory where Bamboo's build files sit.This method returns the root directory underneath which the build directories are located.Gets the directory where Bamboo's administration.xml file sits@NotNull ServerFingerprint
com.atlassian.config.db.HibernateConfig
com.atlassian.config.db.HibernateConfigurator
Local home directory;@NotNull String
int
Returns server key used forBambooEntityOid
s of this Bamboo instance.com.atlassian.config.setup.SetupPersister
Shared home directory;getTestDatabaseConnection
(com.atlassian.config.db.DatabaseDetails databaseDetails) void
init()
boolean
boolean
Initializes server key used forBambooEntityOid
s of this Bamboo instance based onserver ID
.boolean
boolean
boolean
boolean
void
void
boolean
void
save()
void
setArtifactsDirectory
(String artifactsDir) void
setBrokerClientURI
(URI brokerURI) void
setBrokerURI
(URI brokerUri) void
setBuildDirectory
(String buildDirectory) void
void
setBuildWorkingDirectory
(String buildWorkingDirectory) void
setConfigDirectory
(String configurationDirectory) void
setH2Version
(String h2Version) void
setHibernateConfigurator
(com.atlassian.config.db.HibernateConfigurator hibernateConfigurator) void
void
setProperty
(String s, Object o) void
setRepositoryLogsDirectory
(String repositoryLogsDirectory) void
setServerID
(String serverId) void
setServerKey
(int serverKey) Set server key used forBambooEntityOid
s for this Bamboo instance.void
setSetupComplete
(boolean b) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.atlassian.bamboo.setup.BootstrapManager
getIndexDirectory
-
Constructor Details
-
MockBootstrapManager
-
-
Method Details
-
getConfigDirectory
Description copied from interface:BootstrapManager
Gets the directory where Bamboo's administration.xml file sits- Specified by:
getConfigDirectory
in interfaceBootstrapManager
- Returns:
- String representing the path to the folder. Null if not configured
-
setConfigDirectory
- Specified by:
setConfigDirectory
in interfaceBootstrapManager
-
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 interfaceBootstrapManager
- Returns:
- String representing the path to the folder. Null if not configured
-
setBuildDirectory
- Specified by:
setBuildDirectory
in interfaceBootstrapManager
-
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 interfaceBootstrapManager
-
setBuildWorkingDirectory
- Specified by:
setBuildWorkingDirectory
in interfaceBootstrapManager
-
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 com.atlassian.bamboo.fileserver.SystemDirectory methods instead.- Specified by:
getArtifactsDirectory
in interfaceBootstrapManager
-
setArtifactsDirectory
- Specified by:
setArtifactsDirectory
in interfaceBootstrapManager
-
getRepositoryLogsDirectory
- Specified by:
getRepositoryLogsDirectory
in interfaceBootstrapManager
- Returns:
- the root directory underneath which the repositories logs directories are located.
-
setRepositoryLogsDirectory
- Specified by:
setRepositoryLogsDirectory
in interfaceBootstrapManager
-
getServerID
- Specified by:
getServerID
in interfaceBootstrapManager
-
setServerID
- Specified by:
setServerID
in interfaceBootstrapManager
-
initializeServerKey
public boolean initializeServerKey()Description copied from interface:BootstrapManager
Initializes server key used forBambooEntityOid
s of this Bamboo instance based onserver ID
. Does nothing if the server key is already configured. This method should be externally synchronized.- Specified by:
initializeServerKey
in interfaceBootstrapManager
- Returns:
- true if server key has been initialized, false otherwise
-
getServerKey
public int getServerKey()Description copied from interface:BootstrapManager
Returns server key used forBambooEntityOid
s of this Bamboo instance.- Specified by:
getServerKey
in interfaceBootstrapManager
-
setServerKey
public void setServerKey(int serverKey) Description copied from interface:BootstrapManager
Set server key used forBambooEntityOid
s for this Bamboo instance.- Specified by:
setServerKey
in interfaceBootstrapManager
- Parameters:
serverKey
- server key of this instance
-
getBrokerURI
- Specified by:
getBrokerURI
in interfaceBootstrapManager
- Throws:
URISyntaxException
-
setBrokerURI
- Specified by:
setBrokerURI
in interfaceBootstrapManager
-
getBrokerClientURI
- Specified by:
getBrokerClientURI
in interfaceBootstrapManager
- Throws:
URISyntaxException
-
setBrokerClientURI
- Specified by:
setBrokerClientURI
in interfaceBootstrapManager
-
getFingerprint
- Specified by:
getFingerprint
in interfaceBootstrapManager
- Returns:
- a unique identifier for this startup
-
isBootstrapped
public boolean isBootstrapped()- Specified by:
isBootstrapped
in interfacecom.atlassian.config.bootstrap.AtlassianBootstrapManager
-
getProperty
- Specified by:
getProperty
in interfacecom.atlassian.config.bootstrap.AtlassianBootstrapManager
-
setProperty
- Specified by:
setProperty
in interfacecom.atlassian.config.bootstrap.AtlassianBootstrapManager
-
isPropertyTrue
- Specified by:
isPropertyTrue
in interfacecom.atlassian.config.bootstrap.AtlassianBootstrapManager
-
removeProperty
- Specified by:
removeProperty
in interfacecom.atlassian.config.bootstrap.AtlassianBootstrapManager
-
getString
- Specified by:
getString
in interfacecom.atlassian.config.bootstrap.AtlassianBootstrapManager
-
getFilePathProperty
- Specified by:
getFilePathProperty
in interfacecom.atlassian.config.bootstrap.AtlassianBootstrapManager
-
getPropertyKeys
- Specified by:
getPropertyKeys
in interfacecom.atlassian.config.bootstrap.AtlassianBootstrapManager
-
getPropertiesWithPrefix
- Specified by:
getPropertiesWithPrefix
in interfacecom.atlassian.config.bootstrap.AtlassianBootstrapManager
-
getBuildNumber
- Specified by:
getBuildNumber
in interfacecom.atlassian.config.bootstrap.AtlassianBootstrapManager
-
setBuildNumber
- Specified by:
setBuildNumber
in interfacecom.atlassian.config.bootstrap.AtlassianBootstrapManager
-
isApplicationHomeValid
public boolean isApplicationHomeValid()- Specified by:
isApplicationHomeValid
in interfacecom.atlassian.config.bootstrap.AtlassianBootstrapManager
-
getHibernateProperties
- Specified by:
getHibernateProperties
in interfacecom.atlassian.config.bootstrap.AtlassianBootstrapManager
-
save
public void save() throws com.atlassian.config.ConfigurationException- Specified by:
save
in interfacecom.atlassian.config.bootstrap.AtlassianBootstrapManager
- Throws:
com.atlassian.config.ConfigurationException
-
isSetupComplete
public boolean isSetupComplete()- Specified by:
isSetupComplete
in interfacecom.atlassian.config.bootstrap.AtlassianBootstrapManager
-
getOperation
- Specified by:
getOperation
in interfacecom.atlassian.config.bootstrap.AtlassianBootstrapManager
-
setOperation
- Specified by:
setOperation
in interfacecom.atlassian.config.bootstrap.AtlassianBootstrapManager
-
setSetupComplete
public void setSetupComplete(boolean b) - Specified by:
setSetupComplete
in interfacecom.atlassian.config.bootstrap.AtlassianBootstrapManager
-
bootstrapDatasource
public void bootstrapDatasource(String s, String s1) throws com.atlassian.config.bootstrap.BootstrapException - Specified by:
bootstrapDatasource
in interfacecom.atlassian.config.bootstrap.AtlassianBootstrapManager
- Throws:
com.atlassian.config.bootstrap.BootstrapException
-
getSetupPersister
public com.atlassian.config.setup.SetupPersister getSetupPersister()- Specified by:
getSetupPersister
in interfacecom.atlassian.config.bootstrap.AtlassianBootstrapManager
-
getApplicationConfig
public com.atlassian.config.ApplicationConfiguration getApplicationConfig()- Specified by:
getApplicationConfig
in interfacecom.atlassian.config.bootstrap.AtlassianBootstrapManager
-
getApplicationHome
- Specified by:
getApplicationHome
in interfacecom.atlassian.config.bootstrap.AtlassianBootstrapManager
-
getConfiguredApplicationHome
- Specified by:
getConfiguredApplicationHome
in interfacecom.atlassian.config.bootstrap.AtlassianBootstrapManager
-
getBootstrapFailureReason
- Specified by:
getBootstrapFailureReason
in interfacecom.atlassian.config.bootstrap.AtlassianBootstrapManager
-
init
public void init() throws com.atlassian.config.bootstrap.BootstrapException- Specified by:
init
in interfacecom.atlassian.config.bootstrap.AtlassianBootstrapManager
- Throws:
com.atlassian.config.bootstrap.BootstrapException
-
publishConfiguration
public void publishConfiguration()- Specified by:
publishConfiguration
in interfacecom.atlassian.config.bootstrap.AtlassianBootstrapManager
-
bootstrapDatabase
public void bootstrapDatabase(com.atlassian.config.db.DatabaseDetails databaseDetails, boolean b) throws com.atlassian.config.bootstrap.BootstrapException - Specified by:
bootstrapDatabase
in interfacecom.atlassian.config.bootstrap.AtlassianBootstrapManager
- Throws:
com.atlassian.config.bootstrap.BootstrapException
-
getHibernateConfigurator
public com.atlassian.config.db.HibernateConfigurator getHibernateConfigurator()- Specified by:
getHibernateConfigurator
in interfacecom.atlassian.config.bootstrap.AtlassianBootstrapManager
-
setHibernateConfigurator
public void setHibernateConfigurator(com.atlassian.config.db.HibernateConfigurator hibernateConfigurator) - Specified by:
setHibernateConfigurator
in interfacecom.atlassian.config.bootstrap.AtlassianBootstrapManager
-
getHibernateConfig
public com.atlassian.config.db.HibernateConfig getHibernateConfig()- Specified by:
getHibernateConfig
in interfacecom.atlassian.config.bootstrap.AtlassianBootstrapManager
-
getTestDatasourceConnection
public Connection getTestDatasourceConnection(String s) throws com.atlassian.config.bootstrap.BootstrapException - Specified by:
getTestDatasourceConnection
in interfacecom.atlassian.config.bootstrap.AtlassianBootstrapManager
- Throws:
com.atlassian.config.bootstrap.BootstrapException
-
databaseContainsExistingData
- Specified by:
databaseContainsExistingData
in interfacecom.atlassian.config.bootstrap.AtlassianBootstrapManager
-
getTestDatabaseConnection
public Connection getTestDatabaseConnection(com.atlassian.config.db.DatabaseDetails databaseDetails) throws com.atlassian.config.bootstrap.BootstrapException - Specified by:
getTestDatabaseConnection
in interfacecom.atlassian.config.bootstrap.AtlassianBootstrapManager
- Throws:
com.atlassian.config.bootstrap.BootstrapException
-
getH2VersionFromConfig
- Specified by:
getH2VersionFromConfig
in interfaceBootstrapManager
-
resetH2Version
public boolean resetH2Version()- Specified by:
resetH2Version
in interfaceBootstrapManager
-
setH2Version
- Specified by:
setH2Version
in interfaceBootstrapManager
-
getLocalHomePath
Description copied from interface:BootstrapManager
Local home directory;- Specified by:
getLocalHomePath
in interfaceBootstrapManager
-
initializeBuildNumberIfRequired
public boolean initializeBuildNumberIfRequired() throws com.atlassian.config.ConfigurationException- Specified by:
initializeBuildNumberIfRequired
in interfaceBootstrapManager
- Throws:
com.atlassian.config.ConfigurationException
-