]> source.dussan.org Git - archiva.git/commitdiff
Separating content and layout interfaces
authorMartin Stockhammer <martin_s@apache.org>
Tue, 2 Jun 2020 11:37:35 +0000 (13:37 +0200)
committerMartin Stockhammer <martin_s@apache.org>
Tue, 2 Jun 2020 11:37:35 +0000 (13:37 +0200)
28 files changed:
archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/main/java/SimpleArtifactConsumer.java
archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/MetadataUpdaterConsumer.java
archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/CleanupReleasedSnapshotsRepositoryPurge.java
archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/BaseRepositoryContentLayout.java
archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/base/ArtifactUtil.java
archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/metadata/base/MetadataTools.java
archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/mock/ManagedRepositoryContentMock.java
archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/mock/RepositoryContentProviderMock.java
archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/mock/ManagedRepositoryContentMock.java
archiva-modules/archiva-maven/archiva-maven-proxy/src/test/java/org/apache/archiva/proxy/CacheFailuresTransferTest.java
archiva-modules/archiva-maven/archiva-maven-proxy/src/test/java/org/apache/archiva/proxy/ChecksumTransferTest.java
archiva-modules/archiva-maven/archiva-maven-proxy/src/test/java/org/apache/archiva/proxy/ErrorHandlingTest.java
archiva-modules/archiva-maven/archiva-maven-proxy/src/test/java/org/apache/archiva/proxy/HttpProxyTransferTest.java
archiva-modules/archiva-maven/archiva-maven-proxy/src/test/java/org/apache/archiva/proxy/ManagedDefaultTransferTest.java
archiva-modules/archiva-maven/archiva-maven-proxy/src/test/java/org/apache/archiva/proxy/SnapshotTransferTest.java
archiva-modules/archiva-maven/archiva-maven-proxy/src/test/java/org/apache/archiva/repository/mock/RepositoryContentProviderMock.java
archiva-modules/archiva-maven/archiva-maven-repository/src/main/java/org/apache/archiva/repository/maven/content/ManagedDefaultRepositoryContent.java
archiva-modules/archiva-maven/archiva-maven-repository/src/main/java/org/apache/archiva/repository/maven/content/MavenContentProvider.java
archiva-modules/archiva-maven/archiva-maven-repository/src/main/java/org/apache/archiva/repository/maven/content/MavenRepositoryRequestInfo.java
archiva-modules/archiva-maven/archiva-maven-repository/src/test/java/org/apache/archiva/repository/maven/content/AbstractBaseRepositoryContentLayoutTest.java
archiva-modules/archiva-maven/archiva-maven-repository/src/test/java/org/apache/archiva/repository/maven/content/AbstractRepositoryContentTest.java
archiva-modules/archiva-maven/archiva-maven-repository/src/test/java/org/apache/archiva/repository/maven/content/ManagedDefaultRepositoryContentTest.java
archiva-modules/archiva-maven/archiva-maven-repository/src/test/java/org/apache/archiva/repository/maven/content/RemoteDefaultRepositoryContentTest.java
archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/TestConsumer.java
archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoriesService.java
archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/utils/ArtifactBuilder.java
archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java
archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/ArchivaDavResourceFactoryTest.java

index bf2faa947b7ae80bff89581ecd5f55adf974765b..f1a219b1429ec6c68a26ae7298d6e7ab33518ec1 100644 (file)
@@ -126,7 +126,7 @@ public class SimpleArtifactConsumer
         {
             ManagedRepositoryContent repositoryContent = repository.getContent();
             BaseRepositoryContentLayout layout = repositoryContent.getLayout( BaseRepositoryContentLayout.class );
-            ArtifactReference artifact = layout.toArtifactReference( path );
+            ArtifactReference artifact = repositoryContent.toArtifactReference( path );
 
             repositorySession.getRepository().getArtifacts( repositorySession, repository.getId(), artifact.getGroupId(),
                                                             artifact.getArtifactId(), artifact.getVersion() );
index f7f9ef7303bf477fd4c0aeb5aa5e97cee2ca9bd9..3cd973e6b7cc452fd608b7b79b356c65970a93a9 100644 (file)
@@ -174,7 +174,7 @@ public class MetadataUpdaterConsumer
         {
             try
             {
-                ArtifactReference artifact = repository.getLayout( BaseRepositoryContentLayout.class ).toArtifactReference( path );
+                ArtifactReference artifact = repository.toArtifactReference( path );
                 updateVersionMetadata( artifact, path );
                 updateProjectMetadata( artifact, path );
             }
index 5142ed94cf924b6f61f461adb0e42d602f4897e6..069730689e928f9039ff0cef1ddcdd44a0f1cd3f 100644 (file)
@@ -100,7 +100,7 @@ public class CleanupReleasedSnapshotsRepositoryPurge
                 return;
             }
 
-            ArtifactReference artifactRef = repository.getLayout( BaseRepositoryContentLayout.class ).toArtifactReference( path );
+            ArtifactReference artifactRef = repository.toArtifactReference( path );
 
             if ( !VersionUtil.isSnapshot( artifactRef.getVersion( ) ) )
             {
index e08ed3cb338d745b1ac3c07535009df9d055fab8..c71d757ebca77ae9017aade590c61af2cced879c 100644 (file)
@@ -43,7 +43,7 @@ import java.util.stream.Stream;
  *
  * 
  */
-public interface BaseRepositoryContentLayout extends RepositoryContent, ManagedRepositoryContent, ManagedRepositoryContentLayout
+public interface BaseRepositoryContentLayout extends ManagedRepositoryContentLayout
 {
 
     /// *****************   New generation interface **********************
index 317f19abe4ae69d2f5af06cb273ec493054cc32e..fe964b945b15e9ae859bd804e08e43505288c48e 100644 (file)
@@ -55,14 +55,7 @@ public class ArtifactUtil
     {
         final ManagedRepositoryContent content = repositoryContentFactory.getManagedRepositoryContent( repository );
         final String artifactPath;
-        try
-        {
-            artifactPath = content.getLayout( BaseRepositoryContentLayout.class ).toPath( artifactReference );
-        }
-        catch ( LayoutException e )
-        {
-            throw new RepositoryException( "Could not convert to layout BaseRepositoryContentLayout" );
-        }
+        artifactPath = content.toPath( artifactReference );
         return Paths.get( repository.getLocation( ) ).resolve( artifactPath );
     }
 
@@ -79,14 +72,7 @@ public class ArtifactUtil
     {
         final ManagedRepositoryContent content = repositoryContentFactory.getManagedRepositoryContent( repository );
         final String artifactPath;
-        try
-        {
-            artifactPath = content.getLayout( BaseRepositoryContentLayout.class ).toPath( artifactReference );
-        }
-        catch ( LayoutException e )
-        {
-            throw new RepositoryException( "Could not convert to layout BaseRepositoryContentLayout" );
-        }
+        artifactPath = content.toPath( artifactReference );
         return repository.getAsset( artifactPath );
     }
 
index f7ddd36f958f46af668d353c02d089a2e92b23f4..a31554bb13fdaa0eaabbe9ade9948ae9609ba99e 100644 (file)
@@ -956,7 +956,7 @@ public class MetadataTools
                 PathUtil.getRelative( managedRepository.getRepoRoot(), path1 )
             ).filter( filetypes::matchesArtifactPattern ).findFirst().orElse( null );
             if (result!=null) {
-                return managedRepository.toArtifactReference( result );
+                return managedRepository.getGenericContent().toArtifactReference( result );
             }
         }
         // No artifact was found.
index bc4569aaceacfc3929764f2372427253439a87ac..435e889e064d67fe5187f83bbefe9b9077bdf2f6 100644 (file)
@@ -57,7 +57,7 @@ import java.util.stream.Stream;
  * @author Martin Stockhammer <martin_s@apache.org>
  */
 @Service("managedRepositoryContent#mock")
-public class ManagedRepositoryContentMock implements BaseRepositoryContentLayout
+public class ManagedRepositoryContentMock implements BaseRepositoryContentLayout, ManagedRepositoryContent
 {
     private ManagedRepository repository;
 
index 5c9b818e0b6b6b629f316597cce1a96cdcd8f121..710bad50f9fb00d90a6681544527fd8d85f0d881 100644 (file)
@@ -21,6 +21,7 @@ package org.apache.archiva.repository.mock;
 
 import org.apache.archiva.repository.ManagedRepository;
 import org.apache.archiva.repository.BaseRepositoryContentLayout;
+import org.apache.archiva.repository.ManagedRepositoryContent;
 import org.apache.archiva.repository.RemoteRepository;
 import org.apache.archiva.repository.RemoteRepositoryContent;
 import org.apache.archiva.repository.Repository;
@@ -63,7 +64,7 @@ public class RepositoryContentProviderMock implements RepositoryContentProvider
     }
 
     @Override
-    public BaseRepositoryContentLayout createManagedContent( ManagedRepository repository) throws RepositoryException {
+    public ManagedRepositoryContent createManagedContent( ManagedRepository repository) throws RepositoryException {
         return new ManagedRepositoryContentMock();
     }
 
index 89f5169270b15706f1a729c6741565c7a5e0fd0f..16a6adcf43670df66809b8da25af38b775c531bb 100644 (file)
@@ -57,7 +57,7 @@ import java.util.stream.Stream;
 /**
  * @author Martin Stockhammer <martin_s@apache.org>
  */
-public class ManagedRepositoryContentMock implements BaseRepositoryContentLayout
+public class ManagedRepositoryContentMock implements BaseRepositoryContentLayout, ManagedRepositoryContent
 {
     private static final String PATH_SEPARATOR = "/";
     private static final String GROUP_SEPARATOR = ".";
index 15b1755294edb9162dc4d1aa1ef03a40fec4e59f..5afb561e37160aa1aaa57838b11ff4f6e67e9bf4 100644 (file)
@@ -64,7 +64,7 @@ public class CacheFailuresTransferTest
         assertNotExistsInManagedDefaultRepo( expectedFile );
 
         BaseRepositoryContentLayout layout = managedDefaultRepository.getLayout( BaseRepositoryContentLayout.class );
-        ArtifactReference artifact = layout.toArtifactReference( path );
+        ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
 
         // Configure Repository (usually done within archiva.xml configuration)
         saveRemoteRepositoryConfig( "badproxied1", "Bad Proxied 1", "http://bad.machine.com/repo/", "default" );
@@ -109,7 +109,7 @@ public class CacheFailuresTransferTest
         assertNotExistsInManagedDefaultRepo( expectedFile );
 
         BaseRepositoryContentLayout layout = managedDefaultRepository.getLayout( BaseRepositoryContentLayout.class );
-        ArtifactReference artifact = layout.toArtifactReference( path );
+        ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
 
         // Configure Repository (usually done within archiva.xml configuration)
         saveRemoteRepositoryConfig( "badproxied1", "Bad Proxied 1", "http://bad.machine.com/repo/", "default" );
@@ -155,7 +155,7 @@ public class CacheFailuresTransferTest
         setupTestableManagedRepository( path );
         Path expectedFile = managedDefaultDir.resolve( path );
         BaseRepositoryContentLayout layout = managedDefaultRepository.getLayout( BaseRepositoryContentLayout.class );
-        ArtifactReference artifact = layout.toArtifactReference( path );
+        ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
 
         Files.deleteIfExists( expectedFile );
         assertFalse( Files.exists( expectedFile ) );
index 8f3664c10d28ccf89b32ff91a83674ab7ef46e81..8a32ac08d4479c75f7a37a734ab30dea144f4e70 100644 (file)
@@ -56,7 +56,7 @@ public class ChecksumTransferTest
         Path expectedFile = managedDefaultDir.resolve( path );
 
         BaseRepositoryContentLayout layout = managedDefaultRepository.getLayout( BaseRepositoryContentLayout.class );
-        ArtifactReference artifact = layout.toArtifactReference( path );
+        ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
 
         org.apache.archiva.common.utils.FileUtils.deleteDirectory( expectedFile.getParent( ) );
         assertFalse( Files.exists( expectedFile ) );
@@ -79,7 +79,7 @@ public class ChecksumTransferTest
 
         Path expectedFile = managedDefaultDir.resolve( path );
         BaseRepositoryContentLayout layout = managedDefaultRepository.getLayout( BaseRepositoryContentLayout.class );
-        ArtifactReference artifact = layout.toArtifactReference( path );
+        ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
 
         org.apache.archiva.common.utils.FileUtils.deleteDirectory( expectedFile.getParent( ) );
         assertFalse( Files.exists( expectedFile ) );
@@ -106,7 +106,7 @@ public class ChecksumTransferTest
 
         Path expectedFile = managedDefaultDir.resolve( path );
         BaseRepositoryContentLayout layout = managedDefaultRepository.getLayout( BaseRepositoryContentLayout.class );
-        ArtifactReference artifact = layout.toArtifactReference( path );
+        ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
 
         FileUtils.deleteDirectory( expectedFile.getParent( ) );
         assertFalse( Files.exists( expectedFile ) );
@@ -133,7 +133,7 @@ public class ChecksumTransferTest
 
         Path expectedFile = managedDefaultDir.resolve( path );
         BaseRepositoryContentLayout layout = managedDefaultRepository.getLayout( BaseRepositoryContentLayout.class );
-        ArtifactReference artifact = layout.toArtifactReference( path );
+        ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
 
         FileUtils.deleteDirectory( expectedFile.getParent( ) );
         assertFalse( Files.exists( expectedFile ) );
@@ -159,7 +159,7 @@ public class ChecksumTransferTest
 
         Path expectedFile = managedDefaultDir.resolve( path );
         BaseRepositoryContentLayout layout = managedDefaultRepository.getLayout( BaseRepositoryContentLayout.class );
-        ArtifactReference artifact = layout.toArtifactReference( path );
+        ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
 
         FileUtils.deleteDirectory( expectedFile.getParent( ) );
         assertFalse( Files.exists( expectedFile ) );
@@ -185,7 +185,7 @@ public class ChecksumTransferTest
 
         Path expectedFile = managedDefaultDir.resolve( path );
         BaseRepositoryContentLayout layout = managedDefaultRepository.getLayout( BaseRepositoryContentLayout.class );
-        ArtifactReference artifact = layout.toArtifactReference( path );
+        ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
 
         FileUtils.deleteDirectory( expectedFile.getParent( ) );
         assertFalse( Files.exists( expectedFile ) );
@@ -211,7 +211,7 @@ public class ChecksumTransferTest
 
         Path expectedFile = managedDefaultDir.resolve( path );
         BaseRepositoryContentLayout layout = managedDefaultRepository.getLayout( BaseRepositoryContentLayout.class );
-        ArtifactReference artifact = layout.toArtifactReference( path );
+        ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
 
         FileUtils.deleteDirectory( expectedFile.getParent( ) );
         assertFalse( Files.exists( expectedFile ) );
@@ -235,7 +235,7 @@ public class ChecksumTransferTest
 
         Path expectedFile = managedDefaultDir.resolve( path );
         BaseRepositoryContentLayout layout = managedDefaultRepository.getLayout( BaseRepositoryContentLayout.class );
-        ArtifactReference artifact = layout.toArtifactReference( path );
+        ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
 
         FileUtils.deleteDirectory( expectedFile.getParent( ) );
         assertFalse( Files.exists( expectedFile ) );
@@ -262,7 +262,7 @@ public class ChecksumTransferTest
 
         Path expectedFile = managedDefaultDir.resolve( path );
         BaseRepositoryContentLayout layout = managedDefaultRepository.getLayout( BaseRepositoryContentLayout.class );
-        ArtifactReference artifact = layout.toArtifactReference( path );
+        ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
 
         FileUtils.deleteDirectory( expectedFile.getParent( ) );
         assertFalse( Files.exists( expectedFile ) );
@@ -286,7 +286,7 @@ public class ChecksumTransferTest
 
         Path expectedFile = managedDefaultDir.resolve( path );
         BaseRepositoryContentLayout layout = managedDefaultRepository.getLayout( BaseRepositoryContentLayout.class );
-        ArtifactReference artifact = layout.toArtifactReference( path );
+        ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
 
         FileUtils.deleteDirectory( expectedFile.getParent( ) );
         assertFalse( Files.exists( expectedFile ) );
@@ -313,7 +313,7 @@ public class ChecksumTransferTest
 
         Path expectedFile = managedDefaultDir.resolve( path );
         BaseRepositoryContentLayout layout = managedDefaultRepository.getLayout( BaseRepositoryContentLayout.class );
-        ArtifactReference artifact = layout.toArtifactReference( path );
+        ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
 
         FileUtils.deleteDirectory( expectedFile.getParent( ) );
         assertFalse( Files.exists( expectedFile ) );
@@ -337,7 +337,7 @@ public class ChecksumTransferTest
 
         Path expectedFile = managedDefaultDir.resolve( path );
         BaseRepositoryContentLayout layout = managedDefaultRepository.getLayout( BaseRepositoryContentLayout.class );
-        ArtifactReference artifact = layout.toArtifactReference( path );
+        ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
 
         FileUtils.deleteDirectory( expectedFile.getParent( ) );
         assertFalse( Files.exists( expectedFile ) );
@@ -364,7 +364,7 @@ public class ChecksumTransferTest
 
         Path expectedFile = managedDefaultDir.resolve( path );
         BaseRepositoryContentLayout layout = managedDefaultRepository.getLayout( BaseRepositoryContentLayout.class );
-        ArtifactReference artifact = layout.toArtifactReference( path );
+        ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
 
         FileUtils.deleteDirectory( expectedFile.getParent( ) );
         assertFalse( Files.exists( expectedFile ) );
@@ -392,7 +392,7 @@ public class ChecksumTransferTest
 
         Path expectedFile = managedDefaultDir.resolve( path );
         BaseRepositoryContentLayout layout = managedDefaultRepository.getLayout( BaseRepositoryContentLayout.class );
-        ArtifactReference artifact = layout.toArtifactReference( path );
+        ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
 
         FileUtils.deleteDirectory( expectedFile.getParent( ) );
         assertFalse( Files.exists( expectedFile ) );
@@ -419,7 +419,7 @@ public class ChecksumTransferTest
 
         Path expectedFile = managedDefaultDir.resolve( path );
         BaseRepositoryContentLayout layout = managedDefaultRepository.getLayout( BaseRepositoryContentLayout.class );
-        ArtifactReference artifact = layout.toArtifactReference( path );
+        ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
 
         FileUtils.deleteDirectory( expectedFile.getParent( ) );
         assertFalse( Files.exists( expectedFile ) );
@@ -446,7 +446,7 @@ public class ChecksumTransferTest
 
         Path expectedFile = managedDefaultDir.resolve( path );
         BaseRepositoryContentLayout layout = managedDefaultRepository.getLayout( BaseRepositoryContentLayout.class );
-        ArtifactReference artifact = layout.toArtifactReference( path );
+        ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
 
         FileUtils.deleteDirectory( expectedFile.getParent( ) );
         assertFalse( Files.exists( expectedFile.getParent( ) ) );
@@ -501,7 +501,7 @@ public class ChecksumTransferTest
         setManagedOlderThanRemote( expectedFile, remoteFile );
 
         BaseRepositoryContentLayout layout = managedDefaultRepository.getLayout( BaseRepositoryContentLayout.class );
-        ArtifactReference artifact = layout.toArtifactReference( path );
+        ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
 
         // Configure Connector (usually done within archiva.xml configuration)
         saveConnector( ID_DEFAULT_MANAGED, "proxied1", ChecksumPolicy.IGNORE, ReleasesPolicy.ALWAYS,
@@ -529,7 +529,7 @@ public class ChecksumTransferTest
         setManagedOlderThanRemote( expectedFile, remoteFile );
 
         BaseRepositoryContentLayout layout = managedDefaultRepository.getLayout( BaseRepositoryContentLayout.class );
-        ArtifactReference artifact = layout.toArtifactReference( path );
+        ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
 
         // Configure Connector (usually done within archiva.xml configuration)
         saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, ChecksumPolicy.FAIL, ReleasesPolicy.ALWAYS,
@@ -558,7 +558,7 @@ public class ChecksumTransferTest
         setManagedOlderThanRemote( expectedFile, remoteFile );
 
         BaseRepositoryContentLayout layout = managedDefaultRepository.getLayout( BaseRepositoryContentLayout.class );
-        ArtifactReference artifact = layout.toArtifactReference( path );
+        ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
 
         // Configure Connector (usually done within archiva.xml configuration)
         saveConnector( ID_DEFAULT_MANAGED, "proxied1", ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
index 37eca4e755b73a523a8152492f2b73567f02faa5..baccc1717f550efd03b7f5b5bb4d0a092db9c537 100644 (file)
@@ -599,7 +599,7 @@ public class ErrorHandlingTest
         {
             BaseRepositoryContentLayout layout = managedDefaultRepository.getLayout( BaseRepositoryContentLayout.class );
             downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository.getRepository(),
-                                                            layout.toArtifactReference( path ) );
+                managedDefaultRepository.toArtifactReference( path ) );
             fail( "Proxy should not have succeeded" );
         }
         catch ( ProxyDownloadException e )
@@ -642,7 +642,7 @@ public class ErrorHandlingTest
         BaseRepositoryContentLayout layout = managedDefaultRepository.getLayout( BaseRepositoryContentLayout.class );
 
         StorageAsset downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository.getRepository(),
-                                                             layout.toArtifactReference( path ) );
+            managedDefaultRepository.toArtifactReference( path ) );
 
         wagonMockControl.verify();
         return downloadedFile;
index 9558a5c015c45a2bc33bb5d5ecc5cf4e8949a694..2a028ab59a26fe5b21ff09958ee64aef73d5cdb0 100644 (file)
@@ -222,7 +222,7 @@ public class HttpProxyTransferTest
         BaseRepositoryContentLayout layout = managedDefaultRepository.getLayout( BaseRepositoryContentLayout.class );
         Path expectedFile = managedDefaultRepository.getRepository().getAsset( "" ).resolve( path ).getFilePath();
         Files.deleteIfExists( expectedFile );
-        ArtifactReference artifact = layout.toArtifactReference( path );
+        ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
 
         // Attempt the proxy fetch.
         StorageAsset downloadedFile = proxyHandler.fetchFromProxies( managedDefaultRepository.getRepository(), artifact );
index 84be7896e7ddf4779e25db9ffae98e740019dbc3..a4025894b91d58c2c8a17629bd8ec6aa095a9f1d 100644 (file)
@@ -59,7 +59,7 @@ public class ManagedDefaultTransferTest
 
         BaseRepositoryContentLayout layout = managedDefaultRepository.getLayout( BaseRepositoryContentLayout.class );
 
-        ArtifactReference artifact = layout.toArtifactReference( path );
+        ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
 
         // Ensure file isn't present first.
         assertNotExistsInManagedDefaultRepo( expectedFile );
@@ -84,7 +84,7 @@ public class ManagedDefaultTransferTest
 
         BaseRepositoryContentLayout layout = managedDefaultRepository.getLayout( BaseRepositoryContentLayout.class );
 
-        ArtifactReference artifact = layout.toArtifactReference( path );
+        ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
 
         // Ensure file isn't present first.
         assertNotExistsInManagedDefaultRepo( expectedFile );
@@ -147,7 +147,7 @@ public class ManagedDefaultTransferTest
 
         BaseRepositoryContentLayout layout = managedDefaultRepository.getLayout( BaseRepositoryContentLayout.class );
 
-        ArtifactReference artifact = layout.toArtifactReference( path );
+        ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
 
         assertTrue( Files.exists(expectedFile) );
 
@@ -230,7 +230,7 @@ public class ManagedDefaultTransferTest
 
         BaseRepositoryContentLayout layout = managedDefaultRepository.getLayout( BaseRepositoryContentLayout.class );
 
-        ArtifactReference artifact = layout.toArtifactReference( path );
+        ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
 
         assertTrue( Files.exists(expectedFile) );
 
@@ -277,7 +277,7 @@ public class ManagedDefaultTransferTest
 
         BaseRepositoryContentLayout layout = managedDefaultRepository.getLayout( BaseRepositoryContentLayout.class );
 
-        ArtifactReference artifact = layout.toArtifactReference( path );
+        ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
 
         assertTrue( Files.exists(expectedFile) );
 
@@ -311,7 +311,7 @@ public class ManagedDefaultTransferTest
 
         BaseRepositoryContentLayout layout = managedDefaultRepository.getLayout( BaseRepositoryContentLayout.class );
 
-        ArtifactReference artifact = layout.toArtifactReference( path );
+        ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
 
         assertTrue( Files.exists(expectedFile) );
         Files.setLastModifiedTime( expectedFile, FileTime.from(getPastDate().getTime(), TimeUnit.MILLISECONDS ));
@@ -339,7 +339,7 @@ public class ManagedDefaultTransferTest
 
         BaseRepositoryContentLayout layout = managedDefaultRepository.getLayout( BaseRepositoryContentLayout.class );
 
-        ArtifactReference artifact = layout.toArtifactReference( path );
+        ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
 
         assertNotExistsInManagedDefaultRepo( expectedFile );
 
@@ -373,7 +373,7 @@ public class ManagedDefaultTransferTest
 
         BaseRepositoryContentLayout layout = managedDefaultRepository.getLayout( BaseRepositoryContentLayout.class );
 
-        ArtifactReference artifact = layout.toArtifactReference( path );
+        ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
 
         assertNotExistsInManagedDefaultRepo( expectedFile );
 
@@ -400,7 +400,7 @@ public class ManagedDefaultTransferTest
 
         BaseRepositoryContentLayout layout = managedDefaultRepository.getLayout( BaseRepositoryContentLayout.class );
 
-        ArtifactReference artifact = layout.toArtifactReference( path );
+        ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
 
         assertNotExistsInManagedDefaultRepo( expectedFile );
 
@@ -427,7 +427,7 @@ public class ManagedDefaultTransferTest
 
         BaseRepositoryContentLayout layout = managedDefaultRepository.getLayout( BaseRepositoryContentLayout.class );
 
-        ArtifactReference artifact = layout.toArtifactReference( path );
+        ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
 
         assertNotExistsInManagedDefaultRepo( expectedFile );
 
@@ -464,7 +464,7 @@ public class ManagedDefaultTransferTest
 
         BaseRepositoryContentLayout layout = managedDefaultRepository.getLayout( BaseRepositoryContentLayout.class );
 
-        ArtifactReference artifact = layout.toArtifactReference( path );
+        ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
 
         assertNotExistsInManagedDefaultRepo( expectedFile );
 
index 5b720a8b920d162e8eae391d042cf766ab8d2f92..e15bbfb1d1f1dfbbee2d10b1aadaad8047c040b1 100644 (file)
@@ -54,7 +54,7 @@ public class SnapshotTransferTest
         
         Path expectedFile = managedDefaultDir.resolve(path);
         BaseRepositoryContentLayout layout = managedDefaultRepository.getLayout( BaseRepositoryContentLayout.class );
-        ArtifactReference artifact = layout.toArtifactReference( path );
+        ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
 
         Files.deleteIfExists(expectedFile);
         assertFalse( Files.exists(expectedFile) );
@@ -77,7 +77,7 @@ public class SnapshotTransferTest
         Path expectedFile = managedDefaultDir.resolve(path);
         BaseRepositoryContentLayout layout = managedDefaultRepository.getLayout( BaseRepositoryContentLayout.class );
 
-        ArtifactReference artifact = layout.toArtifactReference( path );
+        ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
 
         Files.deleteIfExists(expectedFile);
         assertFalse( Files.exists(expectedFile) );
@@ -102,7 +102,7 @@ public class SnapshotTransferTest
         Path expectedFile = managedDefaultDir.resolve(path);
         BaseRepositoryContentLayout layout = managedDefaultRepository.getLayout( BaseRepositoryContentLayout.class );
 
-        ArtifactReference artifact = layout.toArtifactReference( path );
+        ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
 
         assertTrue( Files.exists(expectedFile) );
         Files.setLastModifiedTime( expectedFile, FileTime.from( getPastDate().getTime(), TimeUnit.MILLISECONDS ));
@@ -131,7 +131,7 @@ public class SnapshotTransferTest
 
         BaseRepositoryContentLayout layout = managedDefaultRepository.getLayout( BaseRepositoryContentLayout.class );
 
-        ArtifactReference artifact = layout.toArtifactReference( path );
+        ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
 
         // Configure Connector (usually done within archiva.xml configuration)
         saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, false );
@@ -220,7 +220,7 @@ public class SnapshotTransferTest
         
         Path expectedFile = managedDefaultDir.resolve(path);
         BaseRepositoryContentLayout layout = managedDefaultRepository.getLayout( BaseRepositoryContentLayout.class );
-        ArtifactReference artifact = layout.toArtifactReference( path );
+        ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
 
         assertTrue( Files.exists(expectedFile) );
 
@@ -251,7 +251,7 @@ public class SnapshotTransferTest
 
         BaseRepositoryContentLayout layout = managedDefaultRepository.getLayout( BaseRepositoryContentLayout.class );
 
-        ArtifactReference artifact = layout.toArtifactReference( path );
+        ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
 
         // Configure Connector (usually done within archiva.xml configuration)
         saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, false);
@@ -274,7 +274,7 @@ public class SnapshotTransferTest
 
         BaseRepositoryContentLayout layout = managedDefaultRepository.getLayout( BaseRepositoryContentLayout.class );
 
-        ArtifactReference artifact = layout.toArtifactReference( path );
+        ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
 
         Files.deleteIfExists(expectedFile);
         assertFalse( Files.exists(expectedFile) );
@@ -303,7 +303,7 @@ public class SnapshotTransferTest
 
         BaseRepositoryContentLayout layout = managedDefaultRepository.getLayout( BaseRepositoryContentLayout.class );
 
-        ArtifactReference artifact = layout.toArtifactReference( path );
+        ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
 
         Files.deleteIfExists(expectedFile);
         assertFalse( Files.exists(expectedFile) );
@@ -332,7 +332,7 @@ public class SnapshotTransferTest
 
         BaseRepositoryContentLayout layout = managedDefaultRepository.getLayout( BaseRepositoryContentLayout.class );
 
-        ArtifactReference artifact = layout.toArtifactReference( path );
+        ArtifactReference artifact = managedDefaultRepository.toArtifactReference( path );
 
         assertTrue( Files.exists(expectedFile) );
 
index b4d6c52a4dac890d5f1b6749d5fb9a4a99f0a7e2..a84fb1a4856dfdb04316e1509f808b9709145bbe 100644 (file)
@@ -55,7 +55,7 @@ public class RepositoryContentProviderMock implements RepositoryContentProvider
     }
 
     @Override
-    public BaseRepositoryContentLayout createManagedContent( ManagedRepository repository) throws RepositoryException {
+    public ManagedRepositoryContent createManagedContent( ManagedRepository repository) throws RepositoryException {
         return new ManagedRepositoryContentMock(repository);
     }
 
index ab311ee361f1830e5056315e5e0386cc9b9968e4..5906c5695451f67fec4d6a25e8e9e19cca73ca7e 100644 (file)
@@ -84,7 +84,7 @@ import java.util.stream.Stream;
  */
 public class ManagedDefaultRepositoryContent
     extends AbstractDefaultRepositoryContent
-    implements BaseRepositoryContentLayout
+    implements ManagedRepositoryContent, BaseRepositoryContentLayout
 {
 
     // attribute flag that marks version objects that point to a snapshot artifact version
index 95bb042f44b9f1e0f04194c6992e262de5fe2d20..39ebc2b3cd6e4c24b50e08b13c52fdf11c86e311 100644 (file)
@@ -20,6 +20,7 @@ package org.apache.archiva.repository.maven.content;
 
 import org.apache.archiva.common.filelock.FileLockManager;
 import org.apache.archiva.configuration.FileTypes;
+import org.apache.archiva.repository.ManagedRepositoryContent;
 import org.apache.archiva.repository.maven.metadata.storage.ArtifactMappingProvider;
 import org.apache.archiva.repository.ManagedRepository;
 import org.apache.archiva.repository.BaseRepositoryContentLayout;
@@ -98,7 +99,7 @@ public class MavenContentProvider implements RepositoryContentProvider
     }
 
     @Override
-    public BaseRepositoryContentLayout createManagedContent( ManagedRepository repository ) throws RepositoryException
+    public ManagedRepositoryContent createManagedContent( ManagedRepository repository ) throws RepositoryException
     {
         if (!supports( repository.getType() )) {
             throw new RepositoryException( "Repository type "+repository.getType()+" is not supported by this implementation." );
index f033a490ec95702b216cd407ab41bc3d757993a0..08afdcfbed1928f6a9cda8108cdfa9df05d9d1a9 100644 (file)
@@ -280,7 +280,7 @@ public class MavenRepositoryRequestInfo implements RepositoryRequestInfo
 
         // Treat as an artifact reference.
         ArtifactReference ref = toArtifactReference( referencedResource );
-        String adjustedPath = repository.getContent().getLayout( BaseRepositoryContentLayout.class ).toPath( ref );
+        String adjustedPath = repository.getContent().toPath( ref );
         return adjustedPath + supportfile;
     }
 
index bead9c8f2956ddbc7044586cce7a5159bb6f1184..1aad28715e13a6227a82bbdd382514a1677df767 100644 (file)
@@ -18,6 +18,7 @@ package org.apache.archiva.repository.maven.content;
  * under the License.
  */
 
+import org.apache.archiva.repository.BaseRepositoryContentLayout;
 import org.apache.archiva.repository.LayoutException;
 import org.apache.archiva.repository.content.ItemSelector;
 import org.apache.archiva.repository.content.base.ArchivaItemSelector;
@@ -50,10 +51,11 @@ public abstract class AbstractBaseRepositoryContentLayoutTest extends AbstractRe
     }
 
     @Test
-    public void testGetArtifactOnEmptyPath() {
+    public void testGetArtifactOnEmptyPath() throws LayoutException
+    {
         ItemSelector selector = ArchivaItemSelector.builder( ).build( );
         try {
-            getManaged( ).getArtifact( selector );
+            getManaged( ).getLayout( BaseRepositoryContentLayout.class ).getArtifact( selector );
             fail( "getArtifact(ItemSelector) with empty selector should throw IllegalArgumentException" );
         } catch (IllegalArgumentException e) {
             // Good
index 94e10faaea586512a81a49a28ebe0ef265c508ac..f1a6444e4c7f82418164e941396a9bf620725ac4 100644 (file)
@@ -19,6 +19,7 @@ package org.apache.archiva.repository.maven.content;
  */
 
 import org.apache.archiva.model.ArtifactReference;
+import org.apache.archiva.repository.ManagedRepositoryContent;
 import org.apache.archiva.repository.RepositoryContent;
 import org.apache.archiva.repository.maven.AbstractRepositoryLayerTestCase;
 import org.apache.archiva.repository.LayoutException;
@@ -581,25 +582,25 @@ public abstract class AbstractRepositoryContentTest
             Version ver = null;
             if ( StringUtils.isNotEmpty( groupId ) )
             {
-                ns = getManaged( ).getNamespace( expectedArtifact );
+                ns = getManaged( ).getLayout( BaseRepositoryContentLayout.class ).getNamespace( expectedArtifact );
                 assertNotNull( ns );
                 assertEquals( groupId, ns.getNamespace( ) );
             }
             if ( StringUtils.isNotEmpty( artifactId ) )
             {
-                pr = getManaged( ).getProject( expectedArtifact );
+                pr = getManaged( ).getLayout( BaseRepositoryContentLayout.class ).getProject( expectedArtifact );
                 assertNotNull( pr );
                 assertEquals( artifactId, pr.getId( ) );
                 assertEquals( ns, pr.getNamespace( ) );
             }
             if ( StringUtils.isNotEmpty( version ) )
             {
-                ver = getManaged( ).getVersion( expectedArtifact );
+                ver = getManaged( ).getLayout( BaseRepositoryContentLayout.class ).getVersion( expectedArtifact );
                 assertNotNull( ver );
                 assertEquals( version, ver.getVersion( ) );
                 assertEquals( pr, ver.getProject( ) );
             }
-            Artifact artifact = getManaged( ).getArtifact( expectedArtifact );
+            Artifact artifact = getManaged( ).getLayout( BaseRepositoryContentLayout.class ).getArtifact( expectedArtifact );
             assertNotNull( artifact );
             assertEquals( artifactId, artifact.getId( ) );
             assertEquals( ver, artifact.getVersion( ) );
@@ -642,7 +643,7 @@ public abstract class AbstractRepositoryContentTest
 
     protected abstract ItemSelector toItemSelector(String path) throws LayoutException;
 
-    protected abstract BaseRepositoryContentLayout getManaged();
+    protected abstract ManagedRepositoryContent getManaged();
 
     protected abstract RepositoryContent getContent( );
 }
index 94d0cdb1dde91f07aa990f8501651053f9ffd9d1..25d414b532d6c3ba569ef70f4982c9697f0df903 100644 (file)
@@ -21,6 +21,7 @@ package org.apache.archiva.repository.maven.content;
 import org.apache.archiva.model.ArtifactReference;
 import org.apache.archiva.repository.LayoutException;
 import org.apache.archiva.repository.BaseRepositoryContentLayout;
+import org.apache.archiva.repository.ManagedRepositoryContent;
 import org.apache.archiva.repository.RemoteRepository;
 import org.apache.archiva.repository.RemoteRepositoryContent;
 import org.apache.archiva.repository.RepositoryContent;
@@ -69,7 +70,7 @@ public class RemoteDefaultRepositoryContentTest
     }
 
     @Override
-    protected BaseRepositoryContentLayout getManaged( )
+    protected ManagedRepositoryContent getManaged( )
     {
         return null;
     }
index 4240635371457fb129de9a81841754e5e7da3993..7d9cd369a5b0856459f26b6748ed6493ea71723f 100644 (file)
@@ -98,7 +98,7 @@ public class TestConsumer
         {
             try
             {
-                consumed.add( repository.getLayout( BaseRepositoryContentLayout.class ).toArtifactReference( path ) );
+                consumed.add( repository.toArtifactReference( path ) );
             }
             catch ( LayoutException e )
             {
index 1eca75d14cb2ff1bafd2d253d91d20e600d889f5..cfb5dfc30ede2809d843e30b51bf1825de209e38 100644 (file)
@@ -375,7 +375,7 @@ public class DefaultRepositoriesService
             ManagedRepositoryContent sourceRepository =
                 getManagedRepositoryContent( artifactTransferRequest.getRepositoryId() );
             BaseRepositoryContentLayout layout = sourceRepository.getLayout( BaseRepositoryContentLayout.class );
-            String artifactSourcePath = layout.toPath( artifactReference );
+            String artifactSourcePath = sourceRepository.toPath( artifactReference );
 
             if ( StringUtils.isEmpty( artifactSourcePath ) )
             {
@@ -396,7 +396,7 @@ public class DefaultRepositoriesService
             ManagedRepositoryContent targetRepository =
                 getManagedRepositoryContent( artifactTransferRequest.getTargetRepositoryId() );
 
-            String artifactPath = layout.toPath( artifactReference );
+            String artifactPath = sourceRepository.toPath( artifactReference );
 
             int lastIndex = artifactPath.lastIndexOf( '/' );
 
@@ -777,7 +777,7 @@ public class DefaultRepositoriesService
                 .withVersion( artifact.getVersion( ) ).build( );
 
             Version version1 = layout.getVersion( versionSelector );
-            String path = layout.toPath( version1 );
+            String path = repository.toPath( version1 );
 
             ArtifactReference artifactReference = new ArtifactReference();
             artifactReference.setArtifactId( artifact.getArtifactId() );
@@ -839,7 +839,7 @@ public class DefaultRepositoriesService
                 {
                     try
                     {
-                        layout.deleteItem( version1 );
+                        repository.deleteItem( version1 );
                     }
                     catch ( ItemNotFoundException e )
                     {
index b449d3abbc66a697897e5e53ec497873fbc01530..b6fee08648283104d958302f223d0ff063729276 100644 (file)
@@ -100,7 +100,7 @@ public class ArtifactBuilder
         artifact.setPackaging( type );
         artifact.setType( type );
         artifact.setFileExtension( extension );
-        artifact.setPath( layout.toPath( ref ) );
+        artifact.setPath( managedRepositoryContent.toPath( ref ) );
         // TODO: find a reusable formatter for this
         double s = this.artifactMetadata.getSize();
         String symbol = "b";
index 588a24da340d06d7eb4daf62cacec4cd8e127df2..f1028633971b1044dd2923786a7c3ae682c6a6b8 100644 (file)
@@ -651,7 +651,7 @@ public class ArchivaDavResourceFactory
                     try
                     {
                         BaseRepositoryContentLayout layout = managedRepositoryContent.getLayout( BaseRepositoryContentLayout.class );
-                        artifact = layout.toArtifactReference( resourcePath );
+                        artifact = managedRepositoryContent.toArtifactReference( resourcePath );
 
                         if ( !VersionUtil.isSnapshot( artifact.getVersion() ) )
                         {
@@ -800,7 +800,7 @@ public class ArchivaDavResourceFactory
 
                 StorageAsset proxiedFile = proxyHandler.fetchFromProxies( managedRepository, artifact );
 
-                resource.setPath( managedRepository.getContent().getLayout( BaseRepositoryContentLayout.class ).toPath( artifact ) );
+                resource.setPath( managedRepository.getContent().toPath( artifact ) );
 
                 log.debug( "Proxied artifact '{}:{}:{}'", artifact.getGroupId(), artifact.getArtifactId(),
                            artifact.getVersion() );
index e133d2fb3b9d884249891632e7756d0eb0098fdb..c4d9c1b46371ac4db68eb0f08e08e5007bea8885 100644 (file)
@@ -34,6 +34,7 @@ import org.apache.archiva.configuration.ArchivaConfiguration;
 import org.apache.archiva.configuration.Configuration;
 import org.apache.archiva.configuration.FileTypes;
 import org.apache.archiva.configuration.RepositoryGroupConfiguration;
+import org.apache.archiva.repository.ManagedRepositoryContent;
 import org.apache.archiva.repository.maven.metadata.storage.ArtifactMappingProvider;
 import org.apache.archiva.proxy.ProxyRegistry;
 import org.apache.archiva.repository.EditableManagedRepository;
@@ -250,11 +251,11 @@ public class ArchivaDavResourceFactoryTest
         return repoConfig;
     }
 
-    private BaseRepositoryContentLayout createManagedRepositoryContent( String repoId )
+    private ManagedRepositoryContent createManagedRepositoryContent( String repoId )
         throws RepositoryAdminException
     {
         org.apache.archiva.repository.ManagedRepository repo = repositoryRegistry.getManagedRepository( repoId );
-        BaseRepositoryContentLayout repoContent = new ManagedDefaultRepositoryContent(repo, artifactMappingProviders, fileTypes, fileLockManager);
+        ManagedRepositoryContent repoContent = new ManagedDefaultRepositoryContent(repo, artifactMappingProviders, fileTypes, fileLockManager);
         if (repo!=null && repo instanceof EditableManagedRepository)
         {
             ( (EditableManagedRepository) repo ).setContent( repoContent );
@@ -262,7 +263,7 @@ public class ArchivaDavResourceFactoryTest
         return repoContent;
     }
 
-    private RepositoryContentProvider createRepositoryContentProvider( BaseRepositoryContentLayout content) {
+    private RepositoryContentProvider createRepositoryContentProvider( ManagedRepositoryContent content) {
         Set<RepositoryType> TYPES = new HashSet<>(  );
         TYPES.add(RepositoryType.MAVEN);
         return new RepositoryContentProvider( )
@@ -294,7 +295,7 @@ public class ArchivaDavResourceFactoryTest
             }
 
             @Override
-            public BaseRepositoryContentLayout createManagedContent( org.apache.archiva.repository.ManagedRepository repository ) throws RepositoryException
+            public ManagedRepositoryContent createManagedContent( org.apache.archiva.repository.ManagedRepository repository ) throws RepositoryException
             {
                 content.setRepository( repository );
                 return content;
@@ -330,8 +331,8 @@ public class ArchivaDavResourceFactoryTest
             + "/org/apache/archiva/archiva/1.2-SNAPSHOT/archiva-1.2-SNAPSHOT.jar", LOCAL_REPO_GROUP,
                                                                     new ArchivaDavLocatorFactory() );
 
-        BaseRepositoryContentLayout internalRepo = createManagedRepositoryContent( INTERNAL_REPO );
-        BaseRepositoryContentLayout releasesRepo = createManagedRepositoryContent( RELEASES_REPO );
+        ManagedRepositoryContent internalRepo = createManagedRepositoryContent( INTERNAL_REPO );
+        ManagedRepositoryContent releasesRepo = createManagedRepositoryContent( RELEASES_REPO );
 
         try
         {
@@ -407,9 +408,9 @@ public class ArchivaDavResourceFactoryTest
 
         config.setRepositoryGroups( repoGroups );
 
-        BaseRepositoryContentLayout internalRepo = createManagedRepositoryContent( INTERNAL_REPO );
+        ManagedRepositoryContent internalRepo = createManagedRepositoryContent( INTERNAL_REPO );
 
-        BaseRepositoryContentLayout releasesRepo = createManagedRepositoryContent( RELEASES_REPO );
+        ManagedRepositoryContent releasesRepo = createManagedRepositoryContent( RELEASES_REPO );
 
         try
         {
@@ -490,8 +491,8 @@ public class ArchivaDavResourceFactoryTest
 
         config.setRepositoryGroups( repoGroups );
 
-        BaseRepositoryContentLayout internalRepo = createManagedRepositoryContent( INTERNAL_REPO );
-        BaseRepositoryContentLayout localMirrorRepo = createManagedRepositoryContent( LOCAL_MIRROR_REPO );
+        ManagedRepositoryContent internalRepo = createManagedRepositoryContent( INTERNAL_REPO );
+        ManagedRepositoryContent localMirrorRepo = createManagedRepositoryContent( LOCAL_MIRROR_REPO );
 
         repositoryRegistry.putRepositoryGroup( repoGroup );
 
@@ -565,7 +566,7 @@ public class ArchivaDavResourceFactoryTest
             new ArchivaDavResourceLocator( "", "/repository/" + INTERNAL_REPO + "/eclipse/jdtcore/maven-metadata.xml",
                                            INTERNAL_REPO, new ArchivaDavLocatorFactory() );
 
-        BaseRepositoryContentLayout internalRepo = createManagedRepositoryContent( INTERNAL_REPO );
+        ManagedRepositoryContent internalRepo = createManagedRepositoryContent( INTERNAL_REPO );
 
         // use actual object (this performs the isMetadata, isDefault and isSupportFile check!)
         MavenRepositoryRequestInfo repoRequest = new MavenRepositoryRequestInfo(internalRepo.getRepository() );
@@ -622,7 +623,7 @@ public class ArchivaDavResourceFactoryTest
             new ArchivaDavResourceLocator( "", "/repository/" + INTERNAL_REPO + "/eclipse/maven-metadata.xml",
                                            INTERNAL_REPO, new ArchivaDavLocatorFactory() );
 
-        BaseRepositoryContentLayout internalRepo = createManagedRepositoryContent( INTERNAL_REPO );
+        ManagedRepositoryContent internalRepo = createManagedRepositoryContent( INTERNAL_REPO );
 
         try
         {
@@ -662,7 +663,7 @@ public class ArchivaDavResourceFactoryTest
     public void testRequestMetadataRepoIsLegacy()
         throws Exception
     {
-        BaseRepositoryContentLayout legacyRepo = createManagedRepositoryContent( LEGACY_REPO );
+        ManagedRepositoryContent legacyRepo = createManagedRepositoryContent( LEGACY_REPO );
         ConfigurableListableBeanFactory beanFactory = ((ConfigurableApplicationContext) applicationContext).getBeanFactory();
         RepositoryContentProvider provider = createRepositoryContentProvider(legacyRepo );
         beanFactory.registerSingleton("repositoryContentProvider#legacy", provider);