Search in sources :

Example 1 with ArtifactStoreDeletePreEvent

use of org.commonjava.indy.change.event.ArtifactStoreDeletePreEvent in project indy by Commonjava.

the class DefaultStoreEventDispatcher method deleting.

@Override
public void deleting(final EventMetadata eventMetadata, final ArtifactStore... stores) {
    if (preDelEvent != null) {
        logger.trace("Dispatch pre-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 ArtifactStoreDeletePreEvent event = new ArtifactStoreDeletePreEvent(eventMetadata, storeRoots);
        fireEvent(preDelEvent, event);
    }
}
Also used : ArtifactStoreDeletePreEvent(org.commonjava.indy.change.event.ArtifactStoreDeletePreEvent) ArtifactStore(org.commonjava.indy.model.core.ArtifactStore) HashMap(java.util.HashMap) Transfer(org.commonjava.maven.galley.model.Transfer)

Aggregations

HashMap (java.util.HashMap)1 ArtifactStoreDeletePreEvent (org.commonjava.indy.change.event.ArtifactStoreDeletePreEvent)1 ArtifactStore (org.commonjava.indy.model.core.ArtifactStore)1 Transfer (org.commonjava.maven.galley.model.Transfer)1