01: /**********************************************************************************
02: *
03: * Copyright (c) 2003, 2004 The Regents of the University of Michigan, Trustees of Indiana University,
04: * Board of Trustees of the Leland Stanford, Jr., University, and The MIT Corporation
05: *
06: * Licensed under the Educational Community License Version 1.0 (the "License");
07: * By obtaining, using and/or copying this Original Work, you agree that you have read,
08: * understand, and will comply with the terms and conditions of the Educational Community License.
09: * You may obtain a copy of the License at:
10: *
11: * http://cvs.sakaiproject.org/licenses/license_1_0.html
12: *
13: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
14: * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
15: * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
16: * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
17: * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18: *
19: **********************************************************************************/package edu.indiana.lib.twinpeaks.search;
20:
21: import edu.indiana.lib.twinpeaks.util.*;
22:
23: import java.util.*;
24:
25: public interface QueryInterface {
26:
27: /**
28: * Common initialization
29: * @param session Session context for this query
30: */
31: public void initialize(SessionContext session);
32:
33: /**
34: * Do a query
35: */
36: public void doQuery();
37:
38: /**
39: * Parse request parameters
40: * @param parameterMap A map of request details (name=value pairs)
41: */
42: public void parseRequest(Map parameterMap);
43:
44: /**
45: * Fetch a request parameter by name
46: * @param name Parameter name
47: * @return Parameter value
48: */
49: public String getRequestParameter(String name);
50:
51: /**
52: * Get query results
53: * @return The results page (as a byte array)
54: */
55: public byte[] getResponseBytes();
56:
57: /**
58: * Get query results
59: * @return The results page (as a String)
60: */
61: public String getResponseString();
62: }
|