View Javadoc

1   /*
2    * Copyright 2006-2007 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.krad.impls;
17  
18  import java.util.List;
19  import java.util.Map;
20  import java.util.Set;
21  
22  import org.joda.time.DateTime;
23  import org.kuali.rice.kew.api.WorkflowDocument;
24  import org.kuali.rice.kew.api.action.ActionRequest;
25  import org.kuali.rice.kew.api.action.ActionRequestType;
26  import org.kuali.rice.kew.api.action.ActionTaken;
27  import org.kuali.rice.kew.api.action.ActionType;
28  import org.kuali.rice.kew.api.action.AdHocRevoke;
29  import org.kuali.rice.kew.api.action.MovePoint;
30  import org.kuali.rice.kew.api.action.RequestedActions;
31  import org.kuali.rice.kew.api.action.ReturnPoint;
32  import org.kuali.rice.kew.api.action.ValidActions;
33  import org.kuali.rice.kew.api.document.Document;
34  import org.kuali.rice.kew.api.document.DocumentContent;
35  import org.kuali.rice.kew.api.document.DocumentContentUpdate;
36  import org.kuali.rice.kew.api.document.DocumentDetail;
37  import org.kuali.rice.kew.api.document.DocumentStatus;
38  import org.kuali.rice.kew.api.document.RouteNodeInstance;
39  import org.kuali.rice.kew.api.document.WorkflowAttributeDefinition;
40  import org.kuali.rice.kew.api.document.WorkflowAttributeValidationError;
41  
42  /**
43   * This class is the base class for a MockWorkflowDocument. It can be extended by any other kind of
44   * mock document that needs to override certain methods. This class has absolutely no state or
45   * behavior. There is no public constructor, and no member variables. All void methods do nothing.
46   * All methods with a return value return null. All state and behavior needs to be added via a
47   * subclass.
48   * 
49   * @author Kuali Rice Team (rice.collab@kuali.org)
50   * 
51   */
52  public abstract class MockWorkflowDocument implements WorkflowDocument {
53  
54      @Override
55      public DateTime getDateLastModified() {
56          return null;
57      }
58  
59      @Override
60      public DateTime getDateApproved() {
61          return null;
62      }
63  
64      @Override
65      public DateTime getDateFinalized() {
66          return null;
67      }
68  
69      @Override
70      public String getInitiatorPrincipalId() {
71          return null;
72      }
73  
74      @Override
75      public String getRoutedByPrincipalId() {
76          return null;
77      }
78  
79      @Override
80      public String getDocumentTypeId() {
81          return null;
82      }
83  
84      @Override
85      public String getDocumentHandlerUrl() {
86          return null;
87      }
88  
89      @Override
90      public String getApplicationDocumentStatus() {
91          return null;
92      }
93  
94      @Override
95      public DateTime getApplicationDocumentStatusDate() {
96          return null;
97      }
98  
99      @Override
100     public Map<String, String> getVariables() {
101         return null;
102     }
103 
104     @Override
105     public String getDocumentId() {
106         return null;
107     }
108 
109     @Override
110     public Document getDocument() {
111         return null;
112     }
113 
114     @Override
115     public DocumentContent getDocumentContent() {
116         return null;
117     }
118 
119     @Override
120     public String getApplicationContent() {
121         return null;
122     }
123 
124     @Override
125     public void setApplicationContent(String applicationContent) {}
126 
127     @Override
128     public void clearAttributeContent() {}
129 
130     @Override
131     public String getAttributeContent() {
132         return null;
133     }
134 
135     @Override
136     public void addAttributeDefinition(WorkflowAttributeDefinition attributeDefinition) {}
137 
138     @Override
139     public void removeAttributeDefinition(WorkflowAttributeDefinition attributeDefinition) {}
140 
141     @Override
142     public void clearAttributeDefinitions() {}
143 
144     @Override
145     public List<WorkflowAttributeDefinition> getAttributeDefinitions() {
146         return null;
147     }
148 
149     @Override
150     public void addSearchableDefinition(WorkflowAttributeDefinition searchableDefinition) {}
151 
152     @Override
153     public void removeSearchableDefinition(WorkflowAttributeDefinition searchableDefinition) {}
154 
155     @Override
156     public void clearSearchableDefinitions() {}
157 
158     @Override
159     public void clearSearchableContent() {}
160 
161     @Override
162     public List<WorkflowAttributeDefinition> getSearchableDefinitions() {
163         return null;
164     }
165 
166     @Override
167     public List<WorkflowAttributeValidationError> validateAttributeDefinition(
168             WorkflowAttributeDefinition attributeDefinition) {
169         return null;
170     }
171 
172     @Override
173     public List<ActionRequest> getRootActionRequests() {
174         return null;
175     }
176 
177     @Override
178     public List<ActionTaken> getActionsTaken() {
179         return null;
180     }
181 
182     @Override
183     public void setApplicationDocumentId(String applicationDocumentId) {}
184 
185     @Override
186     public String getApplicationDocumentId() {
187         return null;
188     }
189 
190     @Override
191     public DateTime getDateCreated() {
192         return null;
193     }
194 
195     @Override
196     public String getTitle() {
197         return null;
198     }
199 
200     @Override
201     public ValidActions getValidActions() {
202         return null;
203     }
204 
205     @Override
206     public RequestedActions getRequestedActions() {
207         return null;
208     }
209 
210     @Override
211     public void saveDocument(String annotation) {}
212 
213     @Override
214     public void route(String annotation) {}
215 
216     @Override
217     public void disapprove(String annotation) {}
218 
219     @Override
220     public void approve(String annotation) {}
221 
222     @Override
223     public void cancel(String annotation) {}
224 
225     @Override
226     public void blanketApprove(String annotation) {}
227 
228     @Override
229     public void blanketApprove(String annotation, String... nodeNames) {}
230 
231     @Override
232     public void saveDocumentData() {}
233 
234     @Override
235     public void setApplicationDocumentStatus(String applicationDocumentStatus) {}
236 
237     @Override
238     public void acknowledge(String annotation) {}
239 
240     @Override
241     public void fyi(String annotation) {}
242 
243     @Override
244     public void fyi() {}
245 
246     @Override
247     public void delete() {}
248 
249     @Override
250     public void refresh() {}
251 
252     @Override
253     public void adHocToPrincipal(ActionRequestType actionRequested, String annotation, String targetPrincipalId,
254             String responsibilityDescription, boolean forceAction) {}
255 
256     @Override
257     public void adHocToPrincipal(ActionRequestType actionRequested, String nodeName, String annotation,
258             String targetPrincipalId, String responsibilityDescription, boolean forceAction) {}
259 
260     @Override
261     public void adHocToPrincipal(ActionRequestType actionRequested, String nodeName, String annotation,
262             String targetPrincipalId, String responsibilityDescription, boolean forceAction, String requestLabel) {}
263 
264     @Override
265     public void adHocToGroup(ActionRequestType actionRequested, String annotation, String targetGroupId,
266             String responsibilityDescription, boolean forceAction) {}
267 
268     @Override
269     public void adHocToGroup(ActionRequestType actionRequested, String nodeName, String annotation,
270             String targetGroupId, String responsibilityDescription, boolean forceAction) {
271 
272     }
273 
274     @Override
275     public void adHocToGroup(ActionRequestType actionRequested, String nodeName, String annotation,
276             String targetGroupId, String responsibilityDescription, boolean forceAction, String requestLabel) {}
277 
278     @Override
279     public void revokeAdHocRequestById(String actionRequestId, String annotation) {}
280 
281     @Override
282     public void revokeAdHocRequests(AdHocRevoke revoke, String annotation) {}
283 
284     @Override
285     public void revokeAllAdHocRequests(String annotation) {}
286 
287     @Override
288     public void setTitle(String title) {}
289 
290     @Override
291     public String getDocumentTypeName() {
292         return null;
293     }
294 
295     @Override
296     public boolean isCompletionRequested() {
297         return false;
298     }
299 
300     @Override
301     public boolean isApprovalRequested() {
302         return false;
303     }
304 
305     @Override
306     public boolean isAcknowledgeRequested() {
307         return false;
308     }
309 
310     @Override
311     public boolean isFYIRequested() {
312         return false;
313     }
314 
315     @Override
316     public boolean isBlanketApproveCapable() {
317         return false;
318     }
319 
320     @Override
321     public boolean isRouteCapable() {
322         return false;
323     }
324 
325     @Override
326     public boolean isValidAction(ActionType actionType) {
327         return false;
328     }
329 
330     @Override
331     public void superUserBlanketApprove(String annotation) {}
332 
333     @Override
334     public void superUserNodeApprove(String nodeName, String annotation) {}
335 
336     @Override
337     public void superUserTakeRequestedAction(String actionRequestId, String annotation) {}
338 
339     @Override
340     public void superUserDisapprove(String annotation) {}
341 
342     @Override
343     public void superUserCancel(String annotation) {}
344 
345     @Override
346     public void superUserReturnToPreviousNode(ReturnPoint returnPoint, String annotation) {}
347 
348     @Override
349     public void complete(String annotation) {}
350 
351     @Override
352     public void logAnnotation(String annotation) {}
353 
354     @Override
355     public DocumentStatus getStatus() {
356         return null;
357     }
358 
359     @Override
360     public boolean checkStatus(DocumentStatus status) {
361         return false;
362     }
363 
364     @Override
365     public boolean isInitiated() {
366         return false;
367     }
368 
369     @Override
370     public boolean isSaved() {
371         return false;
372     }
373 
374     @Override
375     public boolean isEnroute() {
376         return false;
377     }
378 
379     @Override
380     public boolean isException() {
381         return false;
382     }
383 
384     @Override
385     public boolean isCanceled() {
386         return false;
387     }
388 
389     @Override
390     public boolean isDisapproved() {
391         return false;
392     }
393 
394     @Override
395     public boolean isApproved() {
396         return false;
397     }
398 
399     @Override
400     public boolean isProcessed() {
401         return false;
402     }
403 
404     @Override
405     public boolean isFinal() {
406         return false;
407     }
408 
409     @Override
410     public String getPrincipalId() {
411         return null;
412     }
413 
414     @Override
415     public void switchPrincipal(String principalId) {}
416 
417     @Override
418     public void takeGroupAuthority(String annotation, String groupId) {}
419 
420     @Override
421     public void releaseGroupAuthority(String annotation, String groupId) {}
422 
423     @Override
424     public Set<String> getNodeNames() {
425         return null;
426     }
427 
428     @Override
429     public void returnToPreviousNode(String nodeName, String annotation) {}
430 
431     @Override
432     public void returnToPreviousNode(ReturnPoint returnPoint, String annotation) {}
433 
434     @Override
435     public void move(MovePoint movePoint, String annotation) {}
436 
437     @Override
438     public List<RouteNodeInstance> getActiveRouteNodeInstances() {
439         return null;
440     }
441 
442     @Override
443     public List<RouteNodeInstance> getRouteNodeInstances() {
444         return null;
445     }
446 
447     @Override
448     public List<String> getPreviousNodeNames() {
449         return null;
450     }
451 
452     @Override
453     public DocumentDetail getDocumentDetail() {
454         return null;
455     }
456 
457     @Override
458     public void updateDocumentContent(DocumentContentUpdate documentContentUpdate) {}
459 
460     @Override
461     public void placeInExceptionRouting(String annotation) {}
462 
463     @Override
464     public void setVariable(String name, String value) {}
465 
466     @Override
467     public String getVariableValue(String name) {
468         return null;
469     }
470 
471     @Override
472     public void setReceiveFutureRequests() {}
473 
474     @Override
475     public void setDoNotReceiveFutureRequests() {}
476 
477     @Override
478     public void setClearFutureRequests() {}
479 
480     @Override
481     public String getReceiveFutureRequestsValue() {
482         return null;
483     }
484 
485     @Override
486     public String getDoNotReceiveFutureRequestsValue() {
487         return null;
488     }
489 
490     @Override
491     public String getClearFutureRequestsValue() {
492         return null;
493     }
494 
495 }