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