use of org.apache.archiva.repository.event.RepositoryRegistryEvent in project archiva by apache.
the class ArchivaRepositoryRegistry method registerManagedRepositoryHandler.
public void registerManagedRepositoryHandler(RepositoryHandler<ManagedRepository, ManagedRepositoryConfiguration> managedRepositoryHandler) {
this.managedRepositoryHandler = managedRepositoryHandler;
doRegister(managedRepositoryHandler);
initializeManagedRepositories();
if (managed_initialized.get() && remote_initialized.get() && groups_initalized.get()) {
pushEvent(new RepositoryRegistryEvent(RepositoryRegistryEvent.INITIALIZED, this));
}
}
use of org.apache.archiva.repository.event.RepositoryRegistryEvent in project archiva by apache.
the class ArchivaRepositoryRegistry method initializeRemoteRepositories.
private void initializeRemoteRepositories() {
if (this.remoteRepositoryHandler != null) {
this.remoteRepositoryHandler.initializeFromConfig();
this.remote_initialized.set(true);
pushEvent(new RepositoryRegistryEvent(RepositoryRegistryEvent.REMOTE_REPOS_INITIALIZED, this));
}
}
use of org.apache.archiva.repository.event.RepositoryRegistryEvent in project archiva by apache.
the class ArchivaRepositoryRegistry method initialize.
@PostConstruct
private void initialize() {
rwLock.writeLock().lock();
try {
log.debug("Initializing repository registry");
initializeManagedRepositories();
initializeRemoteRepositories();
initializeRepositoryGroups();
for (RepositoryProvider provider : repositoryProviders) {
provider.addRepositoryEventHandler(this);
}
this.configurationHandler.addListener(this);
registerEventHandler(EventType.ROOT, centralEventManager);
} finally {
rwLock.writeLock().unlock();
}
pushEvent(new RepositoryRegistryEvent(RepositoryRegistryEvent.RELOADED, this));
if (managed_initialized.get() && remote_initialized.get() && groups_initalized.get()) {
pushEvent(new RepositoryRegistryEvent(RepositoryRegistryEvent.INITIALIZED, this));
}
}
use of org.apache.archiva.repository.event.RepositoryRegistryEvent in project archiva by apache.
the class ArchivaRepositoryRegistry method initializeManagedRepositories.
private void initializeManagedRepositories() {
if (this.managedRepositoryHandler != null) {
this.managedRepositoryHandler.initializeFromConfig();
this.managed_initialized.set(true);
pushEvent(new RepositoryRegistryEvent(RepositoryRegistryEvent.MANAGED_REPOS_INITIALIZED, this));
}
}
use of org.apache.archiva.repository.event.RepositoryRegistryEvent in project archiva by apache.
the class ArchivaRepositoryRegistry method registerGroupHandler.
public void registerGroupHandler(RepositoryHandler<RepositoryGroup, RepositoryGroupConfiguration> groupHandler) {
this.groupHandler = groupHandler;
doRegister(groupHandler);
initializeRepositoryGroups();
if (managed_initialized.get() && remote_initialized.get() && groups_initalized.get()) {
pushEvent(new RepositoryRegistryEvent(RepositoryRegistryEvent.INITIALIZED, this));
}
}
Aggregations