Search in sources :

Example 1 with PromoteValidationsManager

use of org.commonjava.indy.promote.validate.PromoteValidationsManager in project indy by Commonjava.

the class PromotionManagerTest method setup.

@Before
public void setup() throws Exception {
    contentMetadata.clear();
    galleyParts = new GalleyMavenFixture(true, temp);
    galleyParts.initMissingComponents();
    storeManager = new MemoryStoreDataManager(true);
    downloadManager = new DefaultDownloadManager(storeManager, galleyParts.getTransferManager(), new IndyLocationExpander(storeManager), new MockInstance<>(new MockContentAdvisor()));
    DirectContentAccess dca = new DefaultDirectContentAccess(downloadManager, Executors.newSingleThreadExecutor());
    ContentDigester contentDigester = new DefaultContentDigester(dca, new CacheHandle<String, TransferMetadata>("content-metadata", contentMetadata));
    contentManager = new DefaultContentManager(storeManager, downloadManager, new IndyObjectMapper(true), new SpecialPathManagerImpl(), new MemoryNotFoundCache(), contentDigester, Collections.<ContentGenerator>emptySet());
    dataManager = new DataFileManager(temp.newFolder("data"), new DataFileEventManager());
    validationsManager = new PromoteValidationsManager(dataManager, new PromoteConfig(), new ValidationRuleParser(new ScriptEngine(dataManager), new IndyObjectMapper(true)));
    MavenModelProcessor modelProcessor = new MavenModelProcessor();
    validator = new PromotionValidator(validationsManager, new PromotionValidationTools(contentManager, storeManager, galleyParts.getPomReader(), galleyParts.getMavenMetadataReader(), modelProcessor, galleyParts.getTypeMapper(), galleyParts.getTransferManager(), contentDigester), storeManager);
    PromoteConfig config = new PromoteConfig();
    manager = new PromotionManager(validator, contentManager, downloadManager, storeManager, config);
    executor = Executors.newCachedThreadPool();
}
Also used : ValidationRuleParser(org.commonjava.indy.promote.validate.ValidationRuleParser) GalleyMavenFixture(org.commonjava.maven.galley.testing.maven.GalleyMavenFixture) DefaultContentManager(org.commonjava.indy.core.content.DefaultContentManager) MavenModelProcessor(org.commonjava.maven.galley.maven.rel.MavenModelProcessor) SpecialPathManagerImpl(org.commonjava.maven.galley.io.SpecialPathManagerImpl) ContentGenerator(org.commonjava.indy.content.ContentGenerator) DirectContentAccess(org.commonjava.indy.content.DirectContentAccess) DefaultDirectContentAccess(org.commonjava.indy.core.content.DefaultDirectContentAccess) MockInstance(org.commonjava.indy.test.fixture.core.MockInstance) TransferMetadata(org.commonjava.maven.galley.io.checksum.TransferMetadata) IndyObjectMapper(org.commonjava.indy.model.core.io.IndyObjectMapper) MemoryStoreDataManager(org.commonjava.indy.mem.data.MemoryStoreDataManager) IndyLocationExpander(org.commonjava.indy.content.IndyLocationExpander) DefaultDownloadManager(org.commonjava.indy.core.content.DefaultDownloadManager) PromotionValidator(org.commonjava.indy.promote.validate.PromotionValidator) ContentDigester(org.commonjava.indy.content.ContentDigester) DefaultContentDigester(org.commonjava.indy.core.content.DefaultContentDigester) PromotionValidationTools(org.commonjava.indy.promote.validate.PromotionValidationTools) DefaultContentDigester(org.commonjava.indy.core.content.DefaultContentDigester) DataFileEventManager(org.commonjava.indy.subsys.datafile.change.DataFileEventManager) PromoteConfig(org.commonjava.indy.promote.conf.PromoteConfig) MemoryNotFoundCache(org.commonjava.maven.galley.nfc.MemoryNotFoundCache) ScriptEngine(org.commonjava.indy.subsys.template.ScriptEngine) PromoteValidationsManager(org.commonjava.indy.promote.validate.PromoteValidationsManager) DataFileManager(org.commonjava.indy.subsys.datafile.DataFileManager) MockContentAdvisor(org.commonjava.indy.test.fixture.core.MockContentAdvisor) DefaultDirectContentAccess(org.commonjava.indy.core.content.DefaultDirectContentAccess) Before(org.junit.Before)

Aggregations

ContentDigester (org.commonjava.indy.content.ContentDigester)1 ContentGenerator (org.commonjava.indy.content.ContentGenerator)1 DirectContentAccess (org.commonjava.indy.content.DirectContentAccess)1 IndyLocationExpander (org.commonjava.indy.content.IndyLocationExpander)1 DefaultContentDigester (org.commonjava.indy.core.content.DefaultContentDigester)1 DefaultContentManager (org.commonjava.indy.core.content.DefaultContentManager)1 DefaultDirectContentAccess (org.commonjava.indy.core.content.DefaultDirectContentAccess)1 DefaultDownloadManager (org.commonjava.indy.core.content.DefaultDownloadManager)1 MemoryStoreDataManager (org.commonjava.indy.mem.data.MemoryStoreDataManager)1 IndyObjectMapper (org.commonjava.indy.model.core.io.IndyObjectMapper)1 PromoteConfig (org.commonjava.indy.promote.conf.PromoteConfig)1 PromoteValidationsManager (org.commonjava.indy.promote.validate.PromoteValidationsManager)1 PromotionValidationTools (org.commonjava.indy.promote.validate.PromotionValidationTools)1 PromotionValidator (org.commonjava.indy.promote.validate.PromotionValidator)1 ValidationRuleParser (org.commonjava.indy.promote.validate.ValidationRuleParser)1 DataFileManager (org.commonjava.indy.subsys.datafile.DataFileManager)1 DataFileEventManager (org.commonjava.indy.subsys.datafile.change.DataFileEventManager)1 ScriptEngine (org.commonjava.indy.subsys.template.ScriptEngine)1 MockContentAdvisor (org.commonjava.indy.test.fixture.core.MockContentAdvisor)1 MockInstance (org.commonjava.indy.test.fixture.core.MockInstance)1