From bb3b074aaf5a2be0d81c950ecf1588fe8efa3316 Mon Sep 17 00:00:00 2001 From: Martin Stockhammer Date: Sun, 28 Jul 2019 15:24:13 +0200 Subject: Refactoring to StorageAsset access --- .../metadata/repository/storage/RepositoryPathTranslator.java | 9 +++++---- .../archiva/metadata/repository/storage/RepositoryStorage.java | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'archiva-modules/metadata') diff --git a/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/storage/RepositoryPathTranslator.java b/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/storage/RepositoryPathTranslator.java index 77bcb9ec0..50071593a 100644 --- a/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/storage/RepositoryPathTranslator.java +++ b/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/storage/RepositoryPathTranslator.java @@ -20,6 +20,7 @@ package org.apache.archiva.metadata.repository.storage; */ import org.apache.archiva.metadata.model.ArtifactMetadata; +import org.apache.archiva.repository.storage.StorageAsset; import java.nio.file.Path; @@ -31,13 +32,13 @@ public interface RepositoryPathTranslator String toPath( String namespace, String projectId ); - Path toFile( Path basedir, String namespace, String projectId, String projectVersion, String filename ); + StorageAsset toFile(StorageAsset basedir, String namespace, String projectId, String projectVersion, String filename ); - Path toFile( Path basedir, String namespace, String projectId ); + StorageAsset toFile(StorageAsset basedir, String namespace, String projectId ); - Path toFile(Path basedir, String namespace ); + StorageAsset toFile(StorageAsset basedir, String namespace ); - Path toFile( Path basedir, String namespace, String projectId, String projectVersion ); + StorageAsset toFile( StorageAsset basedir, String namespace, String projectId, String projectVersion ); ArtifactMetadata getArtifactForPath( String repoId, String relativePath ); diff --git a/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/storage/RepositoryStorage.java b/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/storage/RepositoryStorage.java index cb2051011..6fb46d676 100644 --- a/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/storage/RepositoryStorage.java +++ b/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/storage/RepositoryStorage.java @@ -28,6 +28,7 @@ import org.apache.archiva.policies.ProxyDownloadException; import org.apache.archiva.repository.ManagedRepositoryContent; import org.apache.archiva.xml.XMLException; +import java.io.IOException; import java.util.Collection; // FIXME: we should drop the repositoryId parameters and attach this to an instance of a repository storage @@ -83,7 +84,7 @@ public interface RepositoryStorage String getFilePath( String requestPath, org.apache.archiva.repository.ManagedRepository managedRepository ); String getFilePathWithVersion( final String requestPath, ManagedRepositoryContent managedRepositoryContent ) - throws RelocationException, XMLException; + throws RelocationException, XMLException, IOException; } -- cgit v1.2.3