if ( buildAgent.getUrl().equals( agent.getUrl() ) )
{
getContinuum().getDistributedBuildManager().removeDistributedBuildQueueOfAgent(
buildAgent.getUrl() );
configuration.removeBuildAgent( agent );
configuration.store();
AuditLog event =
new AuditLog( "Build Agent URL=" + agent.getUrl(), AuditLogConstants.REMOVE_BUILD_AGENT );
event.setCategory( AuditLogConstants.BUILD_AGENT );
event.setCurrentUser( getPrincipal() );