1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.kuali.rice.kew.docsearch;
18
19 import java.util.ArrayList;
20 import java.util.List;
21 import java.util.Map;
22
23 import org.kuali.rice.kew.rule.WorkflowAttributeValidationError;
24 import org.kuali.rice.kns.web.ui.Field;
25 import org.kuali.rice.kns.web.ui.Row;
26
27 public class TestXMLSearchableAttributeLong implements SearchableAttribute {
28
29 private static final long serialVersionUID = 1309952222293029643L;
30
31 public static final String SEARCH_STORAGE_KEY = "testLongKey";
32 public static final Long SEARCH_STORAGE_VALUE = new Long(123456);
33
34 public String getSearchContent(DocumentSearchContext documentSearchContext) {
35 return "TestXMLSearchableAttributeLong";
36 }
37
38 public List<SearchableAttributeValue> getSearchStorageValues(DocumentSearchContext documentSearchContext) {
39 List<SearchableAttributeValue> savs = new ArrayList<SearchableAttributeValue>();
40 SearchableAttributeLongValue sav = new SearchableAttributeLongValue();
41 sav.setSearchableAttributeKey(SEARCH_STORAGE_KEY);
42 sav.setSearchableAttributeValue(SEARCH_STORAGE_VALUE);
43 savs.add(sav);
44 return savs;
45 }
46
47 public List<Row> getSearchingRows(DocumentSearchContext documentSearchContext) {
48 List<Field> fields = new ArrayList<Field>();
49 Field myField = new Field(SEARCH_STORAGE_KEY,"title");
50 myField.setFieldDataType((new SearchableAttributeLongValue()).getAttributeDataType());
51 fields.add(myField);
52 Row row = new Row(fields);
53 List<Row> rows = new ArrayList<Row>();
54 rows.add(row);
55 return rows;
56 }
57
58 public List<WorkflowAttributeValidationError> validateUserSearchInputs(Map<Object, Object> paramMap, DocumentSearchContext documentSearchContext) {
59 List<WorkflowAttributeValidationError> waves = new ArrayList<WorkflowAttributeValidationError>();
60
61
62 return waves;
63 }
64 }