KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > jetspeed > services > search > SearchService


1 /*
2  * Copyright 2000-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.jetspeed.services.search;
17
18 import java.util.Collection JavaDoc;
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 JavaDoc SERVICE_NAME = "Search";
32
33     /**
34      * Add index entry
35      *
36      * @param o
37      * @return
38      */

39     public boolean add(Object JavaDoc o);
40
41     /**
42      * Add collection of index entries
43      *
44      * @param c
45      * @return
46      */

47     public boolean add(Collection JavaDoc c);
48
49     /**
50      * Remove index entry
51      *
52      * @param o
53      * @return
54      */

55     public boolean remove(Object JavaDoc o);
56
57     /**
58      * Remove collection of index entries
59      *
60      * @param c
61      * @return
62      */

63     public boolean remove(Collection JavaDoc c);
64
65     /**
66      * Update index entry
67      *
68      * @param o
69      * @return
70      */

71     public boolean update(Object JavaDoc o);
72
73     /**
74      * Update index entries
75      *
76      * @param c
77      * @return
78      */

79     public boolean update(Collection JavaDoc c);
80
81     /**
82      * Search the index
83      *
84      * @param search
85      * @return
86      */

87     public SearchResults search(String JavaDoc search);
88 }
89
Popular Tags