}
private Configuration createConfigurationForEditing( ManagedRepository repositoryConfiguration )
throws Exception
{
Configuration configuration = buildEasyConfiguration();
ManagedRepositoryConfiguration managedRepositoryConfiguration = new ManagedRepositoryConfiguration();
managedRepositoryConfiguration.setDaysOlder( repositoryConfiguration.getDaysOlder() );
managedRepositoryConfiguration.setIndexDir( repositoryConfiguration.getIndexDirectory() );
managedRepositoryConfiguration.setRetentionCount( repositoryConfiguration.getRetentionCount() );
managedRepositoryConfiguration.setBlockRedeployments( repositoryConfiguration.isBlockRedeployments() );
managedRepositoryConfiguration.setDeleteReleasedSnapshots(
repositoryConfiguration.isDeleteReleasedSnapshots() );
managedRepositoryConfiguration.setLocation( repositoryConfiguration.getLocation() );
managedRepositoryConfiguration.setRefreshCronExpression( repositoryConfiguration.getCronExpression() );
managedRepositoryConfiguration.setReleases( repositoryConfiguration.isReleases() );
managedRepositoryConfiguration.setScanned( repositoryConfiguration.isScanned() );
managedRepositoryConfiguration.setId( repositoryConfiguration.getId() );
managedRepositoryConfiguration.setName( repositoryConfiguration.getName() );
managedRepositoryConfiguration.setLayout( repositoryConfiguration.getLayout() );
configuration.addManagedRepository( managedRepositoryConfiguration );
return configuration;
}