aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/metadata
diff options
context:
space:
mode:
authorMartin Stockhammer <martin_s@apache.org>2020-06-11 14:33:00 +0200
committerMartin Stockhammer <martin_s@apache.org>2020-06-11 14:33:00 +0200
commit46fd585f40f0264b8889154e1924eb8df991b0f3 (patch)
tree09408c7375f7e57d0760ef48b0ddae7be768e4ca /archiva-modules/metadata
parentb942314aa27330a179acf17300fea6849bf89d4d (diff)
downloadarchiva-46fd585f40f0264b8889154e1924eb8df991b0f3.tar.gz
archiva-46fd585f40f0264b8889154e1924eb8df991b0f3.zip
Improving repository API
Diffstat (limited to 'archiva-modules/metadata')
-rw-r--r--archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/storage/RepositoryStorage.java16
1 files changed, 16 insertions, 0 deletions
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 6559be1c6..e56311506 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
@@ -27,6 +27,7 @@ import org.apache.archiva.model.ArtifactReference;
import org.apache.archiva.policies.ProxyDownloadException;
import org.apache.archiva.repository.ManagedRepositoryContent;
import org.apache.archiva.repository.ManagedRepository;
+import org.apache.archiva.repository.content.ItemSelector;
import org.apache.archiva.xml.XMLException;
import java.io.IOException;
@@ -75,6 +76,21 @@ public interface RepositoryStorage
throws ProxyDownloadException;
/**
+ * A relocation capable client will request the POM prior to the artifact, and will then read meta-data and do
+ * client side relocation. A simplier client (like maven 1) will only request the artifact and not use the
+ * metadatas.
+ * <p>
+ * For such clients, archiva does server-side relocation by reading itself the &lt;relocation&gt; element in
+ * metadatas and serving the expected artifact.
+ * @param managedRepository the used managed repository
+ * @param artifact the artifact reference
+ * @throws org.apache.archiva.policies.ProxyDownloadException
+ */
+ ItemSelector applyServerSideRelocation( ManagedRepository managedRepository, ItemSelector selector )
+ throws ProxyDownloadException;
+
+
+ /**
* add an other method to evaluate real path as when receiving -SNAPSHOT (for maven storage)
* request redirect to the last build
* @param requestPath the web uri request