com.jalios.jcms.fileprocessor.repository
Interface RepositoryIndexer

All Known Implementing Classes:
JCMSUploadIndexer

public interface RepositoryIndexer

Represents the way indexation must be done for a repository.

Version:
$Revision: 49380 $

Method Summary
 void addFile(File file, String content, Map<String,Object> ctxt)
          Add a lucene Document to this Index.
 String getExternalURL(File file, javax.servlet.http.HttpServletRequest request, Repository repository)
          Gives an URL to access to files externally, given the file.
 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(File file, Map<String,Object> ctxt)
          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 Detail

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,
             String content,
             Map<String,Object> ctxt)
Add a lucene Document to this Index.

Parameters:
file - the File to add in index
content - the textual content that could be extracted for this file
ctxt - context

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


Copyright © 2001-2010 Jalios SA. All Rights Reserved.