View Javadoc

1   /*
2    * Copyright 2007-2008 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * 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
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.rice.kew.dto;
17  
18  import java.io.Serializable;
19  import java.util.ArrayList;
20  import java.util.List;
21  
22  import org.kuali.rice.kew.util.KEWConstants;
23  
24  /**
25   * This is a virtual object representing the DocSearchCriteriaDTO class
26   * 
27   * @author Kuali Rice Team (rice.collab@kuali.org)
28   */
29  public class DocumentSearchCriteriaDTO implements Serializable {
30  
31      private static final long serialVersionUID = -220572344702126103L;
32  
33      private String routeHeaderId; // id generated by KEW
34      private String docRouteStatus; // route status of the document
35      private String docTitle; // document title provided by the application
36      private String appDocId; // application provided ID - defaults to routeHeaderId
37      private String initiator; // network Id of the person who initiated the document
38      private String viewer; // network Id of the person who is currently viewing the document
39      private String groupViewerName; // group Id that has had an action request to the document
40      private String approver; // network Id of the person who is approving the document
41      private String docRouteNodeName; // current level of routing, i.e. which route method is the document currently in
42      private String docRouteNodeLogic = KEWConstants.DOC_SEARCH_ROUTE_STATUS_QUALIFIER_EXACT; // exactly, before or after
43      private String docVersion; // document version
44      private String docTypeFullName; // the fullname for the document's docType
45  
46      // date range properties
47      private String fromDateCreated; // the begin range for DateCreated
48      private String fromDateLastModified; // the begin range for LastModified
49      private String fromDateApproved; // the begin range for Approved
50      private String fromDateFinalized; // the begin range for Finalized
51      private String toDateCreated; // the end range for created
52      private String toDateLastModified; // the end range for last modified
53      private String toDateApproved; // the end range for approved
54      private String toDateFinalized; // the end range for finalized
55  
56      // searchable attribute properties
57      private List<KeyValueDTO> searchAttributeValues = new ArrayList<KeyValueDTO>();
58  
59      // below used only in specialized cases
60      private boolean advancedSearch = false;
61      private boolean superUserSearch = false;
62      private Integer threshold = null;
63      private Integer fetchLimit = null;
64      private boolean saveSearchForUser = false;
65  
66      public void findDocsBeforeSpecifiedRouteNode() {
67          setDocRouteNodeLogic(KEWConstants.DOC_SEARCH_ROUTE_STATUS_QUALIFIER_BEFORE);
68      }
69  
70      public void findDocsAfterSpecifiedRouteNode() {
71          setDocRouteNodeLogic(KEWConstants.DOC_SEARCH_ROUTE_STATUS_QUALIFIER_AFTER);
72      }
73  
74      public void findDocsAtExactSpecifiedRouteNode() {
75          setDocRouteNodeLogic(KEWConstants.DOC_SEARCH_ROUTE_STATUS_QUALIFIER_EXACT);
76      }
77  
78      public String getRouteHeaderId() {
79          return this.routeHeaderId;
80      }
81  
82      public void setRouteHeaderId(String routeHeaderId) {
83          this.routeHeaderId = routeHeaderId;
84      }
85  
86      public String getDocRouteStatus() {
87          return this.docRouteStatus;
88      }
89  
90      public void setDocRouteStatus(String docRouteStatus) {
91          this.docRouteStatus = docRouteStatus;
92      }
93  
94      public String getDocTitle() {
95          return this.docTitle;
96      }
97  
98      public void setDocTitle(String docTitle) {
99          this.docTitle = docTitle;
100     }
101 
102     public String getAppDocId() {
103         return this.appDocId;
104     }
105 
106     public void setAppDocId(String appDocId) {
107         this.appDocId = appDocId;
108     }
109 
110     public String getInitiator() {
111         return this.initiator;
112     }
113 
114     public void setInitiator(String initiator) {
115         this.initiator = initiator;
116     }
117 
118     public String getViewer() {
119         return this.viewer;
120     }
121 
122     public void setViewer(String viewer) {
123         this.viewer = viewer;
124     }
125 
126     public String getGroupViewerName() {
127         return this.groupViewerName;
128     }
129 
130     public void setGroupViewerName(String groupViewerName) {
131         this.groupViewerName = groupViewerName;
132     }
133 
134     public String getApprover() {
135         return this.approver;
136     }
137 
138     public void setApprover(String approver) {
139         this.approver = approver;
140     }
141 
142     public String getDocRouteNodeName() {
143         return this.docRouteNodeName;
144     }
145 
146     public void setDocRouteNodeName(String docRouteNodeName) {
147         this.docRouteNodeName = docRouteNodeName;
148     }
149 
150     public String getDocRouteNodeLogic() {
151         return this.docRouteNodeLogic;
152     }
153 
154     public void setDocRouteNodeLogic(String docRouteNodeLogic) {
155         this.docRouteNodeLogic = docRouteNodeLogic;
156     }
157 
158     public String getDocVersion() {
159         return this.docVersion;
160     }
161 
162     public void setDocVersion(String docVersion) {
163         this.docVersion = docVersion;
164     }
165 
166     public String getDocTypeFullName() {
167         return this.docTypeFullName;
168     }
169 
170     public void setDocTypeFullName(String docTypeFullName) {
171         this.docTypeFullName = docTypeFullName;
172     }
173 
174     public String getFromDateCreated() {
175         return this.fromDateCreated;
176     }
177 
178     public void setFromDateCreated(String fromDateCreated) {
179         this.fromDateCreated = fromDateCreated;
180     }
181 
182     public String getFromDateLastModified() {
183         return this.fromDateLastModified;
184     }
185 
186     public void setFromDateLastModified(String fromDateLastModified) {
187         this.fromDateLastModified = fromDateLastModified;
188     }
189 
190     public String getFromDateApproved() {
191         return this.fromDateApproved;
192     }
193 
194     public void setFromDateApproved(String fromDateApproved) {
195         this.fromDateApproved = fromDateApproved;
196     }
197 
198     public String getFromDateFinalized() {
199         return this.fromDateFinalized;
200     }
201 
202     public void setFromDateFinalized(String fromDateFinalized) {
203         this.fromDateFinalized = fromDateFinalized;
204     }
205 
206     public String getToDateCreated() {
207         return this.toDateCreated;
208     }
209 
210     public void setToDateCreated(String toDateCreated) {
211         this.toDateCreated = toDateCreated;
212     }
213 
214     public String getToDateLastModified() {
215         return this.toDateLastModified;
216     }
217 
218     public void setToDateLastModified(String toDateLastModified) {
219         this.toDateLastModified = toDateLastModified;
220     }
221 
222     public String getToDateApproved() {
223         return this.toDateApproved;
224     }
225 
226     public void setToDateApproved(String toDateApproved) {
227         this.toDateApproved = toDateApproved;
228     }
229 
230     public String getToDateFinalized() {
231         return this.toDateFinalized;
232     }
233 
234     public void setToDateFinalized(String toDateFinalized) {
235         this.toDateFinalized = toDateFinalized;
236     }
237 
238     public List<KeyValueDTO> getSearchAttributeValues() {
239         return this.searchAttributeValues;
240     }
241 
242     public void setSearchAttributeValues(List<KeyValueDTO> searchAttributeValues) {
243         this.searchAttributeValues = searchAttributeValues;
244     }
245 
246     public boolean isAdvancedSearch() {
247         return this.advancedSearch;
248     }
249 
250     public void setAdvancedSearch(boolean advancedSearch) {
251         this.advancedSearch = advancedSearch;
252     }
253 
254     public boolean isSuperUserSearch() {
255         return this.superUserSearch;
256     }
257 
258     public void setSuperUserSearch(boolean superUserSearch) {
259         this.superUserSearch = superUserSearch;
260     }
261 
262     public Integer getThreshold() {
263         return this.threshold;
264     }
265 
266     public void setThreshold(Integer threshold) {
267         this.threshold = threshold;
268     }
269 
270 	public boolean isSaveSearchForUser() {
271 		return this.saveSearchForUser;
272 	}
273 
274 	public void setSaveSearchForUser(boolean saveSearchForUser) {
275 		this.saveSearchForUser = saveSearchForUser;
276 	}
277 
278 }