1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.rice.kew.engine; |
17 | |
|
18 | |
import org.kuali.rice.core.framework.parameter.ParameterService; |
19 | |
import org.kuali.rice.kew.engine.node.service.RouteNodeService; |
20 | |
import org.kuali.rice.kew.routeheader.service.RouteHeaderService; |
21 | |
import org.springframework.beans.factory.InitializingBean; |
22 | |
|
23 | |
|
24 | |
|
25 | |
|
26 | |
|
27 | |
|
28 | |
|
29 | |
|
30 | |
|
31 | |
|
32 | 0 | public class BlanketApproveEngineFactoryImpl implements BlanketApproveEngineFactory, InitializingBean { |
33 | |
|
34 | |
private RouteNodeService routeNodeService; |
35 | |
private RouteHeaderService routeHeaderService; |
36 | |
private ParameterService parameterService; |
37 | |
|
38 | |
|
39 | |
|
40 | |
|
41 | |
|
42 | |
|
43 | |
|
44 | |
@Override |
45 | |
public void afterPropertiesSet() { |
46 | 0 | if (routeNodeService == null) { |
47 | 0 | throw new IllegalStateException("routeNodeService not properly injected, was null."); |
48 | |
} |
49 | 0 | if (routeHeaderService == null) { |
50 | 0 | throw new IllegalStateException("routeHeaderService not properly injected, was null."); |
51 | |
} |
52 | 0 | if (parameterService == null) { |
53 | 0 | throw new IllegalStateException("parameterService not properly injected, was null."); |
54 | |
} |
55 | 0 | } |
56 | |
|
57 | |
|
58 | |
|
59 | |
|
60 | |
|
61 | |
|
62 | |
@Override |
63 | |
public BlanketApproveEngine newEngine(final OrchestrationConfig config, final boolean runPostProcessor) { |
64 | 0 | BlanketApproveEngine engine = new BlanketApproveEngine(config); |
65 | 0 | engine.setRouteNodeService(getRouteNodeService()); |
66 | 0 | engine.setRouteHeaderService(getRouteHeaderService()); |
67 | 0 | engine.setParameterService(getParameterService()); |
68 | 0 | engine.setRunPostProcessorLogic(runPostProcessor); |
69 | 0 | return engine; |
70 | |
} |
71 | |
|
72 | |
|
73 | |
|
74 | |
|
75 | |
|
76 | |
|
77 | |
@Override |
78 | |
public BlanketApproveEngine newEngine(final OrchestrationConfig config) { |
79 | 0 | return newEngine(config, true); |
80 | |
} |
81 | |
|
82 | |
public void setRouteNodeService(RouteNodeService routeNodeService) { |
83 | 0 | this.routeNodeService = routeNodeService; |
84 | 0 | } |
85 | |
|
86 | |
public void setRouteHeaderService(RouteHeaderService routeHeaderService) { |
87 | 0 | this.routeHeaderService = routeHeaderService; |
88 | 0 | } |
89 | |
|
90 | |
public void setParameterService( |
91 | |
ParameterService parameterService) { |
92 | 0 | this.parameterService = parameterService; |
93 | 0 | } |
94 | |
|
95 | |
protected final RouteNodeService getRouteNodeService() { |
96 | 0 | return this.routeNodeService; |
97 | |
} |
98 | |
|
99 | |
protected final RouteHeaderService getRouteHeaderService() { |
100 | 0 | return this.routeHeaderService; |
101 | |
} |
102 | |
|
103 | |
protected final ParameterService getParameterService() { |
104 | 0 | return this.parameterService; |
105 | |
} |
106 | |
|
107 | |
} |