1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.jetspeed.services.search;
17
18 import java.util.Collection;
19
20 /***
21 * Contract for implementing a search service.
22 *
23 * @author <a href="mailto:taylor@apache.org">David Sean taylor</a>
24 * @version $Id: SearchService.java,v 1.3 2004/02/23 03:48:47 jford Exp $
25 */
26 public interface SearchService
27 {
28 /***
29 * Service name
30 */
31 public static final String SERVICE_NAME = "Search";
32
33 /***
34 * Add index entry
35 *
36 * @param o
37 * @return
38 */
39 public boolean add(Object o);
40
41 /***
42 * Add collection of index entries
43 *
44 * @param c
45 * @return
46 */
47 public boolean add(Collection c);
48
49 /***
50 * Remove index entry
51 *
52 * @param o
53 * @return
54 */
55 public boolean remove(Object o);
56
57 /***
58 * Remove collection of index entries
59 *
60 * @param c
61 * @return
62 */
63 public boolean remove(Collection c);
64
65 /***
66 * Update index entry
67 *
68 * @param o
69 * @return
70 */
71 public boolean update(Object o);
72
73 /***
74 * Update index entries
75 *
76 * @param c
77 * @return
78 */
79 public boolean update(Collection c);
80
81 /***
82 * Search the index
83 *
84 * @param search
85 * @return
86 */
87 public SearchResults search(String search);
88 }