{
newRepos = new ArrayList( repos.size() );
for ( Iterator it = repos.iterator(); it.hasNext(); )
{
Repository repo = (Repository) it.next();
Repository newRepo = new Repository();
newRepo.setId( repo.getId() );
newRepo.setLayout( repo.getLayout() );
newRepo.setName( repo.getName() );
RepositoryPolicy releasePolicy = repo.getReleases();
if ( releasePolicy != null )
{
RepositoryPolicy newPolicy = new RepositoryPolicy();
newPolicy.setEnabled( releasePolicy.isEnabled() );
newPolicy.setChecksumPolicy( releasePolicy.getChecksumPolicy() );
newPolicy.setUpdatePolicy( releasePolicy.getUpdatePolicy() );
newRepo.setReleases( newPolicy );
}
RepositoryPolicy snapPolicy = repo.getSnapshots();
if ( snapPolicy != null )
{
RepositoryPolicy newPolicy = new RepositoryPolicy();
newPolicy.setEnabled( snapPolicy.isEnabled() );
newPolicy.setChecksumPolicy( snapPolicy.getChecksumPolicy() );
newPolicy.setUpdatePolicy( snapPolicy.getUpdatePolicy() );
newRepo.setSnapshots( newPolicy );
}
newRepo.setUrl( repo.getUrl() );
newRepos.add( newRepo );
}
}