{
LocalRepository repository;
repository = localRepositoryDao.getLocalRepositoryByName( "DEFAULT" );
Settings settings = getSettings();
if ( repository == null )
{
log.info( "create Default Local Repository" );
repository = new LocalRepository();
repository.setName( "DEFAULT" );
repository.setLocation( settings.getLocalRepository() );
repository = localRepositoryDao.addLocalRepository( repository );
createDefaultPurgeConfiguration( repository );
}
else if ( !repository.getLocation().equals( settings.getLocalRepository() ) )
{
log.info( "updating location of Default Local Repository" );
repository.setLocation( settings.getLocalRepository() );
localRepositoryDao.updateLocalRepository( repository );
}
}