com.atlassian.bamboo.persister.file
Interface BuildPersisterDecorator

All Superinterfaces:
Startable
All Known Implementing Classes:
CachedBuildPersisterDecorator, XStreamBuildPersister

public interface BuildPersisterDecorator
extends Startable

This interface provides an abstract for persisting Bamboo builds objects.

Implemented as decorators to chain caching and compression behaviour


Method Summary
 void deleteBuild(Build build)
          Remove the persisted date for the given build.
 void deleteBuildResults(Build build, long buildNumber)
          Remove a specific build result
 java.util.Iterator getBuildNames()
          Obtain an iterator of persisted build names
 BuildResults loadBuildResults(java.lang.String planKey, java.lang.Integer buildNumber)
          Load the given build's buildNumber'th build results
 java.util.Collection loadBuilds()
          Get all the persisted builds
 Build loadBuilds(java.lang.String buildName)
          Load the persisted build with the given build name
 void saveBuild(Build build)
          Persist the given Build
 void saveBuildResults(Build build, BuildResults buildResults)
          Save the given build's given buildResults
 
Methods inherited from interface com.atlassian.bamboo.container.Startable
isActive, start, stop
 

Method Detail

saveBuild

void saveBuild(Build build)
               throws PersisterException
Persist the given Build

Parameters:
build - The build to persist
Throws:
PersisterException - Failed to persist

deleteBuild

void deleteBuild(Build build)
                 throws PersisterException
Remove the persisted date for the given build.

Parameters:
build - The build to delete
Throws:
PersisterException - Failed to persist

deleteBuildResults

void deleteBuildResults(Build build,
                        long buildNumber)
                        throws PersisterException
Remove a specific build result

Parameters:
build - The build the result belongs to
buildNumber - The build number
Throws:
PersisterException

loadBuilds

Build loadBuilds(java.lang.String buildName)
                 throws PersisterException
Load the persisted build with the given build name

Parameters:
buildName - The name of the build to load
Returns:
The loaded build
Throws:
PersisterException - Failed to load

loadBuilds

java.util.Collection loadBuilds()
                                throws PersisterException
Get all the persisted builds

Returns:
The builds
Throws:
PersisterException - Failed to load

saveBuildResults

void saveBuildResults(Build build,
                      BuildResults buildResults)
                      throws PersisterException
Save the given build's given buildResults

Parameters:
build - The buildResults' build
buildResults - The build results to persist
Throws:
PersisterException - Failed to persist the build results

loadBuildResults

BuildResults loadBuildResults(java.lang.String planKey,
                              java.lang.Integer buildNumber)
                              throws PersisterException
Load the given build's buildNumber'th build results

Parameters:
planKey -
buildNumber - The number of the build results we are interested in
Returns:
The buildResults
Throws:
PersisterException - Failed to load the build results

getBuildNames

java.util.Iterator getBuildNames()
Obtain an iterator of persisted build names

Returns:
The build names


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.