Interface RepositoryIndexer

All Known Implementing Classes:
JCMSUploadIndexer

public interface RepositoryIndexer
Represents the way indexation must be done for a repository.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addFile(File file, File textFile, Map<String,Object> ctxt)
    Add a lucene Document to this Index.
    getExternalURL(File file, javax.servlet.http.HttpServletRequest request, Repository repository)
    Gives an URL to access to files externally, given the file.
    Gives the directory of the Lucene Index in wich the files of the repository have to be indexed.
    boolean
    This class may provide an external format for users to acces files.
    void
    Remove a file from this index
    void
    setLuceneIndex(File pluceneIndex)
    Set the directory of the Lucene Index in wich the files of the repository have to be indexed.
  • Method Details

    • getLuceneIndex

      File getLuceneIndex()
      Gives the directory of the Lucene Index in wich the files of the repository have to be indexed.
      Returns:
      the directory of the Lucene Index
    • setLuceneIndex

      void setLuceneIndex(File pluceneIndex)
      Set the directory of the Lucene Index in wich the files of the repository have to be indexed.
      Parameters:
      pluceneIndex - the directory of the Lucene Index
    • removeFile

      void removeFile(File file, Map<String,Object> ctxt)
      Remove a file from this index
      Parameters:
      file - the File to remove from index
      ctxt - context
    • addFile

      void addFile(File file, File textFile, Map<String,Object> ctxt)
      Add a lucene Document to this Index.
      Parameters:
      file - the File to add in index
      textFile - a text containing the text extracted for the File to add in index
      ctxt - context
      Since:
      JCMS-5312
    • provideExternalURLForFiles

      boolean provideExternalURLForFiles()
      This class may provide an external format for users to acces files. This is done by @see getExternalURL. This method returns true if it is possible to use the getExternalURL for the files.
      Returns:
      true if an URL is provided for access to files.
    • getExternalURL

      String getExternalURL(File file, javax.servlet.http.HttpServletRequest request, Repository repository)
      Gives an URL to access to files externally, given the file.
      Parameters:
      file - the file to access
      request - the current HTTP request
      repository - the repository for the file
      Returns:
      an URL to access to files