1 /**
2 * Copyright 2005-2015 The Kuali Foundation
3 *
4 * Licensed under the Educational Community 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.opensource.org/licenses/ecl2.php
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.kuali.rice.kew.docsearch;
17
18 import java.util.List;
19
20 import org.kuali.rice.kew.doctype.bo.DocumentType;
21 import org.kuali.rice.kns.web.ui.Row;
22
23 /**
24 * Used by the document search helper to produce rows to render for the document search screen.
25 *
26 * @author Kuali Rice Team (rice.collab@kuali.org)
27 *
28 */
29 public interface DocumentSearchCriteriaProcessor {
30
31 /**
32 * Constructs the list of rows and fields to display in the lookup criteria section of the document search screen.
33 * The documentType parameter passed to this method will generally be supplied in cases where the document type name
34 * was supplied to the lookup via a query parameter or when refreshing the criteria after making a change to it
35 * (like the user doing a document type lookup to fill in the value and then returning it back to the document search).
36 *
37 * <p>This method should look at the given document type (if there is one) to determine if there are any custom
38 * rows to render for that document type. It should also look at the request for detailed and super user search
39 * and adjust the rows accordingly for either of those conditions.</p>
40 *
41 * @param documentType supplies the document type in use on this search if one is specified, will be null otherwise
42 * @param defaultRows the default set of rows that are supplied from the data dictionary for the document search
43 * @param detailed indicates whether or not a detailed search has been requested
44 * @param superSearch indicates whether or not a super user search has been requested
45 *
46 * @return the rows to render is the criteria section of the document search.
47 */
48 List<Row> getRows(DocumentType documentType, List<Row> defaultRows, boolean detailed, boolean superSearch);
49
50 }