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.kns.impls;
17  
18  import java.sql.Timestamp;
19  import java.util.Set;
20  
21  import org.kuali.rice.kew.dto.ReturnPointDTO;
22  import org.kuali.rice.kew.dto.RouteHeaderDTO;
23  import org.kuali.rice.kew.dto.WorkflowAttributeDefinitionDTO;
24  import org.kuali.rice.kew.exception.WorkflowException;
25  import org.kuali.rice.kim.bo.Person;
26  import org.kuali.rice.kns.service.DocumentService;
27  import org.kuali.rice.kns.workflow.service.KualiWorkflowDocument;
28  
29  
30  /**
31   * This class is the base class for a MockWorkflowDocument. It can be extended by any other kind of mock document that needs
32   * to override certain methods. This class has absolutely no state or behavior. There is no public constructor, and no member
33   * variables. All void methods do nothing. All methods with a return value return null. All state and behavior needs to be
34   * added via a subclass.
35   */
36  /**
37   * This is a description of what this class does - bh79 don't forget to fill this in. 
38   * 
39   * @author Kuali Rice Team (rice.collab@kuali.org)
40   *
41   */
42  public abstract class MockWorkflowDocument implements KualiWorkflowDocument {
43      private static final org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(DocumentService.class);
44  
45      /**
46       * Constructs a MockWorkflowDocument.java.
47       */
48      protected MockWorkflowDocument() {}
49  
50      /**
51       * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#isStandardSaveAllowed()
52       */
53      public boolean isStandardSaveAllowed() {
54          LOG.debug("Using MockWorkflowDocument");
55          return false;
56      }
57  
58      /**
59       * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#getApplicationContent()
60       */
61      public String getApplicationContent() {
62          LOG.debug("Using MockWorkflowDocument");
63          return null;
64      }
65  
66      /**
67       * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#setApplicationContent(java.lang.String)
68       */
69      public void setApplicationContent(String applicationContent) {
70          LOG.debug("Using MockWorkflowDocument");
71      }
72  
73      /**
74       * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#clearAttributeContent()
75       */
76      public void clearAttributeContent() {
77          LOG.debug("Using MockWorkflowDocument");
78      }
79  
80      /**
81       * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#getAttributeContent()
82       */
83      public String getAttributeContent() {
84          LOG.debug("Using MockWorkflowDocument");
85          return null;
86      }
87  
88      /**
89       * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#addAttributeDefinition(org.kuali.rice.kew.dto.WorkflowAttributeDefinitionDTO)
90       */
91      public void addAttributeDefinition(WorkflowAttributeDefinitionDTO attributeDefinition) {
92          LOG.debug("Using MockWorkflowDocument");
93      }
94  
95      /**
96       * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#removeAttributeDefinition(org.kuali.rice.kew.dto.WorkflowAttributeDefinitionDTO)
97       */
98      public void removeAttributeDefinition(WorkflowAttributeDefinitionDTO attributeDefinition) {
99          LOG.debug("Using MockWorkflowDocument");
100     }
101 
102     /**
103      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#clearAttributeDefinitions()
104      */
105     public void clearAttributeDefinitions() {
106         LOG.debug("Using MockWorkflowDocument");
107     }
108 
109     /**
110      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#getAttributeDefinitions()
111      */
112     public WorkflowAttributeDefinitionDTO[] getAttributeDefinitions() {
113         LOG.debug("Using MockWorkflowDocument");
114         return null;
115     }
116 
117     /**
118      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#addSearchableDefinition(org.kuali.rice.kew.dto.WorkflowAttributeDefinitionDTO)
119      */
120     public void addSearchableDefinition(WorkflowAttributeDefinitionDTO searchableDefinition) {
121         LOG.debug("Using MockWorkflowDocument");
122 
123     }
124 
125     /**
126      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#removeSearchableDefinition(org.kuali.rice.kew.dto.WorkflowAttributeDefinitionDTO)
127      */
128     public void removeSearchableDefinition(WorkflowAttributeDefinitionDTO searchableDefinition) {
129         LOG.debug("Using MockWorkflowDocument");
130 
131     }
132 
133     /**
134      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#clearSearchableDefinitions()
135      */
136     public void clearSearchableDefinitions() {
137         LOG.debug("Using MockWorkflowDocument");
138 
139     }
140 
141     /**
142      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#getSearchableDefinitions()
143      */
144     public WorkflowAttributeDefinitionDTO[] getSearchableDefinitions() {
145         LOG.debug("Using MockWorkflowDocument");
146         return null;
147     }
148 
149     /**
150      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#getRouteHeader()
151      */
152     public RouteHeaderDTO getRouteHeader() {
153         LOG.debug("Using MockWorkflowDocument");
154         return null;
155     }
156 
157     /**
158      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#getRouteHeaderId()
159      */
160     public Long getRouteHeaderId() throws WorkflowException {
161         LOG.debug("Using MockWorkflowDocument");
162         return null;
163     }
164 
165     /**
166      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#setAppDocId(java.lang.String)
167      */
168     public void setAppDocId(String appDocId) {
169         LOG.debug("Using MockWorkflowDocument");
170 
171     }
172 
173     /**
174      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#getAppDocId()
175      */
176     public String getAppDocId() {
177         LOG.debug("Using MockWorkflowDocument");
178         return null;
179     }
180 
181     /**
182      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#getInitiatorPrincipalId()
183      */
184     public String getInitiatorNetworkId() {
185         LOG.debug("Using MockWorkflowDocument");
186         return null;
187     }
188 
189     /**
190      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#getRoutedByUserNetworkId()
191      */
192     public String getRoutedByUserNetworkId() {
193         LOG.debug("Using MockWorkflowDocument");
194         return null;
195     }
196 
197     /**
198      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#getTitle()
199      */
200     public String getTitle() {
201         LOG.debug("Using MockWorkflowDocument");
202         return null;
203     }
204 
205     /**
206      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#saveDocument(java.lang.String)
207      */
208     public void saveDocument(String annotation) throws WorkflowException {
209         LOG.debug("Using MockWorkflowDocument");
210 
211     }
212 
213     /**
214      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#routeDocument(java.lang.String)
215      */
216     public void routeDocument(String annotation) throws WorkflowException {
217         LOG.debug("Using MockWorkflowDocument");
218 
219     }
220 
221     /**
222      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#disapprove(java.lang.String)
223      */
224     public void disapprove(String annotation) throws WorkflowException {
225         LOG.debug("Using MockWorkflowDocument");
226 
227     }
228 
229     /**
230      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#approve(java.lang.String)
231      */
232     public void approve(String annotation) throws WorkflowException {
233         LOG.debug("Using MockWorkflowDocument");
234 
235     }
236 
237     /**
238      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#superUserApprove(java.lang.String)
239      */
240     public void superUserApprove(String annotation) throws WorkflowException {
241         LOG.debug("Using MockWorkflowDocument");
242 
243     }
244 
245     /**
246      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#superUserActionRequestApprove(java.lang.Long,
247      *      java.lang.String)
248      */
249     public void superUserActionRequestApprove(Long actionRequestId, String annotation) throws WorkflowException {
250         LOG.debug("Using MockWorkflowDocument");
251     }
252 
253     /**
254      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#superUserCancel(java.lang.String)
255      */
256     public void superUserCancel(String annotation) throws WorkflowException {
257         LOG.debug("Using MockWorkflowDocument");
258 
259     }
260 
261     /**
262      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#superUserDisapprove(java.lang.String)
263      */
264     public void superUserDisapprove(String annotation) throws WorkflowException {
265         LOG.debug("Using MockWorkflowDocument");
266 
267     }
268 
269     /**
270      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#cancel(java.lang.String)
271      */
272     public void cancel(String annotation) throws WorkflowException {
273         LOG.debug("Using MockWorkflowDocument");
274 
275     }
276 
277     /**
278      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#blanketApprove(java.lang.String)
279      */
280     public void blanketApprove(String annotation) throws WorkflowException {
281         LOG.debug("Using MockWorkflowDocument");
282 
283     }
284 
285     /**
286      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#blanketApprove(java.lang.String, java.lang.Integer)
287      */
288     public void blanketApprove(String annotation, Integer routeLevel) throws WorkflowException {
289         LOG.debug("Using MockWorkflowDocument");
290 
291     }
292 
293     /**
294      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#saveRoutingData()
295      */
296     public void saveRoutingData() throws WorkflowException {
297         LOG.debug("Using MockWorkflowDocument");
298 
299     }
300 
301     /**
302      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#acknowledge(java.lang.String)
303      */
304     public void acknowledge(String annotation) throws WorkflowException {
305         LOG.debug("Using MockWorkflowDocument");
306 
307     }
308 
309     /**
310      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#fyi()
311      */
312     public void fyi() throws WorkflowException {
313         LOG.debug("Using MockWorkflowDocument");
314 
315     }
316 
317     /**
318      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#delete()
319      */
320     public void delete() throws WorkflowException {
321         LOG.debug("Using MockWorkflowDocument");
322 
323     }
324 
325     /**
326      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#refreshContent()
327      */
328     public void refreshContent() throws WorkflowException {
329         LOG.debug("Using MockWorkflowDocument");
330 
331     }
332 
333     /**
334      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#adHocRouteDocumentToPrincipal(java.lang.String,
335      *      java.lang.String, int, java.lang.String, org.kuali.rice.kew.dto.UserIdDTO, java.lang.String, boolean)
336      */
337     public void adHocRouteDocumentToPrincipal(String actionRequested, String routeTypeName, String annotation, String principalId, String responsibilityDesc, boolean forceAction) throws WorkflowException {
338         LOG.debug("Using MockWorkflowDocument");
339 
340     }
341 
342     public void adHocRouteDocumentToWorkgroup(String actionRequested, String routeTypeName, int priority, String annotation, String groupId, String responsibilityDesc, boolean forceAction) throws WorkflowException {
343         LOG.debug("Using MockWorkflowDocument");
344 
345     }
346 
347     /**
348      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#setTitle(java.lang.String)
349      */
350     public void setTitle(String title) throws WorkflowException {
351         LOG.debug("Using MockWorkflowDocument");
352 
353     }
354 
355     /**
356      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#getDocumentType()
357      */
358     public String getDocumentType() {
359         LOG.debug("Using MockWorkflowDocument");
360         return null;
361     }
362 
363     /**
364      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#isAdHocRequested()
365      */
366     public boolean isAdHocRequested() {
367         LOG.debug("Using MockWorkflowDocument");
368         return false;
369     }
370 
371     /**
372      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#isAcknowledgeRequested()
373      */
374     public boolean isAcknowledgeRequested() {
375         LOG.debug("Using MockWorkflowDocument");
376         return false;
377     }
378 
379     /**
380      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#isApprovalRequested()
381      */
382     public boolean isApprovalRequested() {
383         LOG.debug("Using MockWorkflowDocument");
384         return false;
385     }
386 
387     /**
388      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#isCompletionRequested()
389      */
390     public boolean isCompletionRequested() {
391         LOG.debug("Using MockWorkflowDocument");
392         return false;
393     }
394 
395     /**
396      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#isFYIRequested()
397      */
398     public boolean isFYIRequested() {
399         LOG.debug("Using MockWorkflowDocument");
400         return false;
401     }
402 
403     /**
404      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#isBlanketApproveCapable()
405      */
406     public boolean isBlanketApproveCapable() {
407         LOG.debug("Using MockWorkflowDocument");
408         return false;
409     }
410 
411     /**
412      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#getDocRouteLevel()
413      */
414     public Integer getDocRouteLevel() {
415         LOG.debug("Using MockWorkflowDocument");
416         return null;
417     }
418 
419     /**
420      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#getDocRouteLevelName()
421      */
422     public String getDocRouteLevelName() throws WorkflowException {
423         LOG.debug("Using MockWorkflowDocument");
424         return null;
425     }
426 
427     /**
428      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#getRouteTypeName()
429      */
430     public String getRouteTypeName() throws WorkflowException {
431         LOG.debug("Using MockWorkflowDocument");
432         return null;
433     }
434 
435     /**
436      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#complete(java.lang.String)
437      */
438     public void complete(String annotation) throws WorkflowException {
439         LOG.debug("Using MockWorkflowDocument");
440 
441     }
442 
443     /**
444      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#returnToPreviousNode(java.lang.String, java.lang.String)
445      */
446     public void returnToPreviousNode(String annotation, String nodeName) throws WorkflowException {
447         LOG.debug("Using MockWorkflowDocument");
448     }
449 
450     /**
451      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#returnToPreviousNode(java.lang.String, org.kuali.rice.kew.dto.ReturnPointDTO)
452      */
453     public void returnToPreviousNode(String annotation, ReturnPointDTO returnPoint) throws WorkflowException {
454         LOG.debug("Using MockWorkflowDocument");
455     }
456 
457     /**
458      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#returnToPreviousRouteLevel(java.lang.String,
459      *      java.lang.Integer)
460      */
461     public void returnToPreviousRouteLevel(String annotation, Integer destRouteLevel) throws WorkflowException {
462         LOG.debug("Using MockWorkflowDocument");
463 
464     }
465 
466     /**
467      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#logDocumentAction(java.lang.String)
468      */
469     public void logDocumentAction(String annotation) throws WorkflowException {
470         LOG.debug("Using MockWorkflowDocument");
471 
472     }
473 
474     /**
475      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#stateIsInitiated()
476      */
477     public boolean stateIsInitiated() {
478         LOG.debug("Using MockWorkflowDocument");
479         return false;
480     }
481 
482     /**
483      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#stateIsSaved()
484      */
485     public boolean stateIsSaved() {
486         LOG.debug("Using MockWorkflowDocument");
487         return false;
488     }
489 
490     /**
491      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#stateIsEnroute()
492      */
493     public boolean stateIsEnroute() {
494         LOG.debug("Using MockWorkflowDocument");
495         return false;
496     }
497 
498     /**
499      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#stateIsFinal()
500      */
501     public boolean stateIsFinal() {
502         LOG.debug("Using MockWorkflowDocument");
503         return false;
504     }
505 
506     /**
507      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#stateIsException()
508      */
509     public boolean stateIsException() {
510         LOG.debug("Using MockWorkflowDocument");
511         return false;
512     }
513 
514     /**
515      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#stateIsCanceled()
516      */
517     public boolean stateIsCanceled() {
518         LOG.debug("Using MockWorkflowDocument");
519         return false;
520     }
521 
522     /**
523      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#stateIsDisapproved()
524      */
525     public boolean stateIsDisapproved() {
526         LOG.debug("Using MockWorkflowDocument");
527         return false;
528     }
529 
530     /**
531      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#stateIsApproved()
532      */
533     public boolean stateIsApproved() {
534         LOG.debug("Using MockWorkflowDocument");
535         return false;
536     }
537 
538     /**
539      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#stateIsProcessed()
540      */
541     public boolean stateIsProcessed() {
542         LOG.debug("Using MockWorkflowDocument");
543         return false;
544     }
545 
546     /**
547      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#getStatusDisplayValue()
548      */
549     public String getStatusDisplayValue() {
550         LOG.debug("Using MockWorkflowDocument");
551         return null;
552     }
553 
554     /**
555      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#getCreateDate()
556      */
557     public Timestamp getCreateDate() {
558         LOG.debug("Using MockWorkflowDocument");
559         return null;
560     }
561 
562     /**
563      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#userIsInitiator(org.kuali.rice.kim.bo.Person)
564      */
565     public boolean userIsInitiator(Person user) {
566         LOG.debug("Using MockWorkflowDocument");
567         return false;
568     }
569 
570     /**
571      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#userIsRoutedByUser(org.kuali.rice.kim.bo.Person)
572      */
573     public boolean userIsRoutedByUser(Person user) {
574         LOG.debug("Using MockWorkflowDocument");
575         return false;
576     }
577 
578     /**
579      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#getNodeNames()
580      */
581     public String[] getNodeNames() throws WorkflowException {
582         LOG.debug("Using MockWorkflowDocument");
583         return null;
584     }
585 
586     /**
587      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#getCurrentRouteNodeNames()
588      */
589     public String getCurrentRouteNodeNames() {
590         LOG.debug("Using MockWorkflowDocument");
591         return null;
592 }
593 
594     /**
595      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#getAllPriorApprovers()
596      */
597     public Set<Person> getAllPriorApprovers() throws WorkflowException {
598         return null;
599     }
600 
601     /**
602      * This overridden method ...
603      * 
604      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#setClearFutureRequests()
605      */
606     public void setClearFutureRequests() throws WorkflowException {
607         LOG.debug("Using MockWorkflowDocument");
608     }
609 
610     /**
611      * This overridden method ...
612      * 
613      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#setDoNotReceiveFutureRequests()
614      */
615     public void setDoNotReceiveFutureRequests() throws WorkflowException {
616         LOG.debug("Using MockWorkflowDocument");
617     }
618 
619     /**
620      * This overridden method ...
621      * 
622      * @see org.kuali.rice.kns.workflow.service.KualiWorkflowDocument#setReceiveFutureRequests()
623      */
624     public void setReceiveFutureRequests() throws WorkflowException {
625         LOG.debug("Using MockWorkflowDocument");
626     }
627     
628 }
629