diff options
author | Martin Stockhammer <martin_s@apache.org> | 2020-02-12 21:12:09 +0100 |
---|---|---|
committer | Martin Stockhammer <martin_s@apache.org> | 2020-02-12 21:12:20 +0100 |
commit | e978e2bf2111063b9f8461e91ccbd811d4887c62 (patch) | |
tree | fabfc4b14904f99f78d2b92e479775110a973da1 /archiva-modules/archiva-base | |
parent | f75938cf85ae6354c49c504a596ef1a8645fb9a2 (diff) | |
download | archiva-e978e2bf2111063b9f8461e91ccbd811d4887c62.tar.gz archiva-e978e2bf2111063b9f8461e91ccbd811d4887c62.zip |
Updating content item interfaces
Diffstat (limited to 'archiva-modules/archiva-base')
2 files changed, 13 insertions, 7 deletions
diff --git a/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/content/Project.java b/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/content/Project.java index 2ad2c88db..f7a840a7a 100644 --- a/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/content/Project.java +++ b/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/content/Project.java @@ -19,11 +19,8 @@ package org.apache.archiva.repository.content; * under the License. */ -import org.apache.archiva.repository.RepositoryContent; -import org.apache.archiva.repository.UnsupportedConversionException; -import org.apache.archiva.repository.UnsupportedRepositoryTypeException; - -import java.util.Map; +import org.apache.archiva.repository.ManagedRepositoryContent; +import org.apache.archiva.repository.storage.StorageAsset; /** * @@ -60,6 +57,15 @@ public interface Project extends ContentItem * The repository this project is part of. * @return the repository content */ - RepositoryContent getRepository(); + ManagedRepositoryContent getRepository(); + + /** + * Returns the asset that corresponds to this project. + * It depends of the implementation, if the asset provides additional information about the + * project or not. + * + * @return the repository asset that represents this project + */ + StorageAsset getAsset(); } diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/base/ArchivaVersion.java b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/base/ArchivaVersion.java index 194f07159..66fd52964 100644 --- a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/base/ArchivaVersion.java +++ b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/base/ArchivaVersion.java @@ -95,7 +95,7 @@ public class ArchivaVersion extends ArchivaContentItem implements Version public ArchivaVersion build() { if (this.version.asset == null) { - this.version.project.getRepository( ).getRepository( ).getAsset( "" ); + this.version.project.getRepository( ).getRepository().getAsset( "" ); } return this.version; } |