Class JCMSUploadIndexer
java.lang.Object
com.jalios.jcms.fileprocessor.repository.jcmsupload.JCMSUploadIndexer
- All Implemented Interfaces:
RepositoryIndexer
Implementation of the RepositoryIndexer for the JCMS upload directory.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a file 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.
-
Constructor Details
-
JCMSUploadIndexer
public JCMSUploadIndexer()Public contructor without argument.
-
-
Method Details
-
addFile
Add a file to this Index.- Specified by:
addFilein interfaceRepositoryIndexer- Parameters:
file- the File to add in indextextFile- a text containing the text extracted for the File to add in indexctxt- context
-
removeFile
Remove a file from this index- Specified by:
removeFilein interfaceRepositoryIndexer- Parameters:
file- the File to remove from indexctxt- context
-
setLuceneIndex
Description copied from interface:RepositoryIndexerSet the directory of the Lucene Index in wich the files of the repository have to be indexed.- Specified by:
setLuceneIndexin interfaceRepositoryIndexer- Parameters:
pluceneIndex- the directory of the Lucene Index
-
getLuceneIndex
Description copied from interface:RepositoryIndexerGives the directory of the Lucene Index in wich the files of the repository have to be indexed.- Specified by:
getLuceneIndexin interfaceRepositoryIndexer- Returns:
- the directory of the Lucene Index
-
getExternalURL
public String getExternalURL(File file, javax.servlet.http.HttpServletRequest request, Repository repository) Description copied from interface:RepositoryIndexerGives an URL to access to files externally, given the file.- Specified by:
getExternalURLin interfaceRepositoryIndexer- Parameters:
file- the file to accessrequest- the current HTTP requestrepository- the repository for the file- Returns:
- an URL to access to files
-
provideExternalURLForFiles
public boolean provideExternalURLForFiles()Description copied from interface:RepositoryIndexerThis 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.- Specified by:
provideExternalURLForFilesin interfaceRepositoryIndexer- Returns:
- true if an URL is provided for access to files.
-