Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
SearchableAttribute |
|
| 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"); you may not use this file except in | |
6 | * compliance with the License. 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 distributed under the License is distributed on an "AS | |
11 | * IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific | |
12 | * language governing permissions and limitations under the License. | |
13 | */ | |
14 | package org.kuali.rice.kew.docsearch; | |
15 | ||
16 | import java.io.Serializable; | |
17 | import java.util.Arrays; | |
18 | import java.util.List; | |
19 | import java.util.Map; | |
20 | ||
21 | import org.kuali.rice.kew.rule.WorkflowAttributeValidationError; | |
22 | import org.kuali.rice.kns.web.ui.Row; | |
23 | ||
24 | /** | |
25 | * SearchableAttribute must implement this interface | |
26 | * | |
27 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
28 | */ | |
29 | public interface SearchableAttribute extends Serializable { | |
30 | ||
31 | public static final List SEARCHABLE_ATTRIBUTE_BASE_CLASS_LIST = Arrays.asList(SearchableAttributeStringValue.class, SearchableAttributeFloatValue.class, SearchableAttributeLongValue.class, | |
32 | SearchableAttributeDateTimeValue.class); | |
33 | ||
34 | /** | |
35 | * this gives the xml representation of the attribute; returning a standard java xml object might be a better | |
36 | * approach here | |
37 | * | |
38 | * @param documentSearchContext | |
39 | * @return | |
40 | */ | |
41 | public String getSearchContent(DocumentSearchContext documentSearchContext); | |
42 | ||
43 | /** | |
44 | * this will return the loaded data objects for storage in workflow database to be related to the document the | |
45 | * attributes xml content was loaded with | |
46 | * | |
47 | * @param documentSearchContext | |
48 | * @return | |
49 | */ | |
50 | public List<SearchableAttributeValue> getSearchStorageValues(DocumentSearchContext documentSearchContext); | |
51 | ||
52 | /** | |
53 | * this will return a list of field objects to be rendered in the docsearch interface | |
54 | * | |
55 | * @param documentSearchContext | |
56 | * @return | |
57 | */ | |
58 | public List<Row> getSearchingRows(DocumentSearchContext documentSearchContext); | |
59 | ||
60 | /** | |
61 | * this will return a list of error objects if the user has made an input error | |
62 | * | |
63 | * @param paramMap map | |
64 | * @param searchContext document search context | |
65 | * @return list of workflow attribute validation errors | |
66 | */ | |
67 | public List<WorkflowAttributeValidationError> validateUserSearchInputs( | |
68 | Map<Object, Object> paramMap, DocumentSearchContext searchContext); | |
69 | } |