| 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 | /** | |
| 26 | * SearchableAttribute must implement this interface | |
| 27 | * | |
| 28 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
| 29 | */ | |
| 30 | public interface SearchableAttribute extends Serializable { | |
| 31 | ||
| 32 | public static final List SEARCHABLE_ATTRIBUTE_BASE_CLASS_LIST = Arrays.asList(SearchableAttributeStringValue.class, SearchableAttributeFloatValue.class, SearchableAttributeLongValue.class, | |
| 33 | SearchableAttributeDateTimeValue.class); | |
| 34 | ||
| 35 | /** | |
| 36 | * this gives the xml representation of the attribute; returning a standard java xml object might be a better | |
| 37 | * approach here | |
| 38 | * | |
| 39 | * @param documentSearchContext | |
| 40 | * @return | |
| 41 | */ | |
| 42 | public String getSearchContent(DocumentSearchContext documentSearchContext); | |
| 43 | ||
| 44 | /** | |
| 45 | * this will return the loaded data objects for storage in workflow database to be related to the document the | |
| 46 | * attributes xml content was loaded with | |
| 47 | * | |
| 48 | * @param documentSearchContext | |
| 49 | * @return | |
| 50 | */ | |
| 51 | public List<SearchableAttributeValue> getSearchStorageValues(DocumentSearchContext documentSearchContext); | |
| 52 | ||
| 53 | /** | |
| 54 | * this will return a list of field objects to be rendered in the docsearch interface | |
| 55 | * | |
| 56 | * @param documentSearchContext | |
| 57 | * @return | |
| 58 | */ | |
| 59 | public List<Row> getSearchingRows(DocumentSearchContext documentSearchContext); | |
| 60 | ||
| 61 | /** | |
| 62 | * this will return a list of error objects if the user has made an input error | |
| 63 | * | |
| 64 | * @param paramMap map | |
| 65 | * @param searchContext document search context | |
| 66 | * @return list of workflow attribute validation errors | |
| 67 | */ | |
| 68 | public List<WorkflowAttributeValidationError> validateUserSearchInputs( | |
| 69 | Map<Object, Object> paramMap, DocumentSearchContext searchContext); | |
| 70 | } |