@AllowConcurrentEvents @Subscribe public void on(RepositoryItemEventDelete itemEvent) { final Yum yum = yumRegistryProvider.get().get(itemEvent.getRepository().getId()); if (yum != null && yum instanceof YumHosted) { if (isRpmItemEvent(itemEvent)) { ((YumHosted) yum).regenerateWhenPathIsRemoved(itemEvent.getItem().getPath()); } else if (isCollectionItem(itemEvent)) { ((YumHosted) yum).regenerateWhenDirectoryIsRemoved(itemEvent.getItem().getPath()); } } }
private void onItemDelete(RepositoryItemEventDelete evt) throws IOException { // we only care about POM files StorageItem item = evt.getItem(); if (item instanceof StorageFileItem && item.getPath().endsWith(".pom")) { calculator.removeArtifactUsage((StorageFileItem) item); } }