Class JCMSUploadIndexer
- java.lang.Object
-
- com.jalios.jcms.fileprocessor.repository.jcmsupload.JCMSUploadIndexer
-
- All Implemented Interfaces:
RepositoryIndexer
public class JCMSUploadIndexer extends java.lang.Object implements RepositoryIndexer
Implementation of the RepositoryIndexer for the JCMS upload directory.- Version:
- $Revision: 106034 $
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
REVISION
-
Constructor Summary
Constructors Constructor Description JCMSUploadIndexer()
Public contructor without argument.
-
Method Summary
All Methods Instance Methods Concrete 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 file 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.
-
-
-
Field Detail
-
REVISION
public static final java.lang.String REVISION
- See Also:
- Constant Field Values
-
-
Method Detail
-
addFile
public void addFile(java.io.File file, java.io.File textFile, java.util.Map<java.lang.String,java.lang.Object> ctxt)
Add a file to this Index.- Specified by:
addFile
in interfaceRepositoryIndexer
- Parameters:
file
- the File to add in indextextFile
- a text containing the text extracted for the File to add in indexctxt
- context
-
removeFile
public void removeFile(java.io.File file, java.util.Map<java.lang.String,java.lang.Object> ctxt)
Remove a file from this index- Specified by:
removeFile
in interfaceRepositoryIndexer
- Parameters:
file
- the File to remove from indexctxt
- context
-
setLuceneIndex
public void setLuceneIndex(java.io.File pluceneIndex)
Description copied from interface:RepositoryIndexer
Set the directory of the Lucene Index in wich the files of the repository have to be indexed.- Specified by:
setLuceneIndex
in interfaceRepositoryIndexer
- Parameters:
pluceneIndex
- the directory of the Lucene Index
-
getLuceneIndex
public java.io.File getLuceneIndex()
Description copied from interface:RepositoryIndexer
Gives the directory of the Lucene Index in wich the files of the repository have to be indexed.- Specified by:
getLuceneIndex
in interfaceRepositoryIndexer
- Returns:
- the directory of the Lucene Index
-
getExternalURL
public java.lang.String getExternalURL(java.io.File file, javax.servlet.http.HttpServletRequest request, Repository repository)
Description copied from interface:RepositoryIndexer
Gives an URL to access to files externally, given the file.- Specified by:
getExternalURL
in 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:RepositoryIndexer
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.- Specified by:
provideExternalURLForFiles
in interfaceRepositoryIndexer
- Returns:
- true if an URL is provided for access to files.
-
-