org.apache.maven.index.creator
Class MavenPluginArtifactInfoIndexCreator

java.lang.Object
  extended by org.codehaus.plexus.logging.AbstractLogEnabled
      extended by org.apache.maven.index.creator.AbstractIndexCreator
          extended by org.apache.maven.index.creator.MavenPluginArtifactInfoIndexCreator
All Implemented Interfaces:
IndexCreator, org.codehaus.plexus.logging.LogEnabled

@Component(role=IndexCreator.class,
           hint="maven-plugin")
public class MavenPluginArtifactInfoIndexCreator
extends AbstractIndexCreator

A Maven Plugin index creator used to provide information about Maven Plugins. It will collect the plugin prefix and the goals the plugin provides. Also, the Lucene document and the returned ArtifactInfo will be correctly filled with these information.

Author:
cstamas

Field Summary
static IndexerField FLD_PLUGIN_GOALS
           
static IndexerField FLD_PLUGIN_PREFIX
           
static String ID
           
 
Constructor Summary
MavenPluginArtifactInfoIndexCreator()
           
 
Method Summary
 Collection<IndexerField> getIndexerFields()
          Returns the indexer fields that this IndexCreator introduces to index.
 void populateArtifactInfo(ArtifactContext ac)
          Populate an ArtifactContext with information about corresponding artifact.
 String toString()
           
 boolean updateArtifactInfo(org.apache.lucene.document.Document doc, ArtifactInfo ai)
          Update an ArtifactInfo from given Lucene Document.
 void updateDocument(ArtifactInfo ai, org.apache.lucene.document.Document doc)
          Update Lucene Document from a given ArtifactInfo.
 
Methods inherited from class org.apache.maven.index.creator.AbstractIndexCreator
bos, getCreatorDependencies, getId, sob
 
Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ID

public static final String ID
See Also:
Constant Field Values

FLD_PLUGIN_PREFIX

public static final IndexerField FLD_PLUGIN_PREFIX

FLD_PLUGIN_GOALS

public static final IndexerField FLD_PLUGIN_GOALS
Constructor Detail

MavenPluginArtifactInfoIndexCreator

public MavenPluginArtifactInfoIndexCreator()
Method Detail

populateArtifactInfo

public void populateArtifactInfo(ArtifactContext ac)
Description copied from interface: IndexCreator
Populate an ArtifactContext with information about corresponding artifact.


updateDocument

public void updateDocument(ArtifactInfo ai,
                           org.apache.lucene.document.Document doc)
Description copied from interface: IndexCreator
Update Lucene Document from a given ArtifactInfo.


updateArtifactInfo

public boolean updateArtifactInfo(org.apache.lucene.document.Document doc,
                                  ArtifactInfo ai)
Description copied from interface: IndexCreator
Update an ArtifactInfo from given Lucene Document.

Returns:
true is artifact info has been updated

toString

public String toString()
Overrides:
toString in class Object

getIndexerFields

public Collection<IndexerField> getIndexerFields()
Description copied from interface: IndexCreator
Returns the indexer fields that this IndexCreator introduces to index.

Returns:


Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.