}
public void registerListener(FeaturesListener listener) {
listeners.add(listener);
for (Repository repository : listRepositories()) {
listener.repositoryEvent(new RepositoryEvent(repository, RepositoryEvent.EventType.RepositoryAdded, true));
}
for (Feature feature : listInstalledFeatures()) {
listener.featureEvent(new FeatureEvent(feature, FeatureEvent.EventType.FeatureInstalled, true));
}
}