View Javadoc

1   /**
2    * Copyright 2005-2011 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.core.api.uif.RemotableAttributeErrorContract;
24  import org.kuali.rice.kew.api.WorkflowDocument;
25  import org.kuali.rice.kew.api.action.ActionRequest;
26  import org.kuali.rice.kew.api.action.ActionRequestType;
27  import org.kuali.rice.kew.api.action.ActionTaken;
28  import org.kuali.rice.kew.api.action.ActionType;
29  import org.kuali.rice.kew.api.action.AdHocRevoke;
30  import org.kuali.rice.kew.api.action.MovePoint;
31  import org.kuali.rice.kew.api.action.RequestedActions;
32  import org.kuali.rice.kew.api.action.ReturnPoint;
33  import org.kuali.rice.kew.api.action.ValidActions;
34  import org.kuali.rice.kew.api.document.Document;
35  import org.kuali.rice.kew.api.document.DocumentContent;
36  import org.kuali.rice.kew.api.document.DocumentContentUpdate;
37  import org.kuali.rice.kew.api.document.DocumentDetail;
38  import org.kuali.rice.kew.api.document.DocumentStatus;
39  import org.kuali.rice.kew.api.document.attribute.WorkflowAttributeDefinition;
40  import org.kuali.rice.kew.api.document.node.RouteNodeInstance;
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<? extends RemotableAttributeErrorContract> 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 recall(String annotation, boolean cancel) {}
227 
228     @Override
229     public void blanketApprove(String annotation) {}
230 
231     @Override
232     public void blanketApprove(String annotation, String... nodeNames) {}
233 
234     @Override
235     public void saveDocumentData() {}
236 
237     @Override
238     public void setApplicationDocumentStatus(String applicationDocumentStatus) {}
239 
240     @Override
241     public void acknowledge(String annotation) {}
242 
243     @Override
244     public void fyi(String annotation) {}
245 
246     @Override
247     public void fyi() {}
248 
249     @Override
250     public void delete() {}
251 
252     @Override
253     public void refresh() {}
254 
255     @Override
256     public void adHocToPrincipal(ActionRequestType actionRequested, String annotation, String targetPrincipalId,
257             String responsibilityDescription, boolean forceAction) {}
258 
259     @Override
260     public void adHocToPrincipal(ActionRequestType actionRequested, String nodeName, String annotation,
261             String targetPrincipalId, String responsibilityDescription, boolean forceAction) {}
262 
263     @Override
264     public void adHocToPrincipal(ActionRequestType actionRequested, String nodeName, String annotation,
265             String targetPrincipalId, String responsibilityDescription, boolean forceAction, String requestLabel) {}
266 
267     @Override
268     public void adHocToGroup(ActionRequestType actionRequested, String annotation, String targetGroupId,
269             String responsibilityDescription, boolean forceAction) {}
270 
271     @Override
272     public void adHocToGroup(ActionRequestType actionRequested, String nodeName, String annotation,
273             String targetGroupId, String responsibilityDescription, boolean forceAction) {
274 
275     }
276 
277     @Override
278     public void adHocToGroup(ActionRequestType actionRequested, String nodeName, String annotation,
279             String targetGroupId, String responsibilityDescription, boolean forceAction, String requestLabel) {}
280 
281     @Override
282     public void revokeAdHocRequestById(String actionRequestId, String annotation) {}
283 
284     @Override
285     public void revokeAdHocRequests(AdHocRevoke revoke, String annotation) {}
286 
287     @Override
288     public void revokeAllAdHocRequests(String annotation) {}
289 
290     @Override
291     public void setTitle(String title) {}
292 
293     @Override
294     public String getDocumentTypeName() {
295         return null;
296     }
297 
298     @Override
299     public boolean isCompletionRequested() {
300         return false;
301     }
302 
303     @Override
304     public boolean isApprovalRequested() {
305         return false;
306     }
307 
308     @Override
309     public boolean isAcknowledgeRequested() {
310         return false;
311     }
312 
313     @Override
314     public boolean isFYIRequested() {
315         return false;
316     }
317 
318     @Override
319     public boolean isBlanketApproveCapable() {
320         return false;
321     }
322 
323     @Override
324     public boolean isRouteCapable() {
325         return false;
326     }
327 
328     @Override
329     public boolean isValidAction(ActionType actionType) {
330         return false;
331     }
332 
333     @Override
334     public void superUserBlanketApprove(String annotation) {}
335 
336     @Override
337     public void superUserNodeApprove(String nodeName, String annotation) {}
338 
339     @Override
340     public void superUserTakeRequestedAction(String actionRequestId, String annotation) {}
341 
342     @Override
343     public void superUserDisapprove(String annotation) {}
344 
345     @Override
346     public void superUserCancel(String annotation) {}
347 
348     @Override
349     public void superUserReturnToPreviousNode(ReturnPoint returnPoint, String annotation) {}
350 
351     @Override
352     public void complete(String annotation) {}
353 
354     @Override
355     public void logAnnotation(String annotation) {}
356 
357     @Override
358     public DocumentStatus getStatus() {
359         return null;
360     }
361 
362     @Override
363     public boolean checkStatus(DocumentStatus status) {
364         return false;
365     }
366 
367     @Override
368     public boolean isInitiated() {
369         return false;
370     }
371 
372     @Override
373     public boolean isSaved() {
374         return false;
375     }
376 
377     @Override
378     public boolean isEnroute() {
379         return false;
380     }
381 
382     @Override
383     public boolean isException() {
384         return false;
385     }
386 
387     @Override
388     public boolean isCanceled() {
389         return false;
390     }
391 
392     @Override
393     public boolean isRecalled() {
394         return false;
395     }
396 
397     @Override
398     public boolean isDisapproved() {
399         return false;
400     }
401 
402     @Override
403     public boolean isApproved() {
404         return false;
405     }
406 
407     @Override
408     public boolean isProcessed() {
409         return false;
410     }
411 
412     @Override
413     public boolean isFinal() {
414         return false;
415     }
416 
417     @Override
418     public String getPrincipalId() {
419         return null;
420     }
421 
422     @Override
423     public void switchPrincipal(String principalId) {}
424 
425     @Override
426     public void takeGroupAuthority(String annotation, String groupId) {}
427 
428     @Override
429     public void releaseGroupAuthority(String annotation, String groupId) {}
430 
431     @Override
432     public Set<String> getNodeNames() {
433         return null;
434     }
435 
436     @Override
437     public void returnToPreviousNode(String nodeName, String annotation) {}
438 
439     @Override
440     public void returnToPreviousNode(String annotation, ReturnPoint returnPoint) {}
441 
442     @Override
443     public void move(MovePoint movePoint, String annotation) {}
444 
445     @Override
446     public List<RouteNodeInstance> getActiveRouteNodeInstances() {
447         return null;
448     }
449 
450     @Override
451     public List<RouteNodeInstance> getRouteNodeInstances() {
452         return null;
453     }
454 
455     @Override
456     public List<String> getPreviousNodeNames() {
457         return null;
458     }
459 
460     @Override
461     public DocumentDetail getDocumentDetail() {
462         return null;
463     }
464 
465     @Override
466     public void updateDocumentContent(DocumentContentUpdate documentContentUpdate) {}
467 
468     @Override
469     public void placeInExceptionRouting(String annotation) {}
470 
471     @Override
472     public void setVariable(String name, String value) {}
473 
474     @Override
475     public String getVariableValue(String name) {
476         return null;
477     }
478 
479     @Override
480     public void setReceiveFutureRequests() {}
481 
482     @Override
483     public void setDoNotReceiveFutureRequests() {}
484 
485     @Override
486     public void setClearFutureRequests() {}
487 
488     @Override
489     public String getReceiveFutureRequestsValue() {
490         return null;
491     }
492 
493     @Override
494     public String getDoNotReceiveFutureRequestsValue() {
495         return null;
496     }
497 
498     @Override
499     public String getClearFutureRequestsValue() {
500         return null;
501     }
502 
503 }