]> source.dussan.org Git - archiva.git/commitdiff
Updating content item interfaces
authorMartin Stockhammer <martin_s@apache.org>
Wed, 12 Feb 2020 20:12:09 +0000 (21:12 +0100)
committerMartin Stockhammer <martin_s@apache.org>
Wed, 12 Feb 2020 20:12:20 +0000 (21:12 +0100)
archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/content/Project.java
archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/content/base/ArchivaVersion.java

index 2ad2c88db16211ba9cb7bec9bf6a3d18c781face..f7a840a7a38e514322048ec5c73b77074d02381e 100644 (file)
@@ -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();
 
 }
index 194f07159dbc8e69ea21bf317d5c1e5811f71987..66fd52964c2f602939b9d673b361e694c1158ad8 100644 (file)
@@ -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;
         }