Interface RepositoryIndexer
- All Known Implementing Classes:
JCMSUploadIndexer
public interface RepositoryIndexer
Represents the way indexation must be done for a repository.
-
Method Summary
Modifier and TypeMethodDescriptionvoidAdd 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.booleanThis class may provide an external format for users to acces files.voidremoveFile(File file, Map<String, Object> ctxt) Remove a file from this indexvoidsetLuceneIndex(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
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
Remove a file from this index- Parameters:
file- the File to remove from indexctxt- context
-
addFile
Add a lucene Document to this Index.- Parameters:
file- the File to add in indextextFile- a text containing the text extracted for the File to add in indexctxt- 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 accessrequest- the current HTTP requestrepository- the repository for the file- Returns:
- an URL to access to files
-