com.atlassian.bamboo.persister
Interface Persister

All Superinterfaces:
Startable
All Known Implementing Classes:
FileBasedPersister

public interface Persister
extends Startable

This interface defines how Bamboo build data can be persisted.


Method Summary
 void addBuildResults(Build build, BuildResults buildResults)
          Deprecated.  
 void clear()
          Clears all interal caches the persister may have
 void deleteBuild(Build build)
          Deprecated.  
 void deleteBuildResults(Build build, long buildNumber)
          Deprecated.  
 AdministrationConfiguration getAdministrationConfiguration()
          Reload the persisted admin configuration data
 Build getBuildByKey(String buildKey)
          Deprecated.  
 Build getBuildByName(String buildName)
          Deprecated.  
 BuildResults getBuildResults(Build build, long buildNumber)
          Get the Nth build for a given build.
 Collection getBuilds()
          Deprecated.  
 int getCurrentVersion()
          Return the version of the persisted data
 File getDataDirectoryFile()
           
 VersionUpgrader getVersionUpgrader()
          Which upgrader does the persister use?
 boolean isExistingBuild(String buildName)
          Deprecated.  
 boolean isInitialised()
          Has the persistent data already been initialised.
 void reload()
          Restart with the latest configurations...
 void saveAdministrationConfiguration(AdministrationConfiguration administrationConfiguration)
          Perist the given administration information
 void saveBuild(Build build)
          Deprecated.  
 void setBuildManager(BuilderManager builderManager)
           
 void setPersisterOptions(PersisterOptions persisterOptions)
          Let the UI update the persister
 void setVersionUpgrader(VersionUpgrader versionUpgrader)
          Set by the configuration loaders when the persister is first instantiated.
 void updateToCurrentVersion()
          The system requests the that the persisted data is upgraded to work with the lasted code.
 
Methods inherited from interface com.atlassian.bamboo.container.Startable
start, stop
 

Method Detail

getBuildByName

Build getBuildByName(String buildName)
Deprecated. 

Obtain the build with the given buildName

Parameters:
buildName - The name of the persisted build we require
Returns:
The build

getBuildByKey

Build getBuildByKey(String buildKey)
Deprecated. 

Obtain the build with the given buildKey

Parameters:
buildKey - The key of the persisted build we require
Returns:
The build

saveBuild

void saveBuild(Build build)
Deprecated. 

Persist a build.

It creates builds that have not already been persisted and updates ones that have.

Parameters:
build - The build

deleteBuild

void deleteBuild(Build build)
Deprecated. 

Remove a build from the System.

Parameters:
build - The build to delete

deleteBuildResults

void deleteBuildResults(Build build,
                        long buildNumber)
Deprecated. 

Remove a specific build build.

Parameters:
build - The build it's being removed from
buildNumber - The build to remove

isExistingBuild

boolean isExistingBuild(String buildName)
Deprecated. 

Have we persisted a build with the given buildName?

Parameters:
buildName - The name of the build we're checking
Returns:
true iff we have already persisted a build with this name

getBuilds

Collection getBuilds()
Deprecated. 

Obtain a collection of all the currently persisted builds.

Returns:
The builds

addBuildResults

void addBuildResults(Build build,
                     BuildResults buildResults)
Deprecated. 

Associate the given buildResults with the given build.

Parameters:
build - The build we are adding the new build result to
buildResults - The build results we are adding

getBuildResults

BuildResults getBuildResults(Build build,
                             long buildNumber)
Get the Nth build for a given build.

Parameters:
build - The build
buildNumber - The build's build number
Returns:
The build result

updateToCurrentVersion

void updateToCurrentVersion()
The system requests the that the persisted data is upgraded to work with the lasted code.


saveAdministrationConfiguration

void saveAdministrationConfiguration(AdministrationConfiguration administrationConfiguration)
Perist the given administration information

Parameters:
administrationConfiguration - The data to persist

getAdministrationConfiguration

AdministrationConfiguration getAdministrationConfiguration()
Reload the persisted admin configuration data

Returns:
The data

isInitialised

boolean isInitialised()
Has the persistent data already been initialised.

Returns:
true if the persister has been initialed with valid configuration data

reload

void reload()
Restart with the latest configurations...


clear

void clear()
Clears all interal caches the persister may have


setVersionUpgrader

void setVersionUpgrader(VersionUpgrader versionUpgrader)
Set by the configuration loaders when the persister is first instantiated.


setPersisterOptions

void setPersisterOptions(PersisterOptions persisterOptions)
Let the UI update the persister

Parameters:
persisterOptions -

getDataDirectoryFile

File getDataDirectoryFile()

getCurrentVersion

int getCurrentVersion()
Return the version of the persisted data

Returns:
The version number

getVersionUpgrader

VersionUpgrader getVersionUpgrader()
Which upgrader does the persister use?

Returns:
The upgrader

setBuildManager

void setBuildManager(BuilderManager builderManager)


Copyright © 2006 Atlassian Software Systems. All Rights Reserved.