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 AbstractIndexCreator
This 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
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
BD
private static java.lang.String
BDU
private static java.lang.String
BEP
private static java.lang.String
BES
Deprecated.private static java.lang.String
BIP
private static java.lang.String
BL
private static java.lang.String
BN
private static java.lang.String
BRB
private static java.lang.String
BSN
private static java.lang.String
BUNDLE_REQUIRED_EXECUTION_ENVIRONMENT
private static java.lang.String
BV
static IndexerField
FLD_BUNDLE_DESCRIPTION
static IndexerField
FLD_BUNDLE_DOCURL
static IndexerField
FLD_BUNDLE_EXPORT_PACKAGE
static IndexerField
FLD_BUNDLE_EXPORT_SERVIVE
Deprecated.static IndexerField
FLD_BUNDLE_FRAGMENT_HOST
static IndexerField
FLD_BUNDLE_IMPORT_PACKAGE
static IndexerField
FLD_BUNDLE_LICENSE
static IndexerField
FLD_BUNDLE_NAME
static IndexerField
FLD_BUNDLE_PROVIDE_CAPABILITY
static IndexerField
FLD_BUNDLE_REQUIRE_BUNDLE
static IndexerField
FLD_BUNDLE_REQUIRE_CAPABILITY
static IndexerField
FLD_BUNDLE_REQUIRED_EXECUTION_ENVIRONMENT
static IndexerField
FLD_BUNDLE_SYMBOLIC_NAME
static IndexerField
FLD_BUNDLE_VERSION
static IndexerField
FLD_SHA256
private static java.lang.String
FRAGMENT_HOST
static java.lang.String
ID
private static java.lang.String
PROVIDE_CAPABILITY
private static java.lang.String
REQUIRE_CAPABILITY
-
Constructor Summary
Constructors Constructor Description OsgiArtifactIndexCreator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.lang.String
computeSha256(java.io.File f)
java.util.Collection<IndexerField>
getIndexerFields()
Returns the indexer fields that this IndexCreator introduces to index.void
populateArtifactInfo(ArtifactContext artifactContext)
Populate anArtifactContext
with information about corresponding artifact.java.lang.String
toString()
boolean
updateArtifactInfo(org.apache.lucene.document.Document document, ArtifactInfo artifactInfo)
Update anArtifactInfo
from given LuceneDocument
.private boolean
updateArtifactInfo(ArtifactInfo ai, java.io.File f)
void
updateDocument(ArtifactInfo artifactInfo, org.apache.lucene.document.Document document)
Update LuceneDocument
from 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
-
BSN
private static final java.lang.String BSN
- See Also:
- Constant Field Values
-
FLD_BUNDLE_SYMBOLIC_NAME
public static final IndexerField FLD_BUNDLE_SYMBOLIC_NAME
-
BV
private static final java.lang.String BV
- See Also:
- Constant Field Values
-
FLD_BUNDLE_VERSION
public static final IndexerField FLD_BUNDLE_VERSION
-
BEP
private static final java.lang.String BEP
- See Also:
- Constant Field Values
-
FLD_BUNDLE_EXPORT_PACKAGE
public static final IndexerField FLD_BUNDLE_EXPORT_PACKAGE
-
BES
@Deprecated private static final java.lang.String BES
Deprecated.- See Also:
- Constant Field Values
-
FLD_BUNDLE_EXPORT_SERVIVE
@Deprecated public static final IndexerField FLD_BUNDLE_EXPORT_SERVIVE
Deprecated.
-
BD
private static final java.lang.String BD
- See Also:
- Constant Field Values
-
FLD_BUNDLE_DESCRIPTION
public static final IndexerField FLD_BUNDLE_DESCRIPTION
-
BN
private static final java.lang.String BN
- See Also:
- Constant Field Values
-
FLD_BUNDLE_NAME
public static final IndexerField FLD_BUNDLE_NAME
-
BL
private static final java.lang.String BL
- See Also:
- Constant Field Values
-
FLD_BUNDLE_LICENSE
public static final IndexerField FLD_BUNDLE_LICENSE
-
BDU
private static final java.lang.String BDU
- See Also:
- Constant Field Values
-
FLD_BUNDLE_DOCURL
public static final IndexerField FLD_BUNDLE_DOCURL
-
BIP
private static final java.lang.String BIP
- See Also:
- Constant Field Values
-
FLD_BUNDLE_IMPORT_PACKAGE
public static final IndexerField FLD_BUNDLE_IMPORT_PACKAGE
-
BRB
private static final java.lang.String BRB
- See Also:
- Constant Field Values
-
FLD_BUNDLE_REQUIRE_BUNDLE
public static final IndexerField FLD_BUNDLE_REQUIRE_BUNDLE
-
PROVIDE_CAPABILITY
private static final java.lang.String PROVIDE_CAPABILITY
- See Also:
- Constant Field Values
-
FLD_BUNDLE_PROVIDE_CAPABILITY
public static final IndexerField FLD_BUNDLE_PROVIDE_CAPABILITY
-
REQUIRE_CAPABILITY
private static final java.lang.String REQUIRE_CAPABILITY
- See Also:
- Constant Field Values
-
FLD_BUNDLE_REQUIRE_CAPABILITY
public static final IndexerField FLD_BUNDLE_REQUIRE_CAPABILITY
-
FRAGMENT_HOST
private static final java.lang.String FRAGMENT_HOST
- See Also:
- Constant Field Values
-
FLD_BUNDLE_FRAGMENT_HOST
public static final IndexerField FLD_BUNDLE_FRAGMENT_HOST
-
BUNDLE_REQUIRED_EXECUTION_ENVIRONMENT
private static final java.lang.String BUNDLE_REQUIRED_EXECUTION_ENVIRONMENT
- See Also:
- Constant Field Values
-
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:IndexCreator
Returns the indexer fields that this IndexCreator introduces to index.- Returns:
-
populateArtifactInfo
public void populateArtifactInfo(ArtifactContext artifactContext) throws java.io.IOException
Description copied from interface:IndexCreator
Populate anArtifactContext
with information about corresponding artifact.- Throws:
java.io.IOException
-
updateDocument
public void updateDocument(ArtifactInfo artifactInfo, org.apache.lucene.document.Document document)
Description copied from interface:IndexCreator
Update LuceneDocument
from a givenArtifactInfo
.
-
updateArtifactInfo
public boolean updateArtifactInfo(org.apache.lucene.document.Document document, ArtifactInfo artifactInfo)
Description copied from interface:IndexCreator
Update anArtifactInfo
from given LuceneDocument
.- Returns:
- true is artifact info has been updated
-
updateArtifactInfo
private boolean updateArtifactInfo(ArtifactInfo ai, java.io.File f) throws java.io.IOException
- Throws:
java.io.IOException
-
computeSha256
private java.lang.String computeSha256(java.io.File f) throws java.io.IOException
- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-