return;
}
LOGGER.debug( "Backup project " + ps.getName() );
Project p = client.getProjectWithAllDetails( ps.getId() );
startTag( "project", true );
writeSimpleFields( p );
if ( p.getProjectGroup() != null )
{
writeTagWithParameter( "projectGroup", "id", String.valueOf( p.getProjectGroup().getId() ) );
}
if ( p.getDevelopers() != null && !p.getDevelopers().isEmpty() )
{
startTag( "developers", true );
for ( ProjectDeveloper pd : (List<ProjectDeveloper>) p.getDevelopers() )
{
writeObject( pd, "developer", true );
}
endTag( "developers", true );
}
if ( p.getDependencies() != null && !p.getDependencies().isEmpty() )
{
startTag( "dependencies", true );
for ( ProjectDependency pd : (List<ProjectDependency>) p.getDependencies() )
{
writeObject( pd, "dependency", true );
}
endTag( "dependencies", true );
}
if ( p.getBuildDefinitions() != null && !p.getBuildDefinitions().isEmpty() )
{
startTag( "buildDefinitions", true );
for ( BuildDefinition bd : (List<BuildDefinition>) p.getBuildDefinitions() )
{
backupBuildDefinition( bd );
}
endTag( "buildDefinitions", true );
}
if ( p.getNotifiers() != null && !p.getNotifiers().isEmpty() )
{
startTag( "notifiers", true );
for ( ProjectNotifier notif : (List<ProjectNotifier>) p.getNotifiers() )
{
backupNotifier( notif );
}
endTag( "notifiers", true );
}
List<BuildResultSummary> brs = client.getBuildResultsForProject( p.getId() );
if ( brs != null && !brs.isEmpty() )
{
startTag( "buildResults", true );
for ( BuildResultSummary brSummary : brs )
{
BuildResult br = client.getBuildResult( p.getId(), brSummary.getId() );
backupBuildResult( br );
}
endTag( "buildResults", true );
}
endTag( "project", true );