Search in sources :

Example 1 with ImpliedRepoMetadataManager

use of org.commonjava.indy.implrepo.data.ImpliedRepoMetadataManager in project indy by Commonjava.

the class ImpliedRepoMaintainerTest method setup.

@Before
public void setup() {
    storeDataManager = new MemoryStoreDataManager(true);
    metadataManager = new ImpliedRepoMetadataManager(new IndyObjectMapper(true));
    final ImpliedRepoConfig config = new ImpliedRepoConfig();
    config.setEnabled(true);
    maintainer = new ImpliedRepoMaintainer(storeDataManager, metadataManager, config);
    summary = new ChangeSummary(ChangeSummary.SYSTEM_USER, "test setup");
}
Also used : IndyObjectMapper(org.commonjava.indy.model.core.io.IndyObjectMapper) MemoryStoreDataManager(org.commonjava.indy.mem.data.MemoryStoreDataManager) ImpliedRepoMetadataManager(org.commonjava.indy.implrepo.data.ImpliedRepoMetadataManager) ImpliedRepoConfig(org.commonjava.indy.implrepo.conf.ImpliedRepoConfig) ChangeSummary(org.commonjava.indy.audit.ChangeSummary) Before(org.junit.Before)

Example 2 with ImpliedRepoMetadataManager

use of org.commonjava.indy.implrepo.data.ImpliedRepoMetadataManager in project indy by Commonjava.

the class ImpliedRepositoryDetectorTest method setup.

@Before
public void setup() throws Throwable {
    fixture = new GalleyMavenFixture(temp);
    fixture.initGalley();
    fixture.withEnabledTransports(new HttpClientTransport(new HttpImpl(new MemoryPasswordManager())));
    fixture.before();
    storeManager = new MemoryStoreDataManager(true);
    metadataManager = new ImpliedRepoMetadataManager(new IndyObjectMapper(true));
    final ImpliedRepoConfig config = new ImpliedRepoConfig();
    config.setEnabled(true);
    File rootDir = temp.newFolder("indy.root");
    final DataFileManager dataFiles = new DataFileManager(rootDir, new DataFileEventManager());
    validator = new ArtifactStoreValidator(fixture.getTransferManager());
    ScriptEngine engine = new ScriptEngine(dataFiles);
    detector = new TestImpliedRepositoryDetector(fixture.getPomReader(), storeManager, metadataManager, validator, engine, config);
    summary = new ChangeSummary(ChangeSummary.SYSTEM_USER, "test setup");
    RemoteRepository remote = new RemoteRepository("test", "http://www.foo.com/repo");
    Group group = new Group("group", remote.getKey());
    storeManager.storeArtifactStore(remote, summary, false, true, new EventMetadata());
    storeManager.storeArtifactStore(group, summary, false, true, new EventMetadata());
    server.expect("HEAD", server.formatUrl("/repo/"), 200, "");
}
Also used : Group(org.commonjava.indy.model.core.Group) ArtifactStoreValidator(org.commonjava.indy.data.ArtifactStoreValidator) DataFileEventManager(org.commonjava.indy.subsys.datafile.change.DataFileEventManager) ImpliedRepoMetadataManager(org.commonjava.indy.implrepo.data.ImpliedRepoMetadataManager) RemoteRepository(org.commonjava.indy.model.core.RemoteRepository) MemoryPasswordManager(org.commonjava.maven.galley.auth.MemoryPasswordManager) GalleyMavenFixture(org.commonjava.maven.galley.testing.maven.GalleyMavenFixture) HttpImpl(org.commonjava.maven.galley.transport.htcli.HttpImpl) ScriptEngine(org.commonjava.indy.subsys.template.ScriptEngine) EventMetadata(org.commonjava.maven.galley.event.EventMetadata) HttpClientTransport(org.commonjava.maven.galley.transport.htcli.HttpClientTransport) IndyObjectMapper(org.commonjava.indy.model.core.io.IndyObjectMapper) MemoryStoreDataManager(org.commonjava.indy.mem.data.MemoryStoreDataManager) DataFileManager(org.commonjava.indy.subsys.datafile.DataFileManager) ImpliedRepoConfig(org.commonjava.indy.implrepo.conf.ImpliedRepoConfig) ChangeSummary(org.commonjava.indy.audit.ChangeSummary) File(java.io.File) Before(org.junit.Before)

Example 3 with ImpliedRepoMetadataManager

use of org.commonjava.indy.implrepo.data.ImpliedRepoMetadataManager in project indy by Commonjava.

the class ImpliedRepoClientModule method setup.

@Override
protected void setup(final Indy client, final IndyClientHttp http) {
    super.setup(client, http);
    this.metadataManager = new ImpliedRepoMetadataManager(getObjectMapper());
}
Also used : ImpliedRepoMetadataManager(org.commonjava.indy.implrepo.data.ImpliedRepoMetadataManager)

Aggregations

ImpliedRepoMetadataManager (org.commonjava.indy.implrepo.data.ImpliedRepoMetadataManager)3 ChangeSummary (org.commonjava.indy.audit.ChangeSummary)2 ImpliedRepoConfig (org.commonjava.indy.implrepo.conf.ImpliedRepoConfig)2 MemoryStoreDataManager (org.commonjava.indy.mem.data.MemoryStoreDataManager)2 IndyObjectMapper (org.commonjava.indy.model.core.io.IndyObjectMapper)2 Before (org.junit.Before)2 File (java.io.File)1 ArtifactStoreValidator (org.commonjava.indy.data.ArtifactStoreValidator)1 Group (org.commonjava.indy.model.core.Group)1 RemoteRepository (org.commonjava.indy.model.core.RemoteRepository)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 MemoryPasswordManager (org.commonjava.maven.galley.auth.MemoryPasswordManager)1 EventMetadata (org.commonjava.maven.galley.event.EventMetadata)1 GalleyMavenFixture (org.commonjava.maven.galley.testing.maven.GalleyMavenFixture)1 HttpClientTransport (org.commonjava.maven.galley.transport.htcli.HttpClientTransport)1 HttpImpl (org.commonjava.maven.galley.transport.htcli.HttpImpl)1