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 voidclearErrorMessages()deletes all error messagesAdministrationConfigurationgetAdministrationConfiguration()static BambooContainergetBambooContainer()ErrorDetailsgetBuildErrorDetails(String buildKey, int errorNumber)Obtain the errorNumber'th error for the given buildName from the internal system error logPersistergetDefaultPersister()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 IdSessionManagergetSessionManager()Which session manager is the system using?protected voidinit()voidinitialise()Initialises the Bamboo give the application rootvoidinitialisePlansAfterImport()Plan oriented initialisation: enable/initialise plan cache initialise the builds/build strategies so that they are initialised when the server is startedvoidprepareForRestart()Prepare for restart the container's componentsvoidpromoteToPrimary(boolean isStartup)voidregisterCustomEventListeners()voidremoveBuildErrorFromLog(String buildKey, int errorNumber)Remove the errorNumber'th error for the given buildName from the internal system error logvoidreportBuildConfigurationProblems(Persister persister, ErrorHandler errorHandler)voidrestartComponentsFollowingConfigurationChange()Restart the configuration dependent componentsvoidstart(@NotNull javax.servlet.ServletContext servletContext)Start the container's componentsvoidstop()Stop the container's components
-
-
-
Method Detail
-
initialise
public void initialise() throws ExceptionInitialises 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 ExceptionStart the container's components
-
initialisePlansAfterImport
public void initialisePlansAfterImport() throws IOExceptionPlan 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 ExceptionPrepare for restart the container's components- Throws:
Exception
-
restartComponentsFollowingConfigurationChange
public void restartComponentsFollowingConfigurationChange()
Restart the configuration dependent components- Specified by:
restartComponentsFollowingConfigurationChangein interfaceBamboo
-
getErrorMessages
public Collection<ErrorDetails> getErrorMessages()
What error messages have we detected to far?- Specified by:
getErrorMessagesin interfaceBamboo- Returns:
- The error messages
-
getErrorMessages
public Collection<ErrorDetails> getErrorMessages(@NotNull @NotNull PlanKey planKey)
Description copied from interface:BambooObtain all of the system logged error messages- Specified by:
getErrorMessagesin interfaceBamboo- Returns:
- the collection of ErrorMessages
-
getElasticErrorMessages
public Collection<ErrorDetails> getElasticErrorMessages()
Description copied from interface:BambooObtain all of the logged error messages associated with elastic bamboo- Specified by:
getElasticErrorMessagesin interfaceBamboo- Returns:
- the collection of ErrorDetails objects
-
getErrorMessagesByAgentId
public Collection<ErrorDetails> getErrorMessagesByAgentId(@NotNull @NotNull Long agentId)
Description copied from interface:BambooObtain the system logged error messages filtered by Agent Id- Specified by:
getErrorMessagesByAgentIdin interfaceBamboo- Returns:
- the collection of ErrorMessages
-
clearErrorMessages
public void clearErrorMessages()
Description copied from interface:Bamboodeletes all error messages- Specified by:
clearErrorMessagesin interfaceBamboo
-
removeBuildErrorFromLog
public void removeBuildErrorFromLog(String buildKey, int errorNumber)
Description copied from interface:BambooRemove the errorNumber'th error for the given buildName from the internal system error log- Specified by:
removeBuildErrorFromLogin 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:BambooObtain the errorNumber'th error for the given buildName from the internal system error log- Specified by:
getBuildErrorDetailsin 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:
getDefaultPersisterin interfaceBamboo
-
getSessionManager
public SessionManager getSessionManager()
Description copied from interface:BambooWhich session manager is the system using?- Specified by:
getSessionManagerin interfaceBamboo- Returns:
- The session manager
-
getAdministrationConfiguration
public AdministrationConfiguration getAdministrationConfiguration()
- Specified by:
getAdministrationConfigurationin interfaceBamboo
-
getBambooContainer
public static BambooContainer getBambooContainer()
-
-