Interface RepositoryIndexer
-
- All Known Implementing Classes:
JCMSUploadIndexer
public interface RepositoryIndexer
Represents the way indexation must be done for a repository.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addFile(java.io.File file, java.io.File textFile, java.util.Map<java.lang.String,java.lang.Object> ctxt)
Add a lucene Document to this Index.java.lang.String
getExternalURL(java.io.File file, javax.servlet.http.HttpServletRequest request, Repository repository)
Gives an URL to access to files externally, given the file.java.io.File
getLuceneIndex()
Gives the directory of the Lucene Index in wich the files of the repository have to be indexed.boolean
provideExternalURLForFiles()
This class may provide an external format for users to acces files.void
removeFile(java.io.File file, java.util.Map<java.lang.String,java.lang.Object> ctxt)
Remove a file from this indexvoid
setLuceneIndex(java.io.File pluceneIndex)
Set the directory of the Lucene Index in wich the files of the repository have to be indexed.
-
-
-
Method Detail
-
getLuceneIndex
java.io.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(java.io.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(java.io.File file, java.util.Map<java.lang.String,java.lang.Object> ctxt)
Remove a file from this index- Parameters:
file
- the File to remove from indexctxt
- context
-
addFile
void addFile(java.io.File file, java.io.File textFile, java.util.Map<java.lang.String,java.lang.Object> ctxt)
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
java.lang.String getExternalURL(java.io.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
-
-