KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > columba > core > search > api > ISearchManager


1 package org.columba.core.search.api;
2
3 import java.util.Iterator JavaDoc;
4 import java.util.List JavaDoc;
5
6 /**
7  * Search Provider Registry.
8  *
9  * @author frd
10  */

11 public interface ISearchManager {
12
13     public void registerProvider(ISearchProvider p);
14     public void unregisterProvider(ISearchProvider p);
15     
16     public ISearchProvider getProvider(String JavaDoc technicalName);
17     
18     public Iterator JavaDoc<ISearchProvider> getAllProviders();
19     
20     /**
21      * Execute query and retrieve pageable search result for given search term.
22      * <p>
23      * The query returns <code>resultCount</code> individual results, from
24      * a given <code>startIndex</code>. Paging should be supported, so its
25      * up to the underlying implementation to use an intelligent caching
26      * strategy or whatsoever.
27      *
28      * @param searchTerm search term
29      * @param searchInside search inside previous search results
30      * @param startIndex start index of search results
31      * @param resultCount total count of results
32      */

33     public void executeSearch(String JavaDoc searchTerm, boolean searchInside, int startIndex, int resultCount);
34     
35     
36     /**
37      * Execute query and retrieve pageable search result for given search term.
38      * <p>
39      * The query returns <code>resultCount</code> individual results, from
40      * a given <code>startIndex</code>. Paging should be supported, so its
41      * up to the underlying implementation to use an intelligent caching
42      * strategy or whatsoever.
43      *
44      * @param searchTerm
45      * @param providerName
46      * @param startIndex start index of search results
47      * @param resultCount total count of results
48      *
49      */

50     public void executeSearch(String JavaDoc searchTerm, String JavaDoc providerName, boolean searchInside, int startIndex, int resultCount);
51     
52     /**
53      * Execute query and retrieve pageable search result for given search term.
54      * <p>
55      * The query returns <code>resultCount</code> individual results, from
56      * a given <code>startIndex</code>. Paging should be supported, so its
57      * up to the underlying implementation to use an intelligent caching
58      * strategy or whatsoever.
59      *
60      * @param searchTerm
61      * @param providerName
62      * @param criteriaName
63      * @param startIndex start index of search results
64      * @param resultCount total count of results
65      *
66      */

67     public void executeSearch(String JavaDoc searchTerm, String JavaDoc providerName, String JavaDoc criteriaName, boolean searchInside, int startIndex, int resultCount);
68     
69     
70     public void executeSearch(List JavaDoc<ISearchRequest> requests, boolean allCriteria, boolean searchInside, int startIndex, int resultCount);
71     
72     /**
73      * Clear a search and discard all cached data for this <code>searchTerm</code>.
74      *
75      * @param searchTerm search term
76      */

77     public void clearSearch(String JavaDoc searchTerm);
78     
79     public void reset();
80     
81     public void addResultListener(IResultListener listener);
82     public void removeResultListener(IResultListener listener);
83 }
84
Popular Tags