diff options
author | Martin Stockhammer <martin.stockhammer@ars.de> | 2017-11-11 00:07:56 +0100 |
---|---|---|
committer | Martin Stockhammer <martin.stockhammer@ars.de> | 2017-11-11 00:07:56 +0100 |
commit | c6e4e563d6698aa7cb5772878bc0fe22066b7884 (patch) | |
tree | f51d17add16cc3d220d6752c41921bde83e4526b /archiva-modules/archiva-base/archiva-repository-api | |
parent | 8f520999ff9b42396a013bb42bc450945ddc4b5d (diff) | |
download | archiva-c6e4e563d6698aa7cb5772878bc0fe22066b7884.tar.gz archiva-c6e4e563d6698aa7cb5772878bc0fe22066b7884.zip |
Implementation of new archivaindexer
Not finished yet, but uses the maven index service via spring dependency injection
Moving some maven specific classes to subpackages
Diffstat (limited to 'archiva-modules/archiva-base/archiva-repository-api')
2 files changed, 11 insertions, 9 deletions
diff --git a/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/indexer/ArchivaIndexManager.java b/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/indexer/ArchivaIndexManager.java index 189138330..4663db620 100644 --- a/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/indexer/ArchivaIndexManager.java +++ b/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/indexer/ArchivaIndexManager.java @@ -23,6 +23,7 @@ import org.apache.archiva.model.ArtifactReference; import org.apache.archiva.repository.Repository; import org.apache.archiva.repository.RepositoryType; +import java.io.IOException; import java.net.URI; public interface ArchivaIndexManager { @@ -31,14 +32,14 @@ public interface ArchivaIndexManager { * Compresses the index to a more dense packed format. * @param context */ - void pack(ArchivaIndexingContext context); + void pack(ArchivaIndexingContext context) throws IOException; /** * Rescans the whole repository, this index is associated to. * @param context * @param update */ - void scan(ArchivaIndexingContext context, boolean update); + void scan(ArchivaIndexingContext context, boolean update) throws IOException; /** * Updates the index from the remote url. @@ -46,21 +47,21 @@ public interface ArchivaIndexManager { * @param remoteUpdateUri * @param fullUpdate */ - void update(ArchivaIndexingContext context, URI remoteUpdateUri, boolean fullUpdate); + void update(ArchivaIndexingContext context, URI remoteUpdateUri, boolean fullUpdate) throws IOException; /** * Adds a artifact to the index. * @param context * @param artifactReference */ - void addArtifactToIndex(ArchivaIndexingContext context, ArtifactReference artifactReference); + void addArtifactToIndex(ArchivaIndexingContext context, ArtifactReference artifactReference) throws IOException; /** * Removes a artifact from the index. * @param context * @param artifactReference */ - void removeArtifactFromIndex(ArchivaIndexingContext context, ArtifactReference artifactReference); + void removeArtifactFromIndex(ArchivaIndexingContext context, ArtifactReference artifactReference) throws IOException; /** @@ -75,5 +76,5 @@ public interface ArchivaIndexManager { * @param repository the repository for which the index context should be created * @return the index context */ - ArchivaIndexingContext createContext(Repository repository); + ArchivaIndexingContext createContext(Repository repository) throws IOException; } diff --git a/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/indexer/ArchivaIndexingContext.java b/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/indexer/ArchivaIndexingContext.java index 23496e779..ee7cfc1b1 100644 --- a/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/indexer/ArchivaIndexingContext.java +++ b/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/indexer/ArchivaIndexingContext.java @@ -25,6 +25,7 @@ import org.apache.archiva.repository.RepositoryType; import java.io.IOException; import java.net.URI; import java.time.LocalDateTime; +import java.time.ZonedDateTime; import java.util.Set; /** @@ -55,7 +56,7 @@ public interface ArchivaIndexingContext { * Returns true, if the index has no entries or is not initialized. * @return */ - boolean isEmpty(); + boolean isEmpty() throws IOException; /** * Writes the last changes to the index. @@ -111,7 +112,7 @@ public interface ArchivaIndexingContext { * Returns the list of groups that are assigned to this index * @return */ - Set<String> getGroups(); + Set<String> getGroups() throws IOException; /** * Updates the timestamp of the index. @@ -126,5 +127,5 @@ public interface ArchivaIndexingContext { * @param time * @throws IOException */ - void updateTimestamp(boolean save, LocalDateTime time) throws IOException; + void updateTimestamp(boolean save, ZonedDateTime time) throws IOException; } |