diff options
author | Martin Stockhammer <martin_s@apache.org> | 2021-05-30 19:14:03 +0200 |
---|---|---|
committer | Martin Stockhammer <martin_s@apache.org> | 2021-05-30 19:14:03 +0200 |
commit | 79c61a7c6a63be33a2221a0bd75fdfea7f6b1bf6 (patch) | |
tree | 5a12b8ad5d8755f5d0f0b6c189bd6a69ceee2bc3 /archiva-modules/archiva-base/archiva-repository-api | |
parent | fe117fcc4be288a37db07788a2fd3cc857beeb28 (diff) | |
download | archiva-79c61a7c6a63be33a2221a0bd75fdfea7f6b1bf6.tar.gz archiva-79c61a7c6a63be33a2221a0bd75fdfea7f6b1bf6.zip |
Improving storage handling with assets
Diffstat (limited to 'archiva-modules/archiva-base/archiva-repository-api')
-rw-r--r-- | archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/ManagedRepositoryContent.java | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/ManagedRepositoryContent.java b/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/ManagedRepositoryContent.java index 46e32e7f7..61778d2c8 100644 --- a/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/ManagedRepositoryContent.java +++ b/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/ManagedRepositoryContent.java @@ -91,6 +91,30 @@ public interface ManagedRepositoryContent extends RepositoryContent void deleteItem( ContentItem item ) throws ItemNotFoundException, ContentAccessException; /** + * Copies the given item to the destination repository. The destination repository must be of the same type + * as this repository. Metadata is updated only if there is no metadata scan consumer is active. + * + * @param item the item to copy + * @param destinationRepository the destination repository + * @throws ItemNotFoundException if the given item does not exist + * @throws ContentAccessException if an error occurred during the copy process + */ + void copyItem(ContentItem item, ManagedRepository destinationRepository) throws ItemNotFoundException, ContentAccessException; + + /** + * Copies the given item to the destination repository. The destination repository must be of the same type + * as this repository. + * + * @param item the item to copy + * @param destinationRepository the destination repository + * @param updateMetadata <code>true</code>, if the metadata will be updated immediately after copying. <code>false</code> + * if metadata is not updated after copying, but it may be updated by the metadata scan consumer, if it is configured. + * @throws ItemNotFoundException if the given item does not exist + * @throws ContentAccessException if an error occurred during the copy process + */ + void copyItem(ContentItem item, ManagedRepository destinationRepository, boolean updateMetadata) throws ItemNotFoundException, ContentAccessException; + + /** * Returns a item for the given selector. The type of the returned item depends on the * selector. * |