Search in sources :

Example 1 with AbstractChecksumGenerator

use of org.commonjava.maven.galley.io.checksum.AbstractChecksumGenerator in project galley by Commonjava.

the class ChecksummingTransferDecorator method decorateDelete.

public void decorateDelete(final Transfer transfer, final EventMetadata eventMetadata) throws IOException {
    if (transfer.isDirectory()) {
        return;
    }
    SpecialPathInfo specialPathInfo = specialPathManager.getSpecialPathInfo(transfer);
    if (specialPathInfo == null || specialPathInfo.isDeletable()) {
        for (final AbstractChecksumGeneratorFactory<?> factory : checksumFactories) {
            final AbstractChecksumGenerator generator = factory.createGenerator(transfer);
            generator.delete();
        }
    }
    if (consumer != null) {
        consumer.removeMetadata(transfer);
    }
}
Also used : SpecialPathInfo(org.commonjava.maven.galley.model.SpecialPathInfo) AbstractChecksumGenerator(org.commonjava.maven.galley.io.checksum.AbstractChecksumGenerator)

Aggregations

AbstractChecksumGenerator (org.commonjava.maven.galley.io.checksum.AbstractChecksumGenerator)1 SpecialPathInfo (org.commonjava.maven.galley.model.SpecialPathInfo)1