Map<String, BuildProjectTask> currentBuilds = getContinuum().getBuildsManager().getCurrentBuilds();
Set<String> keySet = currentBuilds.keySet();
for ( String key : keySet )
{
BuildProjectTask buildTask = currentBuilds.get( key );
BuildProjectQueue queue = new BuildProjectQueue();
queue.setName( key );
queue.setTask( buildTask );
currentBuildProjectTasks.add( queue );
}
}
catch ( BuildManagerException e )
{
addActionError( e.getMessage() );
return ERROR;
}
try
{
// queued prepare builds
Map<String, List<PrepareBuildProjectsTask>> prepareBuilds =
getContinuum().getBuildsManager().getProjectsInPrepareBuildQueue();
Set<String> keySet = prepareBuilds.keySet();
for ( String key : keySet )
{
for ( PrepareBuildProjectsTask task : prepareBuilds.get( key ) )
{
PrepareBuildSummary summary = new PrepareBuildSummary();
summary.setProjectGroupId( task.getProjectGroupId() );
summary.setProjectGroupName( task.getProjectGroupName() );
summary.setScmRootId( task.getProjectScmRootId() );
summary.setScmRootAddress( task.getScmRootAddress() );
summary.setHashCode( task.getHashCode() );
summary.setQueueName( key );
prepareBuildQueues.add( summary );
}
}
}
catch ( BuildManagerException e )
{
addActionError( e.getMessage() );
return ERROR;
}
try
{
// queued builds
Map<String, List<BuildProjectTask>> builds =
getContinuum().getBuildsManager().getProjectsInBuildQueues();
Set<String> keySet = builds.keySet();
for ( String key : keySet )
{
for ( BuildProjectTask task : builds.get( key ) )
{
BuildProjectQueue queue = new BuildProjectQueue();
queue.setName( key );
queue.setTask( task );
buildsInQueue.add( queue );
}
}
}
catch ( BuildManagerException e )
{
addActionError( e.getMessage() );
return ERROR;
}
try
{
// current checkouts
Map<String, CheckOutTask> currentCheckouts = getContinuum().getBuildsManager().getCurrentCheckouts();
Set<String> keySet = currentCheckouts.keySet();
for ( String key : keySet )
{
CheckOutTask checkoutTask = currentCheckouts.get( key );
CheckoutQueue queue = new CheckoutQueue();
queue.setName( key );
queue.setTask( checkoutTask );
currentCheckoutTasks.add( queue );
}
}
catch ( BuildManagerException e )
{
addActionError( e.getMessage() );
return ERROR;
}
try
{
// queued checkouts
Map<String, List<CheckOutTask>> checkouts =
getContinuum().getBuildsManager().getProjectsInCheckoutQueues();
Set<String> keySet = checkouts.keySet();
for ( String key : keySet )
{
for ( CheckOutTask task : checkouts.get( key ) )
{
CheckoutQueue queue = new CheckoutQueue();
queue.setName( key );
queue.setTask( task );
checkoutsInQueue.add( queue );
}
}
}
catch ( BuildManagerException e )