1 package org.marketchangers.prayer;
2
3 import java.io.IOException;
4 import java.util.Collection;
5 import java.util.Collections;
6 import java.util.List;
7
8 /***
9 * @author <a href="mailto:mtodd@wc-group.com">Matthew Todd</a>
10 */
11 public interface PrayerRequestSearcher {
12 public void index(PrayerRequest request);
13 public void index(Collection requests);
14
15 /***
16 * By this point, organizationName has been mapped to a list of users, and
17 * the whole list has been filtered to just those the intercessor has
18 * permission to view.
19 */
20 public List search(PrayerRequestQuery query);
21
22 public void updateStatus(PrayerRequest reqeust);
23 public void delete(int docId) throws IOException;
24
25
26 public static final PrayerRequestSearcher NULL_OBJECT =
27 new PrayerRequestSearcher() {
28
29 public void index(PrayerRequest request) {
30 }
31
32 public void index(Collection requests) {
33 }
34
35 public List search(PrayerRequestQuery query) {
36 return Collections.EMPTY_LIST;
37 }
38
39 public void updateStatus(PrayerRequest request) {
40 }
41
42 public void delete(int docId) throws IOException {
43 }
44 };
45 }