private void handleRepositoryEvent(RepositoryEvent event) { // Do not handle unless this is the type of repo that we are interested in if ((event.getRepositoryType() == IRepository.TYPE_METADATA && (eventTypes & PROV_EVENT_METADATA_REPOSITORY) == PROV_EVENT_METADATA_REPOSITORY) || (event.getRepositoryType() == IRepository.TYPE_ARTIFACT && (eventTypes & PROV_EVENT_ARTIFACT_REPOSITORY) == PROV_EVENT_ARTIFACT_REPOSITORY)) { if (event.getKind() == RepositoryEvent.ADDED && event.isRepositoryEnabled()) { repositoryAdded(event); } else if (event.getKind() == RepositoryEvent.REMOVED && event.isRepositoryEnabled()) { repositoryRemoved(event); } else if (event.getKind() == RepositoryEvent.DISCOVERED) { repositoryDiscovered(event); } else if (event.getKind() == RepositoryEvent.CHANGED) { repositoryChanged(event); } else if (event.getKind() == RepositoryEvent.ENABLEMENT) { repositoryEnablement(event); } } }
public void notify(EventObject o) { if (o instanceof RepositoryEvent) { RepositoryEvent event = (RepositoryEvent) o; if (RepositoryEvent.REMOVED == event.getKind() && IRepository.TYPE_METADATA == event.getRepositoryType()) { deleteCache(event.getRepositoryLocation()); } } } };
public void notify(EventObject o) { if (o instanceof RepositoryEvent) { RepositoryEvent event = (RepositoryEvent) o; if (RepositoryEvent.REMOVED == event.getKind() && IRepository.TYPE_METADATA == event.getRepositoryType()) { deleteCache(event.getRepositoryLocation()); } } } };
public void notify(EventObject o) { if (o instanceof RepositoryEvent) { RepositoryEvent event = (RepositoryEvent) o; if (event.getKind() == RepositoryEvent.DISCOVERED && event.getRepositoryType() == getRepositoryType()) addRepository(event.getRepositoryLocation(), event.isRepositoryEnabled(), true); } }
public void notify(EventObject o) { if (o instanceof RepositoryEvent) { RepositoryEvent event = (RepositoryEvent) o; if (event.getKind() == RepositoryEvent.DISCOVERED && event.getRepositoryType() == getRepositoryType()) addRepository(event.getRepositoryLocation(), event.isRepositoryEnabled(), true); } }