Search in sources :

Example 1 with FilePatternMatcher

use of org.commonjava.maven.galley.model.FilePatternMatcher in project indy by Commonjava.

the class InfinispanGalleyStorageProvider method setup.

@PostConstruct
public void setup() {
    SpecialPathInfo infoSpi = SpecialPathInfo.from(new FilePatternMatcher(".+\\.info")).setDecoratable(false).setDeletable(false).setListable(false).setPublishable(false).setRetrievable(false).setStorable(false).build();
    specialPathManager.registerSpecialPathInfo(infoSpi);
    transferDecorator = new ChecksummingTransferDecorator(Collections.singleton(TransferOperation.GENERATE), specialPathManager, new Md5GeneratorFactory(), new Sha1GeneratorFactory());
    this.cacheProvider = new GridFileSystemCacheProvider(pathGenerator, fileEventManager, transferDecorator, cacheFs);
}
Also used : Sha1GeneratorFactory(org.commonjava.maven.galley.io.checksum.Sha1GeneratorFactory) GridFileSystemCacheProvider(org.commonjava.maven.galley.cache.infinispan.GridFileSystemCacheProvider) FilePatternMatcher(org.commonjava.maven.galley.model.FilePatternMatcher) SpecialPathInfo(org.commonjava.maven.galley.model.SpecialPathInfo) ChecksummingTransferDecorator(org.commonjava.maven.galley.io.ChecksummingTransferDecorator) Md5GeneratorFactory(org.commonjava.maven.galley.io.checksum.Md5GeneratorFactory) PostConstruct(javax.annotation.PostConstruct)

Example 2 with FilePatternMatcher

use of org.commonjava.maven.galley.model.FilePatternMatcher in project indy by Commonjava.

the class DefaultGalleyStorageProvider method setup.

@PostConstruct
public void setup() {
    SpecialPathInfo infoSpi = SpecialPathInfo.from(new FilePatternMatcher(".+\\.info")).setDecoratable(false).setDeletable(false).setListable(false).setPublishable(false).setRetrievable(false).setStorable(false).build();
    specialPathManager.registerSpecialPathInfo(infoSpi);
    if (specialPathSetProducers != null) {
        specialPathSetProducers.forEach(producer -> {
            logger.trace("Adding special paths from: {}", producer.getClass().getName());
            specialPathManager.registerSpecialPathSet(producer.getSpecialPathSet());
        });
    }
    setupTransferDecoratorPipeline();
    setupCacheProviderFactory();
    // TODO: Tie this into a config file!
    transportManagerConfig = new TransportManagerConfig();
}
Also used : FilePatternMatcher(org.commonjava.maven.galley.model.FilePatternMatcher) SpecialPathInfo(org.commonjava.maven.galley.model.SpecialPathInfo) TransportManagerConfig(org.commonjava.maven.galley.config.TransportManagerConfig) PostConstruct(javax.annotation.PostConstruct)

Aggregations

PostConstruct (javax.annotation.PostConstruct)2 FilePatternMatcher (org.commonjava.maven.galley.model.FilePatternMatcher)2 SpecialPathInfo (org.commonjava.maven.galley.model.SpecialPathInfo)2 GridFileSystemCacheProvider (org.commonjava.maven.galley.cache.infinispan.GridFileSystemCacheProvider)1 TransportManagerConfig (org.commonjava.maven.galley.config.TransportManagerConfig)1 ChecksummingTransferDecorator (org.commonjava.maven.galley.io.ChecksummingTransferDecorator)1 Md5GeneratorFactory (org.commonjava.maven.galley.io.checksum.Md5GeneratorFactory)1 Sha1GeneratorFactory (org.commonjava.maven.galley.io.checksum.Sha1GeneratorFactory)1