Search in sources :

Example 1 with MaterialPoller

use of com.thoughtworks.go.server.service.materials.MaterialPoller in project gocd by gocd.

the class PluggableSCMMaterialUpdaterIntegrationTest method mockSCMExtensionInPoller.

private void mockSCMExtensionInPoller() {
    Map<Class, MaterialPoller> materialPollerMap = (Map<Class, MaterialPoller>) ReflectionUtil.getField(materialService, "materialPollerMap");
    materialPollerMap.put(PluggableSCMMaterial.class, new PluggableSCMMaterialPoller(materialRepository, scmExtension, transactionTemplate));
    ReflectionUtil.setField(materialService, "materialPollerMap", materialPollerMap);
}
Also used : PluggableSCMMaterialPoller(com.thoughtworks.go.server.service.materials.PluggableSCMMaterialPoller) MaterialPoller(com.thoughtworks.go.server.service.materials.MaterialPoller) PluggableSCMMaterialPoller(com.thoughtworks.go.server.service.materials.PluggableSCMMaterialPoller) HashMap(java.util.HashMap) Map(java.util.Map)

Example 2 with MaterialPoller

use of com.thoughtworks.go.server.service.materials.MaterialPoller in project gocd by gocd.

the class ConfigMaterialUpdater method updateConfigurationFromCheckout.

private void updateConfigurationFromCheckout(File folder, Revision revision, Material material) {
    MaterialPoller poller = this.materialService.getPollerImplementation(material);
    poller.checkout(material, folder, revision, this.subprocessExecutionContext);
    this.repoConfigDataSource.onCheckoutComplete(material.config(), folder, revision.getRevision());
}
Also used : MaterialPoller(com.thoughtworks.go.server.service.materials.MaterialPoller)

Aggregations

MaterialPoller (com.thoughtworks.go.server.service.materials.MaterialPoller)2 PluggableSCMMaterialPoller (com.thoughtworks.go.server.service.materials.PluggableSCMMaterialPoller)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1