Class PageIndexer

  • All Implemented Interfaces:
    SearchIndexer

    public class PageIndexer
    extends java.lang.Object
    implements SearchIndexer
    Indexer service for pages
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String INDEX_TYPE_PAGE  
      static java.lang.String INDEXER_NAME  
    • Constructor Summary

      Constructors 
      Constructor Description
      PageIndexer()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getDescription()
      Returns the indexer service description
      java.util.List<org.apache.lucene.document.Document> getDocuments​(java.lang.String nIdDocument)
      Returns a List of lucene documents to add to the index
      java.util.List<java.lang.String> getListType()
      Returns all the types of document the service may index.
      java.lang.String getName()
      Returns the indexer service name
      java.lang.String getSpecificSearchAppUrl()
      Returns the search app dedicated to the documents indexed by the service
      java.lang.String getVersion()
      Returns the indexer service version
      void indexDocuments()
      Index all lucene documents from the plugin, replace List<Document> getDocuments( ) method
      boolean isEnable()
      Tells whether the service is enable or not
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PageIndexer

        public PageIndexer()
    • Method Detail

      • indexDocuments

        public void indexDocuments()
                            throws java.io.IOException,
                                   java.lang.InterruptedException,
                                   SiteMessageException
        Index all lucene documents from the plugin, replace List<Document> getDocuments( ) method
        Specified by:
        indexDocuments in interface SearchIndexer
        Throws:
        java.io.IOException - If an IO error occured
        java.lang.InterruptedException - If a thread error occured
        SiteMessageException - occurs when a site message need to be displayed
      • getDocuments

        public java.util.List<org.apache.lucene.document.Document> getDocuments​(java.lang.String nIdDocument)
                                                                         throws java.io.IOException,
                                                                                java.lang.InterruptedException,
                                                                                SiteMessageException
        Returns a List of lucene documents to add to the index
        Specified by:
        getDocuments in interface SearchIndexer
        Parameters:
        nIdDocument - document id
        Returns:
        A List of lucene documents to add to the index
        Throws:
        java.io.IOException - If an IO error occured
        java.lang.InterruptedException - If a thread error occured
        SiteMessageException - occurs when a site message need to be displayed
      • getName

        public java.lang.String getName()
        Returns the indexer service name
        Specified by:
        getName in interface SearchIndexer
        Returns:
        the indexer service name
      • getVersion

        public java.lang.String getVersion()
        Returns the indexer service version
        Specified by:
        getVersion in interface SearchIndexer
        Returns:
        the indexer service version
      • getDescription

        public java.lang.String getDescription()
        Returns the indexer service description
        Specified by:
        getDescription in interface SearchIndexer
        Returns:
        the indexer service description
      • isEnable

        public boolean isEnable()
        Tells whether the service is enable or not
        Specified by:
        isEnable in interface SearchIndexer
        Returns:
        true if enable, otherwise false
      • getSpecificSearchAppUrl

        public java.lang.String getSpecificSearchAppUrl()
        Returns the search app dedicated to the documents indexed by the service
        Specified by:
        getSpecificSearchAppUrl in interface SearchIndexer
        Returns:
        the url of the app page