001 /*
002 * Copyright 2007-2008 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016 package org.kuali.rice.kew.dto;
017
018 import org.kuali.rice.core.api.util.ConcreteKeyValue;
019 import org.kuali.rice.kew.util.KEWConstants;
020
021 import java.io.Serializable;
022 import java.util.ArrayList;
023 import java.util.List;
024
025 /**
026 * This is a virtual object representing the DocSearchCriteriaDTO class
027 *
028 * @author Kuali Rice Team (rice.collab@kuali.org)
029 */
030 public class DocumentSearchCriteriaDTO implements Serializable {
031
032 private static final long serialVersionUID = -220572344702126103L;
033
034 private String documentId; // id generated by KEW
035 private String docRouteStatus; // route status of the document
036 private String docTitle; // document title provided by the application
037 private String appDocId; // application provided ID - defaults to documentId
038 private String initiator; // network Id of the person who initiated the document
039 private String viewer; // network Id of the person who is currently viewing the document
040 private String groupViewerName; // group Id that has had an action request to the document
041 private String approver; // network Id of the person who is approving the document
042 private String docRouteNodeName; // current level of routing, i.e. which route method is the document currently in
043 private String docRouteNodeLogic = KEWConstants.DOC_SEARCH_ROUTE_STATUS_QUALIFIER_EXACT; // exactly, before or after
044 private String docVersion; // document version
045 private String docTypeFullName; // the fullname for the document's docType
046
047 // date range properties
048 private String fromDateCreated; // the begin range for DateCreated
049 private String fromDateLastModified; // the begin range for LastModified
050 private String fromDateApproved; // the begin range for Approved
051 private String fromDateFinalized; // the begin range for Finalized
052 private String toDateCreated; // the end range for created
053 private String toDateLastModified; // the end range for last modified
054 private String toDateApproved; // the end range for approved
055 private String toDateFinalized; // the end range for finalized
056
057 // searchable attribute properties
058 private List<ConcreteKeyValue> searchAttributeValues = new ArrayList<ConcreteKeyValue>();
059
060 // below used only in specialized cases
061 private boolean advancedSearch = false;
062 private boolean superUserSearch = false;
063 private Integer threshold = null;
064 private Integer fetchLimit = null;
065 private boolean saveSearchForUser = false;
066
067 public void findDocsBeforeSpecifiedRouteNode() {
068 setDocRouteNodeLogic(KEWConstants.DOC_SEARCH_ROUTE_STATUS_QUALIFIER_BEFORE);
069 }
070
071 public void findDocsAfterSpecifiedRouteNode() {
072 setDocRouteNodeLogic(KEWConstants.DOC_SEARCH_ROUTE_STATUS_QUALIFIER_AFTER);
073 }
074
075 public void findDocsAtExactSpecifiedRouteNode() {
076 setDocRouteNodeLogic(KEWConstants.DOC_SEARCH_ROUTE_STATUS_QUALIFIER_EXACT);
077 }
078
079 public String getDocumentId() {
080 return this.documentId;
081 }
082
083 public void setDocumentId(String documentId) {
084 this.documentId = documentId;
085 }
086
087 public String getDocRouteStatus() {
088 return this.docRouteStatus;
089 }
090
091 public void setDocRouteStatus(String docRouteStatus) {
092 this.docRouteStatus = docRouteStatus;
093 }
094
095 public String getDocTitle() {
096 return this.docTitle;
097 }
098
099 public void setDocTitle(String docTitle) {
100 this.docTitle = docTitle;
101 }
102
103 public String getAppDocId() {
104 return this.appDocId;
105 }
106
107 public void setAppDocId(String appDocId) {
108 this.appDocId = appDocId;
109 }
110
111 public String getInitiator() {
112 return this.initiator;
113 }
114
115 public void setInitiator(String initiator) {
116 this.initiator = initiator;
117 }
118
119 public String getViewer() {
120 return this.viewer;
121 }
122
123 public void setViewer(String viewer) {
124 this.viewer = viewer;
125 }
126
127 public String getGroupViewerName() {
128 return this.groupViewerName;
129 }
130
131 public void setGroupViewerName(String groupViewerName) {
132 this.groupViewerName = groupViewerName;
133 }
134
135 public String getApprover() {
136 return this.approver;
137 }
138
139 public void setApprover(String approver) {
140 this.approver = approver;
141 }
142
143 public String getDocRouteNodeName() {
144 return this.docRouteNodeName;
145 }
146
147 public void setDocRouteNodeName(String docRouteNodeName) {
148 this.docRouteNodeName = docRouteNodeName;
149 }
150
151 public String getDocRouteNodeLogic() {
152 return this.docRouteNodeLogic;
153 }
154
155 public void setDocRouteNodeLogic(String docRouteNodeLogic) {
156 this.docRouteNodeLogic = docRouteNodeLogic;
157 }
158
159 public String getDocVersion() {
160 return this.docVersion;
161 }
162
163 public void setDocVersion(String docVersion) {
164 this.docVersion = docVersion;
165 }
166
167 public String getDocTypeFullName() {
168 return this.docTypeFullName;
169 }
170
171 public void setDocTypeFullName(String docTypeFullName) {
172 this.docTypeFullName = docTypeFullName;
173 }
174
175 public String getFromDateCreated() {
176 return this.fromDateCreated;
177 }
178
179 public void setFromDateCreated(String fromDateCreated) {
180 this.fromDateCreated = fromDateCreated;
181 }
182
183 public String getFromDateLastModified() {
184 return this.fromDateLastModified;
185 }
186
187 public void setFromDateLastModified(String fromDateLastModified) {
188 this.fromDateLastModified = fromDateLastModified;
189 }
190
191 public String getFromDateApproved() {
192 return this.fromDateApproved;
193 }
194
195 public void setFromDateApproved(String fromDateApproved) {
196 this.fromDateApproved = fromDateApproved;
197 }
198
199 public String getFromDateFinalized() {
200 return this.fromDateFinalized;
201 }
202
203 public void setFromDateFinalized(String fromDateFinalized) {
204 this.fromDateFinalized = fromDateFinalized;
205 }
206
207 public String getToDateCreated() {
208 return this.toDateCreated;
209 }
210
211 public void setToDateCreated(String toDateCreated) {
212 this.toDateCreated = toDateCreated;
213 }
214
215 public String getToDateLastModified() {
216 return this.toDateLastModified;
217 }
218
219 public void setToDateLastModified(String toDateLastModified) {
220 this.toDateLastModified = toDateLastModified;
221 }
222
223 public String getToDateApproved() {
224 return this.toDateApproved;
225 }
226
227 public void setToDateApproved(String toDateApproved) {
228 this.toDateApproved = toDateApproved;
229 }
230
231 public String getToDateFinalized() {
232 return this.toDateFinalized;
233 }
234
235 public void setToDateFinalized(String toDateFinalized) {
236 this.toDateFinalized = toDateFinalized;
237 }
238
239 public List<ConcreteKeyValue> getSearchAttributeValues() {
240 return this.searchAttributeValues;
241 }
242
243 public void setSearchAttributeValues(List<ConcreteKeyValue> searchAttributeValues) {
244 this.searchAttributeValues = searchAttributeValues;
245 }
246
247 public boolean isAdvancedSearch() {
248 return this.advancedSearch;
249 }
250
251 public void setAdvancedSearch(boolean advancedSearch) {
252 this.advancedSearch = advancedSearch;
253 }
254
255 public boolean isSuperUserSearch() {
256 return this.superUserSearch;
257 }
258
259 public void setSuperUserSearch(boolean superUserSearch) {
260 this.superUserSearch = superUserSearch;
261 }
262
263 public Integer getThreshold() {
264 return this.threshold;
265 }
266
267 public void setThreshold(Integer threshold) {
268 this.threshold = threshold;
269 }
270
271 public boolean isSaveSearchForUser() {
272 return this.saveSearchForUser;
273 }
274
275 public void setSaveSearchForUser(boolean saveSearchForUser) {
276 this.saveSearchForUser = saveSearchForUser;
277 }
278
279 }