repositories.add(repository);
repositoriesByName.put(file.getName(), repository);
for (Iterator iter = listeners.iterator(); iter.hasNext();)
{
HermesRepositoryListener l = (HermesRepositoryListener) iter.next();
cat.debug("new repository:" + repository.getId());
l.onRepositoryAdded(repository);
}
}
}
}
for (Iterator iter = repositoriesByName.keySet().iterator(); iter.hasNext();)
{
String fileName = (String) iter.next();
if (!fileNames.contains(fileName))
{
HermesRepository repository = (HermesRepository) repositoriesByName.get(fileName);
iter.remove();
repositories.remove(repository);
for (Iterator iter2 = listeners.iterator(); iter2.hasNext();)
{
HermesRepositoryListener l = (HermesRepositoryListener) iter2.next();
cat.debug("removed repository: " + repository.getId());
l.onRepositoryRemoved(repository);
}
}
}
}
catch (Throwable ex)