private void addReleasePrepare( String releaseId, String buildAgentUrl, String releaseName, String releaseType,
String releaseGoals, String username )
throws ContinuumReleaseException
{
PreparedRelease release = new PreparedRelease();
release.setReleaseId( releaseId );
release.setBuildAgentUrl( buildAgentUrl );
release.setReleaseName( releaseName );
release.setReleaseType( releaseType );
release.setReleaseGoals( releaseGoals );
release.setReleaseBy( username );
List<PreparedRelease> preparedReleases = getPreparedReleases();
if ( preparedReleases == null )
{
preparedReleases = new ArrayList<PreparedRelease>();
}
for ( PreparedRelease preparedRelease : preparedReleases )
{
if ( preparedRelease.getReleaseId().equals( release.getReleaseId() ) )
{
preparedReleases.remove( preparedRelease );
break;
}
}