Class RepositoryIndexer
java.lang.Object
org.apache.maven.index.examples.indexing.RepositoryIndexer
This class provides means to index and search for artifacts in a repository on the file system.
- Author:
- mtodorov
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addArtifactToIndex
(File artifactFile, ArtifactInfo artifactInfo) void
addArtifactToIndex
(String repository, File artifactFile, String groupId, String artifactId, String version, String extension, String classifier) void
close()
void
close
(boolean deleteFiles) void
delete
(Collection<ArtifactInfo> artifacts) int
searchBySHA1
(String checksum) void
setIndexDir
(File indexDir) void
setIndexer
(Indexer indexer) void
setIndexers
(List<IndexCreator> indexers) void
setIndexingContext
(IndexingContext indexingContext) void
setRepositoryBasedir
(File repositoryBasedir) void
setRepositoryId
(String repositoryId) void
setScanner
(Scanner scanner)
-
Constructor Details
-
RepositoryIndexer
public RepositoryIndexer()
-
-
Method Details
-
close
- Throws:
IOException
-
close
- Throws:
IOException
-
delete
- Throws:
IOException
-
search
public Set<ArtifactInfo> search(String groupId, String artifactId, String version, String packaging, String classifier) throws IOException - Throws:
IOException
-
search
public Set<ArtifactInfo> search(String queryText) throws org.apache.lucene.queryparser.classic.ParseException, IOException - Throws:
org.apache.lucene.queryparser.classic.ParseException
IOException
-
searchBySHA1
- Throws:
IOException
-
index
-
addArtifactToIndex
- Throws:
IOException
-
addArtifactToIndex
public void addArtifactToIndex(String repository, File artifactFile, String groupId, String artifactId, String version, String extension, String classifier) throws IOException - Throws:
IOException
-
getIndexer
-
setIndexer
-
getScanner
-
setScanner
-
getIndexers
-
setIndexers
-
getIndexingContext
-
setIndexingContext
-
getRepositoryId
-
setRepositoryId
-
getRepositoryBasedir
-
setRepositoryBasedir
-
getIndexDir
-
setIndexDir
-