Package com.atlassian.bamboo.container
Class BambooContainer
- java.lang.Object
-
- com.atlassian.bamboo.container.BambooContainer
-
-
Field Summary
-
Fields inherited from interface com.atlassian.bamboo.Bamboo
BAMBOO_KEY
-
-
Constructor Summary
Constructors Constructor Description BambooContainer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearErrorMessages()
deletes all error messagesAdministrationConfiguration
getAdministrationConfiguration()
static BambooContainer
getBambooContainer()
ErrorDetails
getBuildErrorDetails(String buildKey, int errorNumber)
Obtain the errorNumber'th error for the given buildName from the internal system error logPersister
getDefaultPersister()
Collection<ErrorDetails>
getElasticErrorMessages()
Obtain all of the logged error messages associated with elastic bambooCollection<ErrorDetails>
getErrorMessages()
What error messages have we detected to far?Collection<ErrorDetails>
getErrorMessages(@NotNull PlanKey planKey)
Obtain all of the system logged error messagesCollection<ErrorDetails>
getErrorMessagesByAgentId(@NotNull Long agentId)
Obtain the system logged error messages filtered by Agent IdSessionManager
getSessionManager()
Which session manager is the system using?protected void
init()
void
initialise()
Initialises the Bamboo give the application rootvoid
initialisePlansAfterImport()
Plan oriented initialisation: enable/initialise plan cache initialise the builds/build strategies so that they are initialised when the server is startedvoid
prepareForRestart()
Prepare for restart the container's componentsvoid
promoteToPrimary(boolean isStartup)
void
registerCustomEventListeners()
void
removeBuildErrorFromLog(String buildKey, int errorNumber)
Remove the errorNumber'th error for the given buildName from the internal system error logvoid
reportBuildConfigurationProblems(Persister persister, ErrorHandler errorHandler)
void
restartComponentsFollowingConfigurationChange()
Restart the configuration dependent componentsvoid
start(@NotNull javax.servlet.ServletContext servletContext)
Start the container's componentsvoid
stop()
Stop the container's components
-
-
-
Method Detail
-
initialise
public void initialise() throws Exception
Initialises the Bamboo give the application root- Throws:
Exception
-
init
protected void init() throws com.atlassian.plugin.PluginParseException
- Throws:
com.atlassian.plugin.PluginParseException
-
promoteToPrimary
public void promoteToPrimary(boolean isStartup)
-
start
public void start(@NotNull @NotNull javax.servlet.ServletContext servletContext) throws Exception
Start the container's components
-
initialisePlansAfterImport
public void initialisePlansAfterImport() throws IOException
Plan oriented initialisation:- enable/initialise plan cache
- initialise the builds/build strategies so that they are initialised when the server is started
- Throws:
IOException
-
registerCustomEventListeners
public void registerCustomEventListeners()
-
reportBuildConfigurationProblems
public void reportBuildConfigurationProblems(Persister persister, ErrorHandler errorHandler)
-
prepareForRestart
public void prepareForRestart() throws Exception
Prepare for restart the container's components- Throws:
Exception
-
restartComponentsFollowingConfigurationChange
public void restartComponentsFollowingConfigurationChange()
Restart the configuration dependent components- Specified by:
restartComponentsFollowingConfigurationChange
in interfaceBamboo
-
getErrorMessages
public Collection<ErrorDetails> getErrorMessages()
What error messages have we detected to far?- Specified by:
getErrorMessages
in interfaceBamboo
- Returns:
- The error messages
-
getErrorMessages
public Collection<ErrorDetails> getErrorMessages(@NotNull @NotNull PlanKey planKey)
Description copied from interface:Bamboo
Obtain all of the system logged error messages- Specified by:
getErrorMessages
in interfaceBamboo
- Returns:
- the collection of ErrorMessages
-
getElasticErrorMessages
public Collection<ErrorDetails> getElasticErrorMessages()
Description copied from interface:Bamboo
Obtain all of the logged error messages associated with elastic bamboo- Specified by:
getElasticErrorMessages
in interfaceBamboo
- Returns:
- the collection of ErrorDetails objects
-
getErrorMessagesByAgentId
public Collection<ErrorDetails> getErrorMessagesByAgentId(@NotNull @NotNull Long agentId)
Description copied from interface:Bamboo
Obtain the system logged error messages filtered by Agent Id- Specified by:
getErrorMessagesByAgentId
in interfaceBamboo
- Returns:
- the collection of ErrorMessages
-
clearErrorMessages
public void clearErrorMessages()
Description copied from interface:Bamboo
deletes all error messages- Specified by:
clearErrorMessages
in interfaceBamboo
-
removeBuildErrorFromLog
public void removeBuildErrorFromLog(String buildKey, int errorNumber)
Description copied from interface:Bamboo
Remove the errorNumber'th error for the given buildName from the internal system error log- Specified by:
removeBuildErrorFromLog
in interfaceBamboo
- Parameters:
buildKey
- The name of the build with the associated errorerrorNumber
- The error number (zero based index of error associated with build)
-
getBuildErrorDetails
public ErrorDetails getBuildErrorDetails(String buildKey, int errorNumber)
Description copied from interface:Bamboo
Obtain the errorNumber'th error for the given buildName from the internal system error log- Specified by:
getBuildErrorDetails
in interfaceBamboo
- Parameters:
buildKey
- The name of the build with the associated errorerrorNumber
- The error number (zero based index of error associated with build)
-
getDefaultPersister
public Persister getDefaultPersister()
- Specified by:
getDefaultPersister
in interfaceBamboo
-
getSessionManager
public SessionManager getSessionManager()
Description copied from interface:Bamboo
Which session manager is the system using?- Specified by:
getSessionManager
in interfaceBamboo
- Returns:
- The session manager
-
getAdministrationConfiguration
public AdministrationConfiguration getAdministrationConfiguration()
- Specified by:
getAdministrationConfiguration
in interfaceBamboo
-
getBambooContainer
public static BambooContainer getBambooContainer()
-
-