com.atlassian.bamboo.container
Class ExpiredBuildCleaner

java.lang.Object
  extended by com.atlassian.bamboo.container.ExpiredBuildCleaner

public class ExpiredBuildCleaner
extends Object

A Quartz task to remove expired build results.

TODO

- save the state of the filter dropdowns/cookies - make sure post is redirected as a get - handle deleting the latest build... what do links do?


Field Summary
static String BUILD_MANAGER_CONTEXT_KEY
           
static String CONTAINER_CONTEXT_KEY
           
 
Constructor Summary
ExpiredBuildCleaner()
           
 
Method Summary
 void execute(JobExecutionContext jobExecutionContext)
           
 BuildManager getBuildManager(JobExecutionContext jobExecutionContext)
           
 Bamboo getContainerFromJobContext(JobExecutionContext jobExecutionContext)
          Make the bamboo facade available to the Quartz job
 boolean hasExpired(DateTime buildTime, Period expiryPeriod)
          Has the given buildTime expired?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTAINER_CONTEXT_KEY

public static final String CONTAINER_CONTEXT_KEY
See Also:
Constant Field Values

BUILD_MANAGER_CONTEXT_KEY

public static final String BUILD_MANAGER_CONTEXT_KEY
See Also:
Constant Field Values
Constructor Detail

ExpiredBuildCleaner

public ExpiredBuildCleaner()
Method Detail

execute

public void execute(JobExecutionContext jobExecutionContext)
             throws JobExecutionException
Throws:
JobExecutionException

hasExpired

public boolean hasExpired(DateTime buildTime,
                          Period expiryPeriod)
Has the given buildTime expired?

Parameters:
buildTime - The time of the build we are checking
expiryPeriod - The system's expiry period
Returns:
true is the buildTime is exceeds the expiry period

getContainerFromJobContext

public Bamboo getContainerFromJobContext(JobExecutionContext jobExecutionContext)
Make the bamboo facade available to the Quartz job

Parameters:
jobExecutionContext - The job's context
Returns:
The Bamboo facade object

getBuildManager

public BuildManager getBuildManager(JobExecutionContext jobExecutionContext)


Copyright © 2006 Atlassian Software Systems. All Rights Reserved.