public class NexusIndex extends Object implements IIndex, IMutableIndex
| Modifier and Type | Field and Description |
|---|---|
static String |
DETAILS_DISABLED
Repository index is disabled.
|
static String |
DETAILS_FULL
Both artifact and classname indexes are used.
|
static String |
DETAILS_MIN
Only artifact index information is used.
|
NOT_AVAILABLE, NOT_PRESENT, PRESENT, SEARCH_ALL, SEARCH_ARCHETYPE, SEARCH_ARTIFACT, SEARCH_GROUP, SEARCH_JARS, SEARCH_JAVADOCS, SEARCH_PACKAGING, SEARCH_PARENTS, SEARCH_PLUGIN, SEARCH_SHA1, SEARCH_SOURCES, SEARCH_TESTS| Modifier and Type | Method and Description |
|---|---|
void |
addArtifact(File pomFile,
ArtifactKey artifactKey) |
Collection<IndexedArtifact> |
find(Collection<SearchExpression> groupId,
Collection<SearchExpression> artifactId,
Collection<SearchExpression> version,
Collection<SearchExpression> packaging)
Performs a search for artifacts with given parameters.
|
Collection<IndexedArtifact> |
find(SearchExpression groupId,
SearchExpression artifactId,
SearchExpression version,
SearchExpression packaging)
Performs a search for artifacts with given parameters.
|
String |
getIndexDetails() |
IndexedArtifactFile |
getIndexedArtifactFile(ArtifactKey artifact) |
IRepository |
getRepository() |
String |
getRepositoryUrl() |
IndexedArtifactGroup[] |
getRootIndexedArtifactGroups() |
IndexedArtifactFile |
identify(File file) |
boolean |
isEnabled() |
boolean |
isUpdating() |
void |
removeArtifact(File pomFile,
ArtifactKey artifactKey) |
void |
scheduleIndexUpdate(boolean force) |
Map<String,IndexedArtifact> |
search(SearchExpression term,
String searchType)
Convenience method to search in all indexes enabled for repositories defined in settings.xml.
|
Map<String,IndexedArtifact> |
search(SearchExpression term,
String searchType,
int classifier)
Convenience method to search in all indexes enabled for repositories defined in settings.xml.
|
void |
setIndexDetails(String details) |
void |
updateIndex(boolean force,
org.eclipse.core.runtime.IProgressMonitor monitor) |
public static final String DETAILS_DISABLED
public static final String DETAILS_MIN
public static final String DETAILS_FULL
public String getRepositoryUrl()
public String getIndexDetails()
public void addArtifact(File pomFile, ArtifactKey artifactKey)
addArtifact in interface IMutableIndexpublic void removeArtifact(File pomFile, ArtifactKey artifactKey)
removeArtifact in interface IMutableIndexpublic Collection<IndexedArtifact> find(SearchExpression groupId, SearchExpression artifactId, SearchExpression version, SearchExpression packaging) throws org.eclipse.core.runtime.CoreException
IIndexpublic Collection<IndexedArtifact> find(Collection<SearchExpression> groupId, Collection<SearchExpression> artifactId, Collection<SearchExpression> version, Collection<SearchExpression> packaging) throws org.eclipse.core.runtime.CoreException
IIndexIIndex.find(SearchExpression, SearchExpression, SearchExpression, SearchExpression), but here you are able
to pass in multiple values for all searches. All elements of collections will form an "OR" of one query.public IndexedArtifactFile getIndexedArtifactFile(ArtifactKey artifact) throws org.eclipse.core.runtime.CoreException
getIndexedArtifactFile in interface IIndexorg.eclipse.core.runtime.CoreExceptionpublic IndexedArtifactFile identify(File file) throws org.eclipse.core.runtime.CoreException
public void updateIndex(boolean force,
org.eclipse.core.runtime.IProgressMonitor monitor)
throws org.eclipse.core.runtime.CoreException
updateIndex in interface IMutableIndexorg.eclipse.core.runtime.CoreExceptionpublic void scheduleIndexUpdate(boolean force)
public IndexedArtifactGroup[] getRootIndexedArtifactGroups() throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreExceptionpublic boolean isUpdating()
public IRepository getRepository()
public boolean isEnabled()
public void setIndexDetails(String details) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreExceptionpublic Map<String,IndexedArtifact> search(SearchExpression term, String searchType) throws org.eclipse.core.runtime.CoreException
IIndexpublic Map<String,IndexedArtifact> search(SearchExpression term, String searchType, int classifier) throws org.eclipse.core.runtime.CoreException
IIndexCopyright © 2005–2021 Eclipse Foundation. All rights reserved.