Package org.apache.maven.index.creator
Class OsgiArtifactIndexCreator
- java.lang.Object
-
- org.apache.maven.index.creator.AbstractIndexCreator
-
- org.apache.maven.index.creator.OsgiArtifactIndexCreator
-
- All Implemented Interfaces:
IndexCreator
@Singleton @Named("osgi-metadatas") public class OsgiArtifactIndexCreator extends AbstractIndexCreatorThis indexCreator will index some OSGI metadatas.
All jars are indexed and not only the ones with packaging bundle.
OSGI metadatas indexed :
- Bundle-SymbolicName
- Bundle-Version
- Export-Package
- Export-Service
- Since:
- 4.1.2
- Author:
- Olivier Lamy
-
-
Field Summary
Fields Modifier and Type Field Description static IndexerFieldFLD_BUNDLE_DESCRIPTIONstatic IndexerFieldFLD_BUNDLE_DOCURLstatic IndexerFieldFLD_BUNDLE_EXPORT_PACKAGEstatic IndexerFieldFLD_BUNDLE_EXPORT_SERVIVEDeprecated.static IndexerFieldFLD_BUNDLE_FRAGMENT_HOSTstatic IndexerFieldFLD_BUNDLE_IMPORT_PACKAGEstatic IndexerFieldFLD_BUNDLE_LICENSEstatic IndexerFieldFLD_BUNDLE_NAMEstatic IndexerFieldFLD_BUNDLE_PROVIDE_CAPABILITYstatic IndexerFieldFLD_BUNDLE_REQUIRE_BUNDLEstatic IndexerFieldFLD_BUNDLE_REQUIRE_CAPABILITYstatic IndexerFieldFLD_BUNDLE_REQUIRED_EXECUTION_ENVIRONMENTstatic IndexerFieldFLD_BUNDLE_SYMBOLIC_NAMEstatic IndexerFieldFLD_BUNDLE_VERSIONstatic IndexerFieldFLD_SHA256static java.lang.StringID
-
Constructor Summary
Constructors Constructor Description OsgiArtifactIndexCreator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection<IndexerField>getIndexerFields()Returns the indexer fields that this IndexCreator introduces to index.voidpopulateArtifactInfo(ArtifactContext artifactContext)Populate anArtifactContextwith information about corresponding artifact.java.lang.StringtoString()booleanupdateArtifactInfo(org.apache.lucene.document.Document document, ArtifactInfo artifactInfo)Update anArtifactInfofrom given LuceneDocument.voidupdateDocument(ArtifactInfo artifactInfo, org.apache.lucene.document.Document document)Update LuceneDocumentfrom a givenArtifactInfo.-
Methods inherited from class org.apache.maven.index.creator.AbstractIndexCreator
bos, getCreatorDependencies, getId, getLogger, sob
-
-
-
-
Field Detail
-
ID
public static final java.lang.String ID
- See Also:
- Constant Field Values
-
FLD_SHA256
public static final IndexerField FLD_SHA256
-
FLD_BUNDLE_SYMBOLIC_NAME
public static final IndexerField FLD_BUNDLE_SYMBOLIC_NAME
-
FLD_BUNDLE_VERSION
public static final IndexerField FLD_BUNDLE_VERSION
-
FLD_BUNDLE_EXPORT_PACKAGE
public static final IndexerField FLD_BUNDLE_EXPORT_PACKAGE
-
FLD_BUNDLE_EXPORT_SERVIVE
@Deprecated public static final IndexerField FLD_BUNDLE_EXPORT_SERVIVE
Deprecated.
-
FLD_BUNDLE_DESCRIPTION
public static final IndexerField FLD_BUNDLE_DESCRIPTION
-
FLD_BUNDLE_NAME
public static final IndexerField FLD_BUNDLE_NAME
-
FLD_BUNDLE_LICENSE
public static final IndexerField FLD_BUNDLE_LICENSE
-
FLD_BUNDLE_DOCURL
public static final IndexerField FLD_BUNDLE_DOCURL
-
FLD_BUNDLE_IMPORT_PACKAGE
public static final IndexerField FLD_BUNDLE_IMPORT_PACKAGE
-
FLD_BUNDLE_REQUIRE_BUNDLE
public static final IndexerField FLD_BUNDLE_REQUIRE_BUNDLE
-
FLD_BUNDLE_PROVIDE_CAPABILITY
public static final IndexerField FLD_BUNDLE_PROVIDE_CAPABILITY
-
FLD_BUNDLE_REQUIRE_CAPABILITY
public static final IndexerField FLD_BUNDLE_REQUIRE_CAPABILITY
-
FLD_BUNDLE_FRAGMENT_HOST
public static final IndexerField FLD_BUNDLE_FRAGMENT_HOST
-
FLD_BUNDLE_REQUIRED_EXECUTION_ENVIRONMENT
public static final IndexerField FLD_BUNDLE_REQUIRED_EXECUTION_ENVIRONMENT
-
-
Method Detail
-
getIndexerFields
public java.util.Collection<IndexerField> getIndexerFields()
Description copied from interface:IndexCreatorReturns the indexer fields that this IndexCreator introduces to index.- Returns:
-
populateArtifactInfo
public void populateArtifactInfo(ArtifactContext artifactContext) throws java.io.IOException
Description copied from interface:IndexCreatorPopulate anArtifactContextwith information about corresponding artifact.- Throws:
java.io.IOException
-
updateDocument
public void updateDocument(ArtifactInfo artifactInfo, org.apache.lucene.document.Document document)
Description copied from interface:IndexCreatorUpdate LuceneDocumentfrom a givenArtifactInfo.
-
updateArtifactInfo
public boolean updateArtifactInfo(org.apache.lucene.document.Document document, ArtifactInfo artifactInfo)Description copied from interface:IndexCreatorUpdate anArtifactInfofrom given LuceneDocument.- Returns:
- true is artifact info has been updated
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-