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.kew.actiontaken.ActionTakenValue;
19 import org.kuali.rice.kew.api.KewApiConstants;
20
21 import java.util.Collections;
22 import java.util.HashSet;
23 import java.util.Set;
24
25
26
27
28
29
30
31 public class OrchestrationConfig {
32
33 public enum EngineCapability { STANDARD, BLANKET_APPROVAL, SIMULATION }
34
35 private final EngineCapability capability;
36 private final boolean sendNotifications;
37 private final String notificationType = KewApiConstants.ACTION_REQUEST_ACKNOWLEDGE_REQ;
38 private final Set<String> destinationNodeNames;
39 private final ActionTakenValue cause;
40 private final boolean runPostProcessorLogic;
41
42 private final boolean deactivateAcknowledgements;
43 private final boolean deactivateFYIs;
44
45 public OrchestrationConfig(EngineCapability capability) {
46 this(capability, Collections.<String>emptySet(), null, true, true);
47 }
48
49 public OrchestrationConfig(EngineCapability capability, boolean isRunPostProcessorLogic) {
50 this(capability, Collections.<String>emptySet(), null, true, isRunPostProcessorLogic);
51 }
52
53 public OrchestrationConfig(EngineCapability capability, Set<String> destinationNodeNames, ActionTakenValue cause) {
54 this(capability, destinationNodeNames, cause, true, true);
55 }
56
57
58 public OrchestrationConfig(EngineCapability capability, Set<String> destinationNodeNames, ActionTakenValue cause, boolean sendNotifications, boolean doRunPostProcessorLogic) {
59 this(capability, destinationNodeNames, cause, sendNotifications, doRunPostProcessorLogic, false, false);
60 }
61
62 public OrchestrationConfig(EngineCapability capability, Set<String> destinationNodeNames, ActionTakenValue cause, boolean sendNotifications, boolean doRunPostProcessorLogic, boolean deactivateAcknowledgements, boolean deactivateFYIs) {
63 this.capability = capability;
64 this.destinationNodeNames = Collections.unmodifiableSet(new HashSet<String>(destinationNodeNames));
65 this.cause = cause;
66 this.sendNotifications = sendNotifications;
67 this.runPostProcessorLogic = doRunPostProcessorLogic;
68 this.deactivateAcknowledgements = deactivateAcknowledgements;
69 this.deactivateFYIs = deactivateFYIs;
70 }
71
72 public Set<String> getDestinationNodeNames() {
73 return destinationNodeNames;
74 }
75
76 public String getNotificationType() {
77 return notificationType;
78 }
79
80 public boolean isSendNotifications() {
81 return sendNotifications;
82 }
83
84 public ActionTakenValue getCause() {
85 return cause;
86 }
87
88 public boolean isRunPostProcessorLogic() {
89 return this.runPostProcessorLogic;
90 }
91
92
93
94
95 public EngineCapability getCapability() {
96 return this.capability;
97 }
98
99
100 public boolean isDeactivateAcknowledgements() {
101 return deactivateAcknowledgements;
102 }
103
104 public boolean isDeactivateFYIs() {
105 return deactivateFYIs;
106 }
107
108 }