Package org.apache.maven.index
Class ArtifactContext
- java.lang.Object
-
- org.apache.maven.index.ArtifactContext
-
public class ArtifactContext extends java.lang.Object
An artifact context used to provide information about artifact during scanning. It is passed to theIndexCreator
, which can populateArtifactInfo
for the given artifact.
-
-
Field Summary
Fields Modifier and Type Field Description private java.io.File
artifact
private ArtifactInfo
artifactInfo
private java.util.List<java.lang.Exception>
errors
private Gav
gav
private static org.slf4j.Logger
LOGGER
private java.io.File
metadata
private java.io.File
pom
-
Constructor Summary
Constructors Constructor Description ArtifactContext(java.io.File pom, java.io.File artifact, java.io.File metadata, ArtifactInfo artifactInfo, Gav gav)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addError(java.lang.Exception e)
org.apache.lucene.document.Document
createDocument(IndexingContext context)
Creates Lucene Document usingIndexCreator
s from the givenIndexingContext
.java.io.File
getArtifact()
ArtifactInfo
getArtifactInfo()
java.util.List<java.lang.Exception>
getErrors()
Gav
getGav()
java.io.File
getMetadata()
java.io.File
getPom()
org.apache.maven.model.Model
getPomModel()
-
-
-
Field Detail
-
LOGGER
private static final org.slf4j.Logger LOGGER
-
pom
private final java.io.File pom
-
artifact
private final java.io.File artifact
-
metadata
private final java.io.File metadata
-
artifactInfo
private final ArtifactInfo artifactInfo
-
gav
private final Gav gav
-
errors
private final java.util.List<java.lang.Exception> errors
-
-
Constructor Detail
-
ArtifactContext
public ArtifactContext(java.io.File pom, java.io.File artifact, java.io.File metadata, ArtifactInfo artifactInfo, Gav gav) throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
-
-
Method Detail
-
getPom
public java.io.File getPom()
-
getPomModel
public org.apache.maven.model.Model getPomModel()
-
getArtifact
public java.io.File getArtifact()
-
getMetadata
public java.io.File getMetadata()
-
getArtifactInfo
public ArtifactInfo getArtifactInfo()
-
getGav
public Gav getGav()
-
getErrors
public java.util.List<java.lang.Exception> getErrors()
-
addError
public void addError(java.lang.Exception e)
-
createDocument
public org.apache.lucene.document.Document createDocument(IndexingContext context)
Creates Lucene Document usingIndexCreator
s from the givenIndexingContext
.
-
-