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