1   
2   
3   
4   
5   
6   
7   
8   
9   
10  
11  
12  
13  
14  
15  
16  
17  package org.kuali.ole.sys.document.workflow;
18  
19  import java.util.List;
20  
21  import org.apache.log4j.Logger;
22  import org.kuali.ole.sys.context.SpringContext;
23  import org.kuali.rice.kew.api.action.ActionType;
24  import org.kuali.rice.kew.framework.postprocessor.ActionTakenEvent;
25  import org.kuali.rice.kew.framework.postprocessor.AfterProcessEvent;
26  import org.kuali.rice.kew.framework.postprocessor.BeforeProcessEvent;
27  import org.kuali.rice.kew.framework.postprocessor.DeleteEvent;
28  import org.kuali.rice.kew.framework.postprocessor.DocumentLockingEvent;
29  import org.kuali.rice.kew.framework.postprocessor.DocumentRouteLevelChange;
30  import org.kuali.rice.kew.framework.postprocessor.DocumentRouteStatusChange;
31  import org.kuali.rice.kew.framework.postprocessor.ProcessDocReport;
32  import org.kuali.rice.krad.service.PostProcessorService;
33  
34  
35  
36  
37  
38  
39  
40  
41  public class PostProcessor implements org.kuali.rice.kew.framework.postprocessor.PostProcessor {
42  
43      private static Logger LOG = Logger.getLogger(PostProcessor.class);
44  
45      public List<String> getDocumentIdsToLock(DocumentLockingEvent arg0) throws Exception {
46          return SpringContext.getBean(PostProcessorService.class).getDocumentIdsToLock(arg0);
47      }
48  
49      
50  
51  
52      public ProcessDocReport doRouteStatusChange(DocumentRouteStatusChange statusChangeEvent) throws Exception {
53          return SpringContext.getBean(PostProcessorService.class).doRouteStatusChange(statusChangeEvent);
54      }
55  
56      
57  
58  
59      public ProcessDocReport doActionTaken(ActionTakenEvent event) throws Exception {
60          return SpringContext.getBean(PostProcessorService.class).doActionTaken(event);
61      }
62  
63      
64  
65  
66      public ProcessDocReport doDeleteRouteHeader(DeleteEvent event) throws Exception {
67          return SpringContext.getBean(PostProcessorService.class).doDeleteRouteHeader(event);
68      }
69  
70      
71  
72  
73      public ProcessDocReport doRouteLevelChange(DocumentRouteLevelChange levelChangeEvent) throws Exception {
74          return SpringContext.getBean(PostProcessorService.class).doRouteLevelChange(levelChangeEvent);
75      }
76  
77      public ProcessDocReport afterProcess(AfterProcessEvent arg0) throws Exception {
78          return new ProcessDocReport(true);
79      }
80  
81      public ProcessDocReport beforeProcess(BeforeProcessEvent arg0) throws Exception {
82          return new ProcessDocReport(true);
83      }
84  
85      @Override
86      public ProcessDocReport afterActionTaken(ActionType performed, ActionTakenEvent event) throws Exception {
87          return SpringContext.getBean(PostProcessorService.class).afterActionTaken(performed, event);
88      }
89  }