Class 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
    • Constructor Detail

      • OsgiArtifactIndexCreator

        public OsgiArtifactIndexCreator()
    • 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 an ArtifactContext 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 Lucene Document from a given ArtifactInfo.
      • updateArtifactInfo

        public boolean updateArtifactInfo​(org.apache.lucene.document.Document document,
                                          ArtifactInfo artifactInfo)
        Description copied from interface: IndexCreator
        Update an ArtifactInfo from given Lucene Document.
        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 class java.lang.Object