1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
package org.kuali.rice.kew.engine; |
18 | |
|
19 | |
import org.kuali.rice.kew.actiontaken.ActionTakenValue; |
20 | |
import org.kuali.rice.kew.util.KEWConstants; |
21 | |
|
22 | |
import java.util.Collections; |
23 | |
import java.util.HashSet; |
24 | |
import java.util.Set; |
25 | |
|
26 | |
|
27 | |
|
28 | |
|
29 | |
|
30 | |
|
31 | |
|
32 | |
public class OrchestrationConfig { |
33 | |
|
34 | 5 | public enum EngineCapability { STANDARD, BLANKET_APPROVAL, SIMULATION }; |
35 | |
|
36 | |
private final EngineCapability capability; |
37 | |
private final boolean sendNotifications; |
38 | 5 | private final String notificationType = KEWConstants.ACTION_REQUEST_ACKNOWLEDGE_REQ; |
39 | |
private final Set<String> destinationNodeNames; |
40 | |
private final ActionTakenValue cause; |
41 | |
private final boolean runPostProcessorLogic; |
42 | |
|
43 | |
public OrchestrationConfig(EngineCapability capability) { |
44 | 3 | this(capability, null, null, true, true); |
45 | 3 | } |
46 | |
|
47 | |
public OrchestrationConfig(EngineCapability capability, boolean isRunPostProcessorLogic) { |
48 | 2 | this(capability, null, null, true, isRunPostProcessorLogic); |
49 | 2 | } |
50 | |
|
51 | |
public OrchestrationConfig(EngineCapability capability, Set<String> destinationNodeNames, ActionTakenValue cause) { |
52 | 0 | this(capability, destinationNodeNames, cause, true, true); |
53 | 0 | } |
54 | |
|
55 | 5 | public OrchestrationConfig(EngineCapability capability, Set<String> destinationNodeNames, ActionTakenValue cause, boolean sendNotifications, boolean doRunPostProcessorLogic) { |
56 | 5 | this.capability = capability; |
57 | 5 | if (destinationNodeNames != null) |
58 | 0 | this.destinationNodeNames = Collections.unmodifiableSet(destinationNodeNames); |
59 | |
else |
60 | 5 | this.destinationNodeNames = Collections.unmodifiableSet(new HashSet<String>()); |
61 | 5 | this.cause = cause; |
62 | 5 | this.sendNotifications = sendNotifications; |
63 | 5 | this.runPostProcessorLogic = doRunPostProcessorLogic; |
64 | 5 | } |
65 | |
|
66 | |
public Set<? extends String> getDestinationNodeNames() { |
67 | 0 | return destinationNodeNames; |
68 | |
} |
69 | |
|
70 | |
public String getNotificationType() { |
71 | 0 | return notificationType; |
72 | |
} |
73 | |
|
74 | |
public boolean isSendNotifications() { |
75 | 0 | return sendNotifications; |
76 | |
} |
77 | |
|
78 | |
public ActionTakenValue getCause() { |
79 | 0 | return cause; |
80 | |
} |
81 | |
|
82 | |
public boolean isRunPostProcessorLogic() { |
83 | 2 | return this.runPostProcessorLogic; |
84 | |
} |
85 | |
|
86 | |
|
87 | |
|
88 | |
|
89 | |
public EngineCapability getCapability() { |
90 | 5 | return this.capability; |
91 | |
} |
92 | |
|
93 | |
} |