Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
DocumentSearchService |
|
| 1.0;1 |
1 | /* | |
2 | * Copyright 2005-2007 The Kuali Foundation | |
3 | * | |
4 | * | |
5 | * Licensed under the Educational Community License, Version 2.0 (the "License"); | |
6 | * you may not use this file except in compliance with the License. | |
7 | * You may obtain a copy of the License at | |
8 | * | |
9 | * http://www.opensource.org/licenses/ecl2.php | |
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.kuali.rice.kew.docsearch.service; | |
18 | ||
19 | import org.kuali.rice.core.api.util.KeyValue; | |
20 | import org.kuali.rice.kew.docsearch.DocSearchCriteriaDTO; | |
21 | import org.kuali.rice.kew.docsearch.DocumentSearchGenerator; | |
22 | import org.kuali.rice.kew.docsearch.DocumentSearchResult; | |
23 | import org.kuali.rice.kew.docsearch.DocumentSearchResultComponents; | |
24 | import org.kuali.rice.kew.docsearch.DocumentSearchResultProcessor; | |
25 | import org.kuali.rice.kew.docsearch.SavedSearchResult; | |
26 | ||
27 | import java.util.List; | |
28 | ||
29 | ||
30 | /** | |
31 | * Service for data access for document searches. | |
32 | * | |
33 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
34 | */ | |
35 | public interface DocumentSearchService { | |
36 | ||
37 | /** | |
38 | * This method performs a standard document search | |
39 | * | |
40 | * @param principalId - user executing the search | |
41 | * @param criteria - criteria to use to search documents | |
42 | * @return a {@link DocumentSearchResultComponents} object holding the search result columns and search result rows | |
43 | * represented by a list of {@link DocumentSearchResult} objects | |
44 | */ | |
45 | public DocumentSearchResultComponents getList(String principalId, DocSearchCriteriaDTO criteria); | |
46 | ||
47 | /** | |
48 | * This method performs a standard document search but uses the value returned by | |
49 | * {@link DocSearchCriteriaDTO#getThreshold()} as the maximum search results returned | |
50 | * | |
51 | * @param principalId - user executing the search | |
52 | * @param criteria - criteria to use to search documents | |
53 | * @return a {@link DocumentSearchResultComponents} object holding the search result columns and search result rows | |
54 | * represented by a list of {@link DocumentSearchResult} objects | |
55 | */ | |
56 | public DocumentSearchResultComponents getListRestrictedByCriteria(String principalId, DocSearchCriteriaDTO criteria); | |
57 | public SavedSearchResult getSavedSearchResults(String principalId, String savedSearchName); | |
58 | public void clearNamedSearches(String principalId); | |
59 | public List<KeyValue> getNamedSearches(String principalId); | |
60 | public List<KeyValue> getMostRecentSearches(String principalId); | |
61 | ||
62 | public DocumentSearchGenerator getStandardDocumentSearchGenerator(); | |
63 | public DocumentSearchResultProcessor getStandardDocumentSearchResultProcessor(); | |
64 | public void validateDocumentSearchCriteria(DocumentSearchGenerator docSearchGenerator,DocSearchCriteriaDTO criteria); | |
65 | } |