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 org.kuali.rice.kew.util.KEWPropertyConstants;
20 import org.kuali.rice.kew.web.KeyValueSort;
21
22 import java.io.Serializable;
23 import java.util.ArrayList;
24 import java.util.List;
25 import java.util.Set;
26
27
28
29
30
31
32 public class DocumentSearchResult implements Serializable {
33 private static final long serialVersionUID = -1255359695353320685L;
34
35
36
37
38
39 public static final String PROPERTY_NAME_ROUTE_HEADER_ID = KEWPropertyConstants.DOC_SEARCH_RESULT_PROPERTY_NAME_ROUTE_HEADER_ID;
40
41
42
43 public static final String PROPERTY_NAME_DOC_TYPE_LABEL = KEWPropertyConstants.DOC_SEARCH_RESULT_PROPERTY_NAME_DOC_TYPE_LABEL;
44
45
46
47 public static final String PROPERTY_NAME_DOCUMENT_TITLE = KEWPropertyConstants.DOC_SEARCH_RESULT_PROPERTY_NAME_DOCUMENT_TITLE;
48
49
50
51 public static final String PROPERTY_NAME_ROUTE_STATUS_DESC = KEWPropertyConstants.DOC_SEARCH_RESULT_PROPERTY_NAME_ROUTE_STATUS_DESC;
52
53
54
55 public static final String PROPERTY_NAME_INITIATOR = KEWPropertyConstants.DOC_SEARCH_RESULT_PROPERTY_NAME_INITIATOR;
56
57
58
59 public static final String PROPERTY_NAME_DATE_CREATED = KEWPropertyConstants.DOC_SEARCH_RESULT_PROPERTY_NAME_DATE_CREATED;
60
61
62
63 public static final String PROPERTY_NAME_ROUTE_LOG = KEWPropertyConstants.DOC_SEARCH_RESULT_PROPERTY_NAME_ROUTE_LOG;
64
65
66
67
68 public static final Set<String> PROPERTY_NAME_SET = KEWPropertyConstants.DOC_SEARCH_RESULT_PROPERTY_NAME_SET;
69
70 private List<KeyValueSort> resultContainers = new ArrayList<KeyValueSort>();
71
72
73
74
75 public List<KeyValueSort> getResultContainers() {
76 return resultContainers;
77 }
78
79
80
81
82 public void setResultContainers(List<KeyValueSort> resultContainers) {
83 this.resultContainers = resultContainers;
84 }
85
86
87
88
89 public void addResultContainer(KeyValueSort result) {
90 this.resultContainers.add(result);
91 }
92
93
94
95
96
97
98
99
100 public KeyValueSort getResultContainer(String key) {
101 if (key != null) {
102 for (KeyValueSort resultContainer : resultContainers)
103 {
104 if (key.equals(resultContainer.getKey()))
105 {
106 return resultContainer;
107 }
108 }
109 }
110 return new KeyValueSort();
111 }
112 }