fr.paris.lutece.plugins.helpdesk.service.search
Class HelpdeskIndexer

java.lang.Object
  extended by fr.paris.lutece.plugins.helpdesk.service.search.HelpdeskIndexer
All Implemented Interfaces:
fr.paris.lutece.portal.service.search.SearchIndexer

public class HelpdeskIndexer
extends Object
implements fr.paris.lutece.portal.service.search.SearchIndexer

Helpdesk Indexer


Field Summary
static String PROPERTY_INDEXER_NAME
           
static String SHORT_NAME_QUESTION_ANSWER
           
static String SHORT_NAME_SUBJECT
           
 
Constructor Summary
HelpdeskIndexer()
           
 
Method Summary
 String getDescription()
          Returns the indexer service description
static org.apache.lucene.document.Document getDocument(int nIdFaq, QuestionAnswer questionAnswer, String strUrl, String strRoleKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Builds a document which will be used by Lucene during the indexing of the question/answer list
static org.apache.lucene.document.Document getDocument(Subject subject, String strRoleKey, String strUrl, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Builds a document which will be used by Lucene during the indexing of the subject list
 List<org.apache.lucene.document.Document> getDocuments(String strDocument)
          Get the subject document
 List<String> getListType()
          
 String getName()
          Get the name of the indexer.
 String getSpecificSearchAppUrl()
          
 String getVersion()
          Get the version of the indexer
 void indexDocuments()
          Index all documents
 void indexSubject(Faq faq, Subject subject)
          Recursive method for indexing a subject and his children
 boolean isEnable()
          Get the state of indexer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_INDEXER_NAME

public static final String PROPERTY_INDEXER_NAME
See Also:
Constant Field Values

SHORT_NAME_SUBJECT

public static final String SHORT_NAME_SUBJECT
See Also:
Constant Field Values

SHORT_NAME_QUESTION_ANSWER

public static final String SHORT_NAME_QUESTION_ANSWER
See Also:
Constant Field Values
Constructor Detail

HelpdeskIndexer

public HelpdeskIndexer()
Method Detail

getDescription

public String getDescription()
Returns the indexer service description

Specified by:
getDescription in interface fr.paris.lutece.portal.service.search.SearchIndexer
Returns:
The indexer service description

indexDocuments

public void indexDocuments()
                    throws IOException,
                           InterruptedException,
                           fr.paris.lutece.portal.service.message.SiteMessageException
Index all documents

Specified by:
indexDocuments in interface fr.paris.lutece.portal.service.search.SearchIndexer
Throws:
IOException - the exception
InterruptedException - the exception
fr.paris.lutece.portal.service.message.SiteMessageException - the exception

indexSubject

public void indexSubject(Faq faq,
                         Subject subject)
                  throws IOException,
                         InterruptedException
Recursive method for indexing a subject and his children

Parameters:
faq - the faq linked to the subject
subject - the subject
Throws:
IOException - I/O Exception
InterruptedException - interruptedException

getDocuments

public List<org.apache.lucene.document.Document> getDocuments(String strDocument)
                                                       throws IOException,
                                                              InterruptedException,
                                                              fr.paris.lutece.portal.service.message.SiteMessageException
Get the subject document

Specified by:
getDocuments in interface fr.paris.lutece.portal.service.search.SearchIndexer
Parameters:
strDocument - id of the subject to index
Returns:
The list of lucene documents
Throws:
IOException - the exception
InterruptedException - the exception
fr.paris.lutece.portal.service.message.SiteMessageException - the exception

getDocument

public static org.apache.lucene.document.Document getDocument(int nIdFaq,
                                                              QuestionAnswer questionAnswer,
                                                              String strUrl,
                                                              String strRoleKey,
                                                              fr.paris.lutece.portal.service.plugin.Plugin plugin)
                                                       throws IOException,
                                                              InterruptedException
Builds a document which will be used by Lucene during the indexing of the question/answer list

Parameters:
nIdFaq - The Faq Id
questionAnswer - the QuestionAnswer to index
strUrl - the url of the subject
strRoleKey - The role key
plugin - The Plugin
Returns:
A Lucene Document containing QuestionAnswer Data
Throws:
IOException - The IO Exception
InterruptedException - The InterruptedException

getDocument

public static org.apache.lucene.document.Document getDocument(Subject subject,
                                                              String strRoleKey,
                                                              String strUrl,
                                                              fr.paris.lutece.portal.service.plugin.Plugin plugin)
                                                       throws IOException,
                                                              InterruptedException
Builds a document which will be used by Lucene during the indexing of the subject list

Parameters:
subject - the Subject to index
strUrl - the url of the subject
strRoleKey - The role key
plugin - The Plugin
Returns:
The Lucene Document containing Subject data
Throws:
IOException - The IO Exception
InterruptedException - The InterruptedException

getName

public String getName()
Get the name of the indexer.

Specified by:
getName in interface fr.paris.lutece.portal.service.search.SearchIndexer
Returns:
The name

getVersion

public String getVersion()
Get the version of the indexer

Specified by:
getVersion in interface fr.paris.lutece.portal.service.search.SearchIndexer
Returns:
The version number

isEnable

public boolean isEnable()
Get the state of indexer

Specified by:
isEnable in interface fr.paris.lutece.portal.service.search.SearchIndexer
Returns:
Return true if the indexer is enabled, false else.

getListType

public List<String> getListType()

Specified by:
getListType in interface fr.paris.lutece.portal.service.search.SearchIndexer

getSpecificSearchAppUrl

public String getSpecificSearchAppUrl()

Specified by:
getSpecificSearchAppUrl in interface fr.paris.lutece.portal.service.search.SearchIndexer


Copyright © 2013 Mairie de Paris. All Rights Reserved.