}
public boolean isProjectInReleaseStage( String releaseId )
throws TaskQueueManagerException
{
Task prepareTask = getCurrentTask( "prepare-release" );
if ( prepareTask != null && prepareTask instanceof PrepareReleaseProjectTask )
{
if ( ( (PrepareReleaseProjectTask) prepareTask ).getReleaseId().equals( releaseId ) )
{
return true;
}
else
{
try
{
// check if in queue
List<Task> tasks = prepareReleaseQueue.getQueueSnapshot();
for ( Task prepareReleaseTask : tasks )
{
if ( ( (PrepareReleaseProjectTask) prepareReleaseTask ).getReleaseId().equals( releaseId ) )
{
return true;
}
}
}
catch ( TaskQueueException e )
{
throw new TaskQueueManagerException( e );
}
}
}
Task performTask = getCurrentTask( "perform-release" );
if ( performTask != null && performTask instanceof PerformReleaseProjectTask )
{
if ( ( (PerformReleaseProjectTask) performTask ).getReleaseId().equals( releaseId ) )
{
return true;