use of org.commonjava.indy.change.event.ArtifactStoreDeletePostEvent in project indy by Commonjava.
the class DefaultStoreEventDispatcher method deleted.
@Override
public void deleted(final EventMetadata eventMetadata, final ArtifactStore... stores) {
if (postDelEvent != null) {
Logger logger = LoggerFactory.getLogger(getClass());
logger.trace("Requesting execution of store post-delete event for: {}", Arrays.asList(stores));
executor.execute(() -> {
logger.trace("Firing store post-delete event for: {}", Arrays.asList(stores));
final Map<ArtifactStore, Transfer> storeRoots = new HashMap<>();
for (final ArtifactStore store : stores) {
if (store == null) {
continue;
}
final Transfer root = fileManager.getStoreRootDirectory(store);
storeRoots.put(store, root);
}
final ArtifactStoreDeletePostEvent event = new ArtifactStoreDeletePostEvent(eventMetadata, storeRoots);
postDelEvent.fire(event);
});
}
}
Aggregations