diff options
author | Martin Stockhammer <martin_s@apache.org> | 2020-05-30 19:58:46 +0200 |
---|---|---|
committer | Martin Stockhammer <martin_s@apache.org> | 2020-05-30 20:00:22 +0200 |
commit | 6d7a510dea283ff8c4b1e6ae54a395dbe386e4a5 (patch) | |
tree | 706add65520704a887961e65c5d2b7d31ac34e46 /archiva-modules/archiva-web/archiva-webdav/src/test | |
parent | ac25c7a86fe77f5b0f005f03d9d28dc1f6f8580e (diff) | |
download | archiva-6d7a510dea283ff8c4b1e6ae54a395dbe386e4a5.tar.gz archiva-6d7a510dea283ff8c4b1e6ae54a395dbe386e4a5.zip |
Refactoring of content interfaces. Adding layout for repository content.
Diffstat (limited to 'archiva-modules/archiva-web/archiva-webdav/src/test')
-rw-r--r-- | archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/ArchivaDavResourceFactoryTest.java | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/ArchivaDavResourceFactoryTest.java b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/ArchivaDavResourceFactoryTest.java index e34221768..e133d2fb3 100644 --- a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/ArchivaDavResourceFactoryTest.java +++ b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/ArchivaDavResourceFactoryTest.java @@ -37,7 +37,7 @@ import org.apache.archiva.configuration.RepositoryGroupConfiguration; import org.apache.archiva.repository.maven.metadata.storage.ArtifactMappingProvider; import org.apache.archiva.proxy.ProxyRegistry; import org.apache.archiva.repository.EditableManagedRepository; -import org.apache.archiva.repository.ManagedRepositoryContent; +import org.apache.archiva.repository.BaseRepositoryContentLayout; import org.apache.archiva.repository.RemoteRepository; import org.apache.archiva.repository.RemoteRepositoryContent; import org.apache.archiva.repository.Repository; @@ -250,11 +250,11 @@ public class ArchivaDavResourceFactoryTest return repoConfig; } - private ManagedRepositoryContent createManagedRepositoryContent( String repoId ) + private BaseRepositoryContentLayout createManagedRepositoryContent( String repoId ) throws RepositoryAdminException { org.apache.archiva.repository.ManagedRepository repo = repositoryRegistry.getManagedRepository( repoId ); - ManagedRepositoryContent repoContent = new ManagedDefaultRepositoryContent(repo, artifactMappingProviders, fileTypes, fileLockManager); + BaseRepositoryContentLayout repoContent = new ManagedDefaultRepositoryContent(repo, artifactMappingProviders, fileTypes, fileLockManager); if (repo!=null && repo instanceof EditableManagedRepository) { ( (EditableManagedRepository) repo ).setContent( repoContent ); @@ -262,7 +262,7 @@ public class ArchivaDavResourceFactoryTest return repoContent; } - private RepositoryContentProvider createRepositoryContentProvider(ManagedRepositoryContent content) { + private RepositoryContentProvider createRepositoryContentProvider( BaseRepositoryContentLayout content) { Set<RepositoryType> TYPES = new HashSet<>( ); TYPES.add(RepositoryType.MAVEN); return new RepositoryContentProvider( ) @@ -294,7 +294,7 @@ public class ArchivaDavResourceFactoryTest } @Override - public ManagedRepositoryContent createManagedContent( org.apache.archiva.repository.ManagedRepository repository ) throws RepositoryException + public BaseRepositoryContentLayout createManagedContent( org.apache.archiva.repository.ManagedRepository repository ) throws RepositoryException { content.setRepository( repository ); return content; @@ -330,8 +330,8 @@ public class ArchivaDavResourceFactoryTest + "/org/apache/archiva/archiva/1.2-SNAPSHOT/archiva-1.2-SNAPSHOT.jar", LOCAL_REPO_GROUP, new ArchivaDavLocatorFactory() ); - ManagedRepositoryContent internalRepo = createManagedRepositoryContent( INTERNAL_REPO ); - ManagedRepositoryContent releasesRepo = createManagedRepositoryContent( RELEASES_REPO ); + BaseRepositoryContentLayout internalRepo = createManagedRepositoryContent( INTERNAL_REPO ); + BaseRepositoryContentLayout releasesRepo = createManagedRepositoryContent( RELEASES_REPO ); try { @@ -407,9 +407,9 @@ public class ArchivaDavResourceFactoryTest config.setRepositoryGroups( repoGroups ); - ManagedRepositoryContent internalRepo = createManagedRepositoryContent( INTERNAL_REPO ); + BaseRepositoryContentLayout internalRepo = createManagedRepositoryContent( INTERNAL_REPO ); - ManagedRepositoryContent releasesRepo = createManagedRepositoryContent( RELEASES_REPO ); + BaseRepositoryContentLayout releasesRepo = createManagedRepositoryContent( RELEASES_REPO ); try { @@ -490,8 +490,8 @@ public class ArchivaDavResourceFactoryTest config.setRepositoryGroups( repoGroups ); - ManagedRepositoryContent internalRepo = createManagedRepositoryContent( INTERNAL_REPO ); - ManagedRepositoryContent localMirrorRepo = createManagedRepositoryContent( LOCAL_MIRROR_REPO ); + BaseRepositoryContentLayout internalRepo = createManagedRepositoryContent( INTERNAL_REPO ); + BaseRepositoryContentLayout localMirrorRepo = createManagedRepositoryContent( LOCAL_MIRROR_REPO ); repositoryRegistry.putRepositoryGroup( repoGroup ); @@ -565,7 +565,7 @@ public class ArchivaDavResourceFactoryTest new ArchivaDavResourceLocator( "", "/repository/" + INTERNAL_REPO + "/eclipse/jdtcore/maven-metadata.xml", INTERNAL_REPO, new ArchivaDavLocatorFactory() ); - ManagedRepositoryContent internalRepo = createManagedRepositoryContent( INTERNAL_REPO ); + BaseRepositoryContentLayout internalRepo = createManagedRepositoryContent( INTERNAL_REPO ); // use actual object (this performs the isMetadata, isDefault and isSupportFile check!) MavenRepositoryRequestInfo repoRequest = new MavenRepositoryRequestInfo(internalRepo.getRepository() ); @@ -622,7 +622,7 @@ public class ArchivaDavResourceFactoryTest new ArchivaDavResourceLocator( "", "/repository/" + INTERNAL_REPO + "/eclipse/maven-metadata.xml", INTERNAL_REPO, new ArchivaDavLocatorFactory() ); - ManagedRepositoryContent internalRepo = createManagedRepositoryContent( INTERNAL_REPO ); + BaseRepositoryContentLayout internalRepo = createManagedRepositoryContent( INTERNAL_REPO ); try { @@ -662,7 +662,7 @@ public class ArchivaDavResourceFactoryTest public void testRequestMetadataRepoIsLegacy() throws Exception { - ManagedRepositoryContent legacyRepo = createManagedRepositoryContent( LEGACY_REPO ); + BaseRepositoryContentLayout legacyRepo = createManagedRepositoryContent( LEGACY_REPO ); ConfigurableListableBeanFactory beanFactory = ((ConfigurableApplicationContext) applicationContext).getBeanFactory(); RepositoryContentProvider provider = createRepositoryContentProvider(legacyRepo ); beanFactory.registerSingleton("repositoryContentProvider#legacy", provider); |