KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > services > indexing > IndexerPlugin


1 /***************************************************************************
2  * Copyright 2001-2003 The eXo Platform SARL All rights reserved. *
3  * Please look at license.txt in info directory for more license detail. *
4  **************************************************************************/

5 package org.exoplatform.services.indexing;
6
7 /**
8  * @author Tuan Nguyen (tuan08@users.sourceforge.net)
9  * @since Sep 12, 2004
10  * @version $Id: IndexerPlugin.java,v 1.7 2004/11/01 15:07:51 tuan08 Exp $
11  */

12 public interface IndexerPlugin {
13   final static public String JavaDoc[] MANDATORY_FIELDS =
14     {IndexingService.IDENTIFIER_FIELD, IndexingService.MODULE_FIELD,
15      IndexingService.TITLE_FIELD, IndexingService.DOCUMENT_FIELD};
16   
17   final static public String JavaDoc UNSYNCHRONIZED_DATABASE =
18     "You usually have this message when your database and lucence indexed database are not " +
19     "synchrnonized. The problem is occured when you use a new database or other db tool to delete " +
20     "a record from database while you still using the old lucence indexed database. To solve " +
21     "the problem , you should login as the admin and reindex the one all the services";
22   
23   public String JavaDoc getPluginIdentifier() ;
24   
25   public String JavaDoc[] getMandatoryIndexFields() ;
26   public String JavaDoc[] getCustomizedIndexFields() ;
27   
28   public Searcher getSearcher() throws Exception JavaDoc ;
29   
30   public void resetSearcher() ;
31   
32   public Object JavaDoc getObject(String JavaDoc user, String JavaDoc objectId) throws Exception JavaDoc ;
33   public String JavaDoc getObjectAsText(String JavaDoc user, String JavaDoc objectId) throws Exception JavaDoc ;
34   public String JavaDoc getObjectAsXHTML(String JavaDoc user, String JavaDoc objectId) throws Exception JavaDoc ;
35   public String JavaDoc getObjectAsXML(String JavaDoc user, String JavaDoc objectId) throws Exception JavaDoc ;
36   
37   
38   public void removeIndex() throws Exception JavaDoc ;
39   
40   public void reindex() throws Exception JavaDoc ;
41 }
Popular Tags