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 IMutableIndex
public void removeArtifact(File pomFile, ArtifactKey artifactKey)
removeArtifact
in interface IMutableIndex
public Collection<IndexedArtifact> find(SearchExpression groupId, SearchExpression artifactId, SearchExpression version, SearchExpression packaging) throws org.eclipse.core.runtime.CoreException
IIndex
public Collection<IndexedArtifact> find(Collection<SearchExpression> groupId, Collection<SearchExpression> artifactId, Collection<SearchExpression> version, Collection<SearchExpression> packaging) throws org.eclipse.core.runtime.CoreException
IIndex
IIndex.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 IIndex
org.eclipse.core.runtime.CoreException
public 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 IMutableIndex
org.eclipse.core.runtime.CoreException
public void scheduleIndexUpdate(boolean force)
public IndexedArtifactGroup[] getRootIndexedArtifactGroups() throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
public boolean isUpdating()
public IRepository getRepository()
public boolean isEnabled()
public void setIndexDetails(String details) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
public Map<String,IndexedArtifact> search(SearchExpression term, String searchType) throws org.eclipse.core.runtime.CoreException
IIndex
public Map<String,IndexedArtifact> search(SearchExpression term, String searchType, int classifier) throws org.eclipse.core.runtime.CoreException
IIndex
Copyright © 2005–2015 Sonatype, Inc.. All rights reserved.