1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
package org.kuali.rice.kew.postprocessor; |
18 | |
|
19 | |
import java.util.Arrays; |
20 | |
import java.util.List; |
21 | |
|
22 | |
import org.kuali.rice.kew.dto.DTOConverter; |
23 | |
|
24 | |
|
25 | |
|
26 | |
|
27 | |
|
28 | |
|
29 | |
|
30 | |
|
31 | |
|
32 | |
|
33 | |
public class PostProcessorRemoteAdapter implements PostProcessor { |
34 | |
|
35 | |
public PostProcessorRemote postProcessor; |
36 | |
|
37 | 0 | public PostProcessorRemoteAdapter(PostProcessorRemote postProcessor) { |
38 | 0 | this.postProcessor = postProcessor; |
39 | 0 | } |
40 | |
|
41 | |
public ProcessDocReport doRouteStatusChange(DocumentRouteStatusChange statusChangeEvent) throws Exception { |
42 | 0 | return new ProcessDocReport(postProcessor.doRouteStatusChange(DTOConverter.convertDocumentRouteStatusChange(statusChangeEvent))); |
43 | |
} |
44 | |
|
45 | |
public ProcessDocReport doRouteLevelChange(DocumentRouteLevelChange levelChangeEvent) throws Exception { |
46 | 0 | return new ProcessDocReport(postProcessor.doRouteLevelChange(DTOConverter.convertDocumentRouteLevelChange(levelChangeEvent))); |
47 | |
} |
48 | |
|
49 | |
public ProcessDocReport doDeleteRouteHeader(DeleteEvent deleteEvent) throws Exception { |
50 | 0 | return new ProcessDocReport(postProcessor.doDeleteRouteHeader(DTOConverter.convertDeleteEvent(deleteEvent))); |
51 | |
} |
52 | |
|
53 | |
public ProcessDocReport doActionTaken(ActionTakenEvent actionTakenEvent) throws Exception { |
54 | 0 | return new ProcessDocReport(postProcessor.doActionTaken(DTOConverter.convertActionTakenEvent(actionTakenEvent))); |
55 | |
} |
56 | |
|
57 | |
public ProcessDocReport beforeProcess(BeforeProcessEvent event) throws Exception { |
58 | 0 | return new ProcessDocReport(postProcessor.beforeProcess(DTOConverter.convertBeforeProcessEvent(event))); |
59 | |
} |
60 | |
|
61 | |
public ProcessDocReport afterProcess(AfterProcessEvent event) throws Exception { |
62 | 0 | return new ProcessDocReport(postProcessor.afterProcess(DTOConverter.convertAfterProcessEvent(event))); |
63 | |
} |
64 | |
|
65 | |
public List<String> getDocumentIdsToLock(DocumentLockingEvent event) throws Exception { |
66 | 0 | String[] documentIdsToLock = postProcessor.getDocumentIdsToLock(DTOConverter.convertDocumentLockingEvent(event)); |
67 | 0 | if (documentIdsToLock == null) { |
68 | 0 | return null; |
69 | |
} |
70 | 0 | return Arrays.asList(documentIdsToLock); |
71 | |
} |
72 | |
|
73 | |
public PostProcessorRemote getPostProcessorRemote() { |
74 | 0 | return postProcessor; |
75 | |
} |
76 | |
} |