@Service(value="archivaIndexManager#maven") public class MavenIndexManager extends Object implements ArchivaIndexManager
DEFAULT_INDEX_PATH, DEFAULT_PACKED_INDEX_PATH| Constructor and Description | 
|---|
| MavenIndexManager() | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addArtifactsToIndex(ArchivaIndexingContext context,
                   Collection<URI> artifactReference)Adds a list of artifacts to the index. | 
| ArchivaIndexingContext | createContext(Repository repository)Creates the indexing context for the given repository. | 
| static org.apache.maven.index.context.IndexingContext | getMvnContext(ArchivaIndexingContext context) | 
| ArchivaIndexingContext | mergeContexts(Repository destinationRepo,
             List<ArchivaIndexingContext> contexts,
             boolean packIndex)Merges a list of contexts into a single one. | 
| ArchivaIndexingContext | move(ArchivaIndexingContext context,
    Repository repo)Moves the context to a new directory. | 
| void | pack(ArchivaIndexingContext context)Compresses the index to a more dense packed format. | 
| void | removeArtifactsFromIndex(ArchivaIndexingContext context,
                        Collection<URI> artifactReference)Removes a list of artifacts from the index. | 
| ArchivaIndexingContext | reset(ArchivaIndexingContext context)Reinitializes the index. | 
| void | scan(ArchivaIndexingContext context)Rescans the whole repository, this index is associated to. | 
| boolean | supportsRepository(RepositoryType type)Returns true, if this manager is able to apply the index actions for the given repository type. | 
| void | update(ArchivaIndexingContext context,
      boolean fullUpdate)Updates the index from the remote url. | 
| void | updateLocalIndexPath(Repository repo)Updates the local path where the index is stored using the repository information. | 
public MavenIndexManager()
public static org.apache.maven.index.context.IndexingContext getMvnContext(ArchivaIndexingContext context) throws UnsupportedBaseContextException
UnsupportedBaseContextExceptionpublic void pack(ArchivaIndexingContext context) throws IndexUpdateFailedException
ArchivaIndexManagerpack in interface ArchivaIndexManagerIndexUpdateFailedExceptionpublic void scan(ArchivaIndexingContext context) throws IndexUpdateFailedException
ArchivaIndexManagerscan in interface ArchivaIndexManagerIndexUpdateFailedExceptionpublic void update(ArchivaIndexingContext context, boolean fullUpdate) throws IndexUpdateFailedException
ArchivaIndexManagerupdate in interface ArchivaIndexManagerIndexUpdateFailedExceptionpublic void addArtifactsToIndex(ArchivaIndexingContext context, Collection<URI> artifactReference) throws IndexUpdateFailedException
ArchivaIndexManageraddArtifactsToIndex in interface ArchivaIndexManagerIndexUpdateFailedExceptionpublic void removeArtifactsFromIndex(ArchivaIndexingContext context, Collection<URI> artifactReference) throws IndexUpdateFailedException
ArchivaIndexManagerremoveArtifactsFromIndex in interface ArchivaIndexManagerIndexUpdateFailedExceptionpublic boolean supportsRepository(RepositoryType type)
ArchivaIndexManagersupportsRepository in interface ArchivaIndexManagerpublic ArchivaIndexingContext createContext(Repository repository) throws IndexCreationFailedException
ArchivaIndexManagercreateContext in interface ArchivaIndexManagerrepository - the repository for which the index context should be createdIndexCreationFailedExceptionpublic ArchivaIndexingContext reset(ArchivaIndexingContext context) throws IndexUpdateFailedException
ArchivaIndexManagerreset in interface ArchivaIndexManagerIndexUpdateFailedExceptionpublic ArchivaIndexingContext move(ArchivaIndexingContext context, Repository repo) throws IndexCreationFailedException
ArchivaIndexManagermove in interface ArchivaIndexManagercontext - The current contextrepo - The repositoryIndexCreationFailedExceptionpublic void updateLocalIndexPath(Repository repo)
ArchivaIndexManagerupdateLocalIndexPath in interface ArchivaIndexManagerpublic ArchivaIndexingContext mergeContexts(Repository destinationRepo, List<ArchivaIndexingContext> contexts, boolean packIndex) throws UnsupportedOperationException, IndexCreationFailedException, IllegalArgumentException
ArchivaIndexManagermergeContexts in interface ArchivaIndexManagerdestinationRepo - The destination repositorycontexts - The contexts of the indexes that should be merged.packIndex - True, if the merged index should be packed, otherwise false.UnsupportedOperationException - if the underlying implementation does not allow to merge indexing contextsIndexCreationFailedExceptionIllegalArgumentExceptionCopyright © 2006–2019 The Apache Software Foundation. All rights reserved.