View Javadoc

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;
18  
19  import org.apache.commons.lang.StringUtils;
20  import org.kuali.rice.kew.engine.node.RouteNode;
21  import org.kuali.rice.kew.service.KEWServiceLocator;
22  import org.kuali.rice.kew.util.Utilities;
23  import org.kuali.rice.kns.bo.BusinessObject;
24  import org.kuali.rice.kns.bo.BusinessObjectBase;
25  import org.kuali.rice.kns.web.ui.Field;
26  import org.kuali.rice.kns.web.ui.Row;
27  
28  import java.util.*;
29  
30  
31  /**
32   * Model bean representing document searches.  Persisted each search as part of the users saved searches.
33   *
34   * @author Kuali Rice Team (rice.collab@kuali.org)
35   */
36  public class DocSearchCriteriaDTO extends BusinessObjectBase implements BusinessObject, DocumentRouteHeaderEBO {
37  
38      private static final long serialVersionUID = -5738747438282249790L;
39  
40      public static final String ADVANCED_SEARCH_INDICATOR_STRING = "YES";
41      public static final String SUPER_USER_SEARCH_INDICATOR_STRING = "YES";
42      public static final int DEFAULT_PAGE_SIZE = 10;
43  
44      private String namedSearch; // if populated the name of the search that they want to save
45      private Integer pageSize; // the number of items to display on a page of results
46      private String routeHeaderId; // id generated by KEW
47      private String docRouteStatus; // route status of the document
48      private String appDocStatus; // application document status
49      private String docTitle; // document title provided by the application
50      private String appDocId; // application provided ID - defaults to routeHeaderId
51      private String overrideInd; // flag to indicate overridden business values - set by app
52      private String initiator; // network Id of the person who initiated the document
53      private String viewer; // network Id of the person who is currently viewing the document
54      private String workgroupViewerNamespace; //group namespace of the group that has had an action request to the document
55      private String workgroupViewerName; // workgroup Id that has had an action request to the document
56      private String approver; // network Id of the person who is approving the document
57      private String docRouteNodeId; // current level of routing, i.e. which route method is the document currently in
58      private String docRouteNodeLogic; // exactly, before or after
59      private String docVersion; // document version
60      private String docTypeFullName; // the fullname for the document's docType
61      private String workgroupViewerId;
62  
63      //date range properties
64      private String fromDateCreated; // the begin range for DateCreated
65      private String fromDateLastModified; // the begin range for LastModified
66      private String fromDateApproved; // the begin range for Approved
67      private String fromDateFinalized; // the begin range for Finalized
68      private String fromStatusTransitionDate;  // the begin range for app doc status transition
69      private String toDateCreated; // the end range for created
70      private String toDateLastModified; // the end range for last modified
71      private String toDateApproved; // the end range for approved
72      private String toDateFinalized; // the end range for finalized
73      private String toStatusTransitionDate;  // the end range for app doc status transition
74      private java.sql.Timestamp dateCreated; //fake date for DD
75      
76      // criteria processing
77      private List<Row> searchableAttributeRows = new ArrayList<Row>();
78  
79      // searchable attribute properties
80      private List<SearchAttributeCriteriaComponent> searchableAttributes = new ArrayList<SearchAttributeCriteriaComponent>();
81  
82      //properties to preserve view from saved and history searches as well as generate results
83      private String isAdvancedSearch;
84      private String superUserSearch = "NO";
85  
86      // used as an "out" parameter to indicate the threshold for the search
87      private Integer threshold = Integer.valueOf(DocumentSearchGenerator.DEFAULT_SEARCH_RESULT_CAP);
88      private Integer fetchLimit = Integer.valueOf(0);
89  
90      // used as an "out" parameter to indicate that the rows fetched for this criteria are over the indicated threshold
91      private boolean isOverThreshold = false;
92  
93      // used as an "out" prameter to indicate the number of rows that were filtered for security
94      private int securityFilteredRows = 0;
95  
96      // below used when doing a document search from API
97      private boolean overridingUserSession = false;
98      private boolean saveSearchForUser = false;
99  
100     private boolean onlyDocTypeFilled = false;
101     
102     public DocSearchCriteriaDTO() {
103         super();
104     }
105 
106     /**
107 	 * This overridden method ...
108 	 * 
109 	 * @see org.kuali.rice.kew.docsearch.DocumentRouteHeaderEBO#isStandardCriteriaConsideredEmpty(boolean)
110 	 */
111     public boolean isStandardCriteriaConsideredEmpty(boolean excludeDocumentTypeName) {
112         boolean docTypeNameIsEmpty = Utilities.isEmpty(this.docTypeFullName);
113         boolean standardFieldsAreEmpty = ((Utilities.isEmpty(routeHeaderId)) &&
114         /* (Utilities.isEmpty(overrideInd)) && */
115         (Utilities.isEmpty(initiator)) && (Utilities.isEmpty(workgroupViewerName)) &&
116         /* (Utilities.isEmpty(docRouteNodeLogic)) && */
117         (Utilities.isEmpty(docVersion)) && (Utilities.isEmpty(fromDateCreated)) && (Utilities.isEmpty(toDateCreated)) && (Utilities.isEmpty(appDocId)) && (Utilities.isEmpty(approver)) && (Utilities.isEmpty(docRouteNodeId)) && (Utilities.isEmpty(docRouteStatus)) && (Utilities.isEmpty(docTitle)) && (Utilities.isEmpty(viewer)) && (Utilities.isEmpty(fromDateApproved)) && (Utilities.isEmpty(toDateApproved)) && (Utilities.isEmpty(fromDateFinalized)) && (Utilities.isEmpty(toDateFinalized)) && (Utilities.isEmpty(fromDateLastModified)) && (Utilities.isEmpty(toDateLastModified)));
118         if (excludeDocumentTypeName) {
119             return standardFieldsAreEmpty;
120         } else {
121             return docTypeNameIsEmpty && standardFieldsAreEmpty;
122         }
123     }
124 
125     /**
126 	 * This overridden method ...
127 	 * 
128 	 * @see org.kuali.rice.kew.docsearch.DocumentRouteHeaderEBO#getDocRouteNodeLogic()
129 	 */
130     public String getDocRouteNodeLogic() {
131         return docRouteNodeLogic;
132     }
133 
134     public void setDocRouteNodeLogic(String docRouteLevelLogic) {
135         this.docRouteNodeLogic = docRouteLevelLogic;
136     }
137 
138     /**
139 	 * This overridden method ...
140 	 * 
141 	 * @see org.kuali.rice.kew.docsearch.DocumentRouteHeaderEBO#getAppDocId()
142 	 */
143     public String getAppDocId() {
144         return appDocId;
145     }
146 
147     public void setAppDocId(String appDocId) {
148         this.appDocId = appDocId;
149     }
150 
151     /**
152 	 * This overridden method ...
153 	 * 
154 	 * @see org.kuali.rice.kew.docsearch.DocumentRouteHeaderEBO#getApprover()
155 	 */
156     public String getApprover() {
157         return approver;
158     }
159 
160     public void setApprover(String approver) {
161         this.approver = approver;
162     }
163 
164     /**
165 	 * This overridden method ...
166 	 * 
167 	 * @see org.kuali.rice.kew.docsearch.DocumentRouteHeaderEBO#getDocRouteNodeId()
168 	 */
169     public String getDocRouteNodeId() {
170         return docRouteNodeId;
171     }
172 
173     public void setDocRouteNodeId(String docRouteLevel) {
174         this.docRouteNodeId = docRouteLevel;
175     }
176 
177     /**
178 	 * This overridden method ...
179 	 * 
180 	 * @see org.kuali.rice.kew.docsearch.DocumentRouteHeaderEBO#getDocRouteStatus()
181 	 */
182     public String getDocRouteStatus() {
183         return docRouteStatus;
184     }
185 
186     public void setDocRouteStatus(String docRouteStatus) {
187         this.docRouteStatus = docRouteStatus;
188     }
189 
190     /**
191 	 * This overridden method ...
192 	 * 
193 	 * @see org.kuali.rice.kew.docsearch.DocumentRouteHeaderEBO#getAppDocStatus()
194 	 */
195     public String getAppDocStatus() {
196         return appDocStatus;
197     }
198 
199     public void setAppDocStatus(String appDocStatus) {
200         this.appDocStatus = appDocStatus;
201     }
202 
203     /**
204 	 * This overridden method ...
205 	 * 
206 	 * @see org.kuali.rice.kew.docsearch.DocumentRouteHeaderEBO#getDocTitle()
207 	 */
208     public String getDocTitle() {
209         return docTitle;
210     }
211 
212     public void setDocTitle(String docTitle) {
213         this.docTitle = docTitle;
214     }
215 
216     /**
217 	 * This overridden method ...
218 	 * 
219 	 * @see org.kuali.rice.kew.docsearch.DocumentRouteHeaderEBO#getDocTypeFullName()
220 	 */
221     public String getDocTypeFullName() {
222         return docTypeFullName;
223     }
224 
225     public void setDocTypeFullName(String docTypeFullName) {
226         this.docTypeFullName = docTypeFullName;
227     }
228 
229     /**
230 	 * This overridden method ...
231 	 * 
232 	 * @see org.kuali.rice.kew.docsearch.DocumentRouteHeaderEBO#getDocVersion()
233 	 */
234     public String getDocVersion() {
235         return docVersion;
236     }
237 
238     public void setDocVersion(String docVersion) {
239         this.docVersion = docVersion;
240     }
241 
242     /**
243 	 * This overridden method ...
244 	 * 
245 	 * @see org.kuali.rice.kew.docsearch.DocumentRouteHeaderEBO#getInitiator()
246 	 */
247     public String getInitiator() {
248         return initiator;
249     }
250 
251     public void setInitiator(String initiator) {
252         this.initiator = initiator;
253     }
254 
255     /**
256 	 * This overridden method ...
257 	 * 
258 	 * @see org.kuali.rice.kew.docsearch.DocumentRouteHeaderEBO#getOverrideInd()
259 	 */
260     public String getOverrideInd() {
261         return overrideInd;
262     }
263 
264     public void setOverrideInd(String overrideInd) {
265         this.overrideInd = overrideInd;
266     }
267 
268     /**
269 	 * This overridden method ...
270 	 * 
271 	 * @see org.kuali.rice.kew.docsearch.DocumentRouteHeaderEBO#getRouteHeaderId()
272 	 */
273     public String getRouteHeaderId() {
274         return routeHeaderId;
275     }
276 
277     public void setRouteHeaderId(String routeHeaderId) {
278         this.routeHeaderId = routeHeaderId;
279     }
280 
281     /**
282 	 * This overridden method ...
283 	 * 
284 	 * @see org.kuali.rice.kew.docsearch.DocumentRouteHeaderEBO#getViewer()
285 	 */
286     public String getViewer() {
287         return viewer;
288     }
289 
290     public void setViewer(String viewer) {
291         this.viewer = viewer;
292     }
293 
294     /**
295 	 * This overridden method ...
296 	 * 
297 	 * @see org.kuali.rice.kew.docsearch.DocumentRouteHeaderEBO#getPageSize()
298 	 */
299     public Integer getPageSize() {
300         return pageSize;
301     }
302 
303     public void setPageSize(Integer pageSize) {
304         this.pageSize = pageSize;
305     }
306 
307     /**
308 	 * This overridden method ...
309 	 * 
310 	 * @see org.kuali.rice.kew.docsearch.DocumentRouteHeaderEBO#getFromDateApproved()
311 	 */
312     public String getFromDateApproved() {
313         return fromDateApproved;
314     }
315 
316     /**
317 	 * This overridden method ...
318 	 * 
319 	 * @see org.kuali.rice.kew.docsearch.DocumentRouteHeaderEBO#getFromDateCreated()
320 	 */
321     public String getFromDateCreated() {
322         return fromDateCreated;
323     }
324 
325     /**
326 	 * This overridden method ...
327 	 * 
328 	 * @see org.kuali.rice.kew.docsearch.DocumentRouteHeaderEBO#getFromDateFinalized()
329 	 */
330     public String getFromDateFinalized() {
331         return fromDateFinalized;
332     }
333 
334     /**
335 	 * This overridden method ...
336 	 * 
337 	 * @see org.kuali.rice.kew.docsearch.DocumentRouteHeaderEBO#getFromDateLastModified()
338 	 */
339     public String getFromDateLastModified() {
340         return fromDateLastModified;
341     }
342 
343     public String getFromStatusTransitionDate() {
344         return fromStatusTransitionDate;
345     }
346     /**
347 	 * This overridden method ...
348 	 * 
349 	 * @see org.kuali.rice.kew.docsearch.DocumentRouteHeaderEBO#getToDateApproved()
350 	 */
351     public String getToDateApproved() {
352         return toDateApproved;
353     }
354 
355     /**
356 	 * This overridden method ...
357 	 * 
358 	 * @see org.kuali.rice.kew.docsearch.DocumentRouteHeaderEBO#getToDateCreated()
359 	 */
360     public String getToDateCreated() {
361         return toDateCreated;
362     }
363 
364     /**
365 	 * This overridden method ...
366 	 * 
367 	 * @see org.kuali.rice.kew.docsearch.DocumentRouteHeaderEBO#getToDateFinalized()
368 	 */
369     public String getToDateFinalized() {
370         return toDateFinalized;
371     }
372 
373     /**
374 	 * This overridden method ...
375 	 * 
376 	 * @see org.kuali.rice.kew.docsearch.DocumentRouteHeaderEBO#getToDateLastModified()
377 	 */
378     public String getToDateLastModified() {
379         return toDateLastModified;
380     }
381 
382     public String getToStatusTransitionDate() {
383         return toStatusTransitionDate;
384     }
385     public void setFromDateApproved(String fromDateApproved) {
386         this.fromDateApproved = safeTrimmer(fromDateApproved);
387     }
388 
389     public void setFromDateCreated(String fromDateCreated) {
390         this.fromDateCreated = safeTrimmer(fromDateCreated);
391     }
392 
393     public void setFromDateFinalized(String fromDateFinalized) {
394         this.fromDateFinalized = safeTrimmer(fromDateFinalized);
395     }
396 
397     public void setFromDateLastModified(String fromDateLastModified) {
398         this.fromDateLastModified = safeTrimmer(fromDateLastModified);
399     }
400 
401     public void setFromStatusTransitionDate(String fromStatusTransitionDate) {
402         this.fromStatusTransitionDate = safeTrimmer(fromStatusTransitionDate);
403     }
404 
405     public void setToDateApproved(String toDateApproved) {
406         this.toDateApproved = safeTrimmer(toDateApproved);
407     }
408 
409     public void setToDateCreated(String toDateCreated) {
410         this.toDateCreated = safeTrimmer(toDateCreated);
411     }
412 
413     public void setToDateFinalized(String toDateFinalized) {
414         this.toDateFinalized = safeTrimmer(toDateFinalized);
415     }
416 
417     public void setToDateLastModified(String toDateLastModified) {
418         this.toDateLastModified = safeTrimmer(toDateLastModified);
419     }
420 
421     public void setToStatusTransitionDate(String toStatusTransitionDate) {
422         this.toStatusTransitionDate = safeTrimmer(toStatusTransitionDate);
423     }
424 
425     private String safeTrimmer(String value) {
426         if (!Utilities.isEmpty(value)) {
427             return value.trim();
428         }
429         return value;
430     }
431 
432     /**
433 	 * This overridden method ...
434 	 * 
435 	 * @see org.kuali.rice.kew.docsearch.DocumentRouteHeaderEBO#getNamedSearch()
436 	 */
437     public String getNamedSearch() {
438         return namedSearch;
439     }
440 
441     public void setNamedSearch(String namedSearch) {
442         this.namedSearch = namedSearch;
443     }
444 
445     /**
446 	 * This overridden method ...
447 	 * 
448 	 * @see org.kuali.rice.kew.docsearch.DocumentRouteHeaderEBO#getDocumentSearchAbbreviatedString()
449 	 */
450     public String getDocumentSearchAbbreviatedString() {
451         StringBuffer abbreviatedString = new StringBuffer();
452         String dateApprovedString = getRangeString(this.toDateApproved, this.fromDateApproved);
453         String dateCreatedString = getRangeString(this.toDateCreated, this.fromDateCreated);
454         String dateLastModifiedString = getRangeString(this.toDateLastModified, this.fromDateLastModified);
455         String dateFinalizedString = getRangeString(this.toDateFinalized, this.fromDateFinalized);
456         String dateStatusTransitionString = getRangeString(this.toStatusTransitionDate, this.fromStatusTransitionDate);
457         if (appDocId != null && !"".equals(appDocId.trim())) {
458             abbreviatedString.append("Application Document Id=").append(appDocId).append("; ");
459         }
460         if (approver != null && !"".equals(approver.trim())) {
461             abbreviatedString.append("Approver=").append(approver).append("; ");
462         }
463         if (docRouteNodeId != null && !"".equals(docRouteNodeId.trim())) {
464             RouteNode routeNode = KEWServiceLocator.getRouteNodeService().findRouteNodeById(new Long(docRouteNodeId));
465             abbreviatedString.append("Document Route Node=").append(routeNode.getRouteNodeName()).append("; ");
466         }
467         if (docRouteStatus != null && !"".equals(docRouteStatus.trim())) {
468             abbreviatedString.append("Document Route Status=").append(docRouteStatus).append("; ");
469         }
470         if (docTitle != null && !"".equals(docTitle.trim())) {
471             abbreviatedString.append("Document Title=").append(docTitle).append("; ");
472         }
473         if (docTypeFullName != null && !"".equals(docTypeFullName.trim())) {
474             abbreviatedString.append("Document Type=").append(docTypeFullName).append("; ");
475         }
476         if (initiator != null && !"".equals(initiator.trim())) {
477             abbreviatedString.append("Initiator=").append(initiator).append("; ");
478         }
479         if (routeHeaderId != null) {
480             abbreviatedString.append("Document Id=").append(routeHeaderId.toString()).append("; ");
481         }
482         if (viewer != null && !"".equals(viewer.trim())) {
483             abbreviatedString.append("Viewer=").append(viewer).append("; ");
484         }
485         if (workgroupViewerName != null) {
486             abbreviatedString.append("Group Viewer=").append(workgroupViewerName).append(";");
487         }
488         if (dateLastModifiedString != null) {
489             abbreviatedString.append("Date Last Modified=").append(dateLastModifiedString).append("; ");
490         }
491         if (dateFinalizedString != null) {
492             abbreviatedString.append("Date Finalized=").append(dateFinalizedString).append("; ");
493         }
494         if (dateCreatedString != null) {
495             abbreviatedString.append("Date Created=").append(dateCreatedString).append("; ");
496         }
497         if (dateApprovedString != null) {
498             abbreviatedString.append("Date Approved=").append(dateApprovedString).append("; ");
499         }
500         if (dateStatusTransitionString != null) {
501             abbreviatedString.append("Date Status Transition=").append(dateStatusTransitionString).append("; ");
502         }
503 
504         Set<String> alreadyAddedRangeAttributes = new HashSet<String>();
505         for (SearchAttributeCriteriaComponent searchableAttribute : searchableAttributes)
506         {
507             if (!Utilities.isEmpty(searchableAttribute.getValue()))
508             {
509                 // single value entered
510                 if (searchableAttribute.isRangeSearch())
511                 {
512                     // if search attribute criteria component is member of a range we must find it's potential matching partner to build the string
513                     if (!alreadyAddedRangeAttributes.contains(searchableAttribute.getSavedKey()))
514                     {
515                         // the key has not been processed yet
516                         String lowerSearchAttributeRangeValue = (searchableAttribute.getFormKey().startsWith(SearchableAttribute.RANGE_LOWER_BOUND_PROPERTY_PREFIX)) ? searchableAttribute.getValue() : null;
517                         String upperSearchAttributeRangeValue = (searchableAttribute.getFormKey().startsWith(SearchableAttribute.RANGE_UPPER_BOUND_PROPERTY_PREFIX)) ? searchableAttribute.getValue() : null;
518                         // loop through the attributes to find this search attribute criteria components potential match
519                         for (SearchAttributeCriteriaComponent searchableAttribute1 : searchableAttributes)
520                         {
521                             if ((searchableAttribute1.getSavedKey().equals(searchableAttribute.getSavedKey())) && (!(searchableAttribute1.getFormKey().equals(searchableAttribute.getFormKey()))))
522                             {
523                                 // we found the other side of the range
524                                 if (lowerSearchAttributeRangeValue == null)
525                                 {
526                                     lowerSearchAttributeRangeValue = (searchableAttribute1.getFormKey().startsWith(SearchableAttribute.RANGE_LOWER_BOUND_PROPERTY_PREFIX)) ? searchableAttribute1.getValue() : null;
527                                 }
528                                 if (upperSearchAttributeRangeValue == null)
529                                 {
530                                     upperSearchAttributeRangeValue = (searchableAttribute1.getFormKey().startsWith(SearchableAttribute.RANGE_UPPER_BOUND_PROPERTY_PREFIX)) ? searchableAttribute1.getValue() : null;
531                                 }
532                                 break;
533                             }
534                         }
535                         // we should have valid values for the 'to' and 'from' range field values by now
536                         abbreviatedString.append(searchableAttribute.getSavedKey()).append("=").append(getRangeString(lowerSearchAttributeRangeValue, upperSearchAttributeRangeValue)).append(";");
537                         alreadyAddedRangeAttributes.add(searchableAttribute.getSavedKey());
538                     }
539                 } else
540                 {
541                     abbreviatedString.append(searchableAttribute.getSavedKey()).append("=").append(searchableAttribute.getValue()).append(";");
542                 }
543             } else if (!Utilities.isEmpty(searchableAttribute.getValues()))
544             {
545                 // multiple values entered
546                 StringBuffer tempAbbreviatedString = new StringBuffer();
547                 tempAbbreviatedString.append(searchableAttribute.getSavedKey()).append("=");
548                 boolean firstValue = true;
549                 for (String value : searchableAttribute.getValues())
550                 {
551                     if (StringUtils.isNotBlank(value))
552                     {
553                         if (firstValue)
554                         {
555                             tempAbbreviatedString.append(value);
556                             firstValue = false;
557                         } else
558                         {
559                             tempAbbreviatedString.append(" or ").append(value);
560                         }
561                     }
562                 }
563                 String testString = tempAbbreviatedString.toString().replaceAll("=", "").replaceAll(" or ", "");
564                 if (testString.trim().length() > 0)
565                 {
566                     abbreviatedString.append(tempAbbreviatedString).append(";");
567                 }
568             }
569         }
570 
571         return abbreviatedString.toString();
572     }
573 
574     private String getRangeString(String to, String from) {
575         String dateString = null;
576         if (to != null && !"".equals(to.trim()) && from != null && !"".equals(from.trim())) {
577             dateString = "(" + from + " - " + to + ")";
578         } else {
579             if (to != null && !"".equals(to.trim())) {
580                 dateString = "to " + to;
581             } else if (from != null && !"".equals(from.trim())) {
582                 dateString = "from " + from;
583             } else {
584                 //
585             }
586         }
587         return dateString;
588     }
589 
590     /**
591      * TODO this is here for historic reasons and has been replaced by a managed state in the CriteriaDTO... eliminate
592      * @deprecated
593      */
594     public boolean isAdvancedSearch() {
595         return ((appDocId != null && !"".equals(appDocId.trim())) || (approver != null && !"".equals(approver.trim())) || (docRouteNodeId != null && !"".equals(docRouteNodeId.trim())) || (docRouteStatus != null && !"".equals(docRouteStatus.trim())) || (docTitle != null && !"".equals(docTitle.trim())) || (viewer != null && !"".equals(viewer.trim())) || (fromDateApproved != null && !"".equals(fromDateApproved.trim())) || (toDateApproved != null && !"".equals(toDateApproved.trim())) || (toDateFinalized != null && !"".equals(toDateFinalized.trim())) || (fromDateFinalized != null && !"".equals(fromDateFinalized.trim())) || (toDateLastModified != null && !"".equals(toDateLastModified.trim())) || (fromDateLastModified != null && !"".equals(fromDateLastModified.trim())));
596     }
597 
598     /**
599 	 * This overridden method ...
600 	 * 
601 	 * @see org.kuali.rice.kew.docsearch.DocumentRouteHeaderEBO#getWorkgroupViewerName()
602 	 */
603     public String getWorkgroupViewerName() {
604         return workgroupViewerName;
605     }
606 
607     public void setWorkgroupViewerName(String workgroupViewerName) {
608         this.workgroupViewerName = workgroupViewerName;
609     }
610 
611     /**
612 	 * This overridden method ...
613 	 * 
614 	 * @see org.kuali.rice.kew.docsearch.DocumentRouteHeaderEBO#getIsAdvancedSearch()
615 	 */
616     public String getIsAdvancedSearch() {
617         return isAdvancedSearch;
618     }
619 
620     public void setIsAdvancedSearch(String isAdvancedSearch) {
621         this.isAdvancedSearch = isAdvancedSearch;
622     }
623 
624     /**
625 	 * This overridden method ...
626 	 * 
627 	 * @see org.kuali.rice.kew.docsearch.DocumentRouteHeaderEBO#getSuperUserSearch()
628 	 */
629     public String getSuperUserSearch() {
630         return superUserSearch;
631     }
632 
633     public void setSuperUserSearch(String superUserSearch) {
634         this.superUserSearch = superUserSearch;
635     }
636     
637 
638     /**
639 	 * This overridden method ...
640 	 * 
641 	 * @see org.kuali.rice.kew.docsearch.DocumentRouteHeaderEBO#isOverThreshold()
642 	 */
643     public boolean isOverThreshold() {
644         return isOverThreshold;
645     }
646 
647     public void setOverThreshold(boolean isOverThreshold) {
648         this.isOverThreshold = isOverThreshold;
649     }
650 
651     /**
652 	 * This overridden method ...
653 	 * 
654 	 * @see org.kuali.rice.kew.docsearch.DocumentRouteHeaderEBO#getSecurityFilteredRows()
655 	 */
656     public int getSecurityFilteredRows() {
657         return securityFilteredRows;
658     }
659 
660     public void setSecurityFilteredRows(int securityFilteredRows) {
661         this.securityFilteredRows = securityFilteredRows;
662     }
663 
664     /**
665 	 * This overridden method ...
666 	 * 
667 	 * @see org.kuali.rice.kew.docsearch.DocumentRouteHeaderEBO#getThreshold()
668 	 */
669     public Integer getThreshold() {
670         return this.threshold;
671     }
672 
673     public void setThreshold(Integer threshold) {
674         this.threshold = threshold;
675     }
676 
677     /**
678 	 * This overridden method ...
679 	 * 
680 	 * @see org.kuali.rice.kew.docsearch.DocumentRouteHeaderEBO#getFetchLimit()
681 	 */
682     public Integer getFetchLimit() {
683         return this.fetchLimit;
684     }
685 
686     public void setFetchLimit(Integer fetchLimit) {
687         this.fetchLimit = fetchLimit;
688     }
689 
690     public void addSearchableAttribute(SearchAttributeCriteriaComponent searchableAttribute) {
691         searchableAttributes.add(searchableAttribute);
692     }
693 
694     /**
695      * @param searchableAttributes The searchableAttributes to set.
696      */
697     public void setSearchableAttributes(List<SearchAttributeCriteriaComponent> searchableAttributes) {
698         this.searchableAttributes = searchableAttributes;
699     }
700 
701     /**
702 	 * This overridden method ...
703 	 * 
704 	 * @see org.kuali.rice.kew.docsearch.DocumentRouteHeaderEBO#getSearchableAttributes()
705 	 */
706     public List<SearchAttributeCriteriaComponent> getSearchableAttributes() {
707         return searchableAttributes;
708     }
709 
710     public void setSearchableAttributeRows(List<Row> searchableAttributeRows) {
711         this.searchableAttributeRows = searchableAttributeRows;
712     }
713 
714     /**
715 	 * This overridden method ...
716 	 * 
717 	 * @see org.kuali.rice.kew.docsearch.DocumentRouteHeaderEBO#getSearchableAttributeRows()
718 	 */
719     public List<Row> getSearchableAttributeRows() {
720         return searchableAttributeRows;
721     }
722 
723     /**
724 	 * This overridden method ...
725 	 * 
726 	 * @see org.kuali.rice.kew.docsearch.DocumentRouteHeaderEBO#getProcessedSearchableAttributeRows()
727 	 */
728     public List<Row> getProcessedSearchableAttributeRows() {
729         return searchableAttributeRows;
730     }
731 
732     public void addSearchableAttributeRow(Row row) {
733         searchableAttributeRows.add(row);
734     }
735 
736     /**
737 	 * This overridden method ...
738 	 * 
739 	 * @see org.kuali.rice.kew.docsearch.DocumentRouteHeaderEBO#getSearchableAttributeRow(int)
740 	 */
741     public Row getSearchableAttributeRow(int index) {
742         while (getSearchableAttributeRows().size() <= index) {
743             Row row = new Row(new ArrayList<Field>());
744             getSearchableAttributeRows().add(row);
745         }
746         return (Row) getSearchableAttributeRows().get(index);
747     }
748 
749     public void setSearchableAttributeRow(int index, Row row) {
750         searchableAttributeRows.set(index, row);
751     }
752 
753     /**
754 	 * This overridden method ...
755 	 * 
756 	 * @see org.kuali.rice.kew.docsearch.DocumentRouteHeaderEBO#isOverridingUserSession()
757 	 */
758     public boolean isOverridingUserSession() {
759         return this.overridingUserSession;
760     }
761 
762     public void setOverridingUserSession(boolean overridingUserSession) {
763         this.overridingUserSession = overridingUserSession;
764     }
765 
766 	/**
767 	 * This overridden method ...
768 	 * 
769 	 * @see org.kuali.rice.kew.docsearch.DocumentRouteHeaderEBO#isSaveSearchForUser()
770 	 */
771 	public boolean isSaveSearchForUser() {
772 		return this.saveSearchForUser;
773 	}
774 
775 	public void setSaveSearchForUser(boolean saveSearchForUser) {
776 		this.saveSearchForUser = saveSearchForUser;
777 	}
778 
779     /**
780 	 * @deprecated
781 	 * @see org.kuali.rice.kew.docsearch.DocumentRouteHeaderEBO#getWorkgroupViewerNamespace()
782 	 */
783     public String getWorkgroupViewerNamespace() {
784         return this.workgroupViewerNamespace;
785     }
786     /**
787      * 
788      * @deprecated
789      * @param workgroupViewerNamespace
790      */
791     public void setWorkgroupViewerNamespace(String workgroupViewerNamespace) {
792         this.workgroupViewerNamespace = workgroupViewerNamespace;
793     }
794 
795 	/**
796 	 * This overridden method ...
797 	 * 
798 	 * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper()
799 	 */
800 	@Override
801 	protected LinkedHashMap toStringMapper() {
802 		// TODO chris - THIS METHOD NEEDS JAVADOCS
803 		return null;
804 	}
805 
806 	/**
807 	 * This overridden method ...
808 	 * 
809 	 * @see org.kuali.rice.kns.bo.BusinessObject#refresh()
810 	 */
811 	public void refresh() {
812 		// TODO chris - THIS METHOD NEEDS JAVADOCS
813 		
814 	}
815 
816 	/**
817 	 * This overridden method ...
818 	 * 
819 	 * @see org.kuali.rice.kew.docsearch.DocumentRouteHeaderEBO#getDateCreated()
820 	 */
821 	public java.sql.Timestamp getDateCreated() {
822 		return this.dateCreated;
823 	}
824 
825 	/**
826 	 * @param dateCreated the dateCreated to set
827 	 */
828 	public void setDateCreated(java.sql.Timestamp dateCreated) {
829 		this.dateCreated = dateCreated;
830 	}
831 
832 	/**
833 	 * @return the onlyDocTypeFilled
834 	 */
835 	public boolean isOnlyDocTypeFilled() {
836 		return this.onlyDocTypeFilled;
837 	}
838 
839 	/**
840 	 * @param onlyDocTypeFilled the onlyDocTypeFilled to set
841 	 */
842 	public void setOnlyDocTypeFilled(boolean onlyDocTypeFilled) {
843 		this.onlyDocTypeFilled = onlyDocTypeFilled;
844 	}
845 
846 	/**
847 	 * @return the workgroupViewerId
848 	 */
849 	public String getWorkgroupViewerId() {
850 		return this.workgroupViewerId;
851 	}
852 
853 	/**
854 	 * @param workgroupViewerId the workgroupViewerId to set
855 	 */
856 	public void setWorkgroupViewerId(String workgroupViewerId) {
857 		this.workgroupViewerId = workgroupViewerId;
858 	}
859 
860 
861 }