01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package org.apache.portals.gems.browser;
18:
19: import java.util.List;
20:
21: import javax.portlet.PortletRequest;
22:
23: import org.apache.velocity.context.Context;
24:
25: /**
26: * Browser Query Fetch Interface
27: *
28: * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
29: * @version $Id: BrowserQuery.java 516448 2007-03-09 16:25:47Z ate $
30: *
31: */
32: public interface BrowserQuery {
33:
34: /**
35: * This method returns the query to be executed to get the results which will
36: * be opened in the browser.
37: *
38: */
39: public String getQueryString(PortletRequest request, Context context);
40:
41: /**
42: * Filter the row programmatically on a query.
43: * By returning true, instruct the database browser to filter the row.
44: * By returning false, instruct the database browser to keep the row.
45: * (Filtering means removing the row from the final result set).
46: *
47: * @param row The row being inspected for filtration.
48: * @return True to filter the row, false to keep it.
49: */
50: public boolean filter(List row, PortletRequest request);
51:
52: /*
53: * Set a list of JDBC query parameters.
54: * All members of this list must be java objects (not primitives)
55: * Should be called from derived classes.
56: *
57: */
58: public void setSQLParameters(List parameters);
59:
60: public List getSQLParameters();
61:
62: }
|