1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.rice.kew.api.action; |
17 | |
|
18 | |
import org.kuali.rice.core.api.CoreConstants; |
19 | |
import org.kuali.rice.core.api.mo.AbstractDataTransferObject; |
20 | |
import org.kuali.rice.core.api.mo.ModelBuilder; |
21 | |
import org.w3c.dom.Element; |
22 | |
|
23 | |
import javax.xml.bind.annotation.XmlAccessType; |
24 | |
import javax.xml.bind.annotation.XmlAccessorType; |
25 | |
import javax.xml.bind.annotation.XmlAnyElement; |
26 | |
import javax.xml.bind.annotation.XmlElement; |
27 | |
import javax.xml.bind.annotation.XmlRootElement; |
28 | |
import javax.xml.bind.annotation.XmlType; |
29 | |
import java.io.Serializable; |
30 | |
import java.util.Collection; |
31 | |
|
32 | |
|
33 | |
|
34 | |
|
35 | |
|
36 | |
|
37 | |
|
38 | |
@XmlRootElement(name = RoutingReportActionToTake.Constants.ROOT_ELEMENT_NAME) |
39 | |
@XmlAccessorType(XmlAccessType.NONE) |
40 | |
@XmlType(name = RoutingReportActionToTake.Constants.TYPE_NAME, propOrder = { |
41 | |
RoutingReportActionToTake.Elements.ACTION_TO_PERFORM, |
42 | |
RoutingReportActionToTake.Elements.PRINCIPAL_ID, |
43 | |
RoutingReportActionToTake.Elements.NODE_NAME, |
44 | |
CoreConstants.CommonElements.FUTURE_ELEMENTS |
45 | |
}) |
46 | 0 | public final class RoutingReportActionToTake |
47 | |
extends AbstractDataTransferObject |
48 | |
implements RoutingReportActionToTakeContract |
49 | |
{ |
50 | |
|
51 | |
@XmlElement(name = Elements.ACTION_TO_PERFORM, required = false) |
52 | |
private final String actionToPerform; |
53 | |
@XmlElement(name = Elements.PRINCIPAL_ID, required = false) |
54 | |
private final String principalId; |
55 | |
@XmlElement(name = Elements.NODE_NAME, required = false) |
56 | |
private final String nodeName; |
57 | 0 | @SuppressWarnings("unused") |
58 | |
@XmlAnyElement |
59 | |
private final Collection<Element> _futureElements = null; |
60 | |
|
61 | |
|
62 | |
|
63 | |
|
64 | |
|
65 | 0 | private RoutingReportActionToTake() { |
66 | 0 | this.actionToPerform = null; |
67 | 0 | this.principalId = null; |
68 | 0 | this.nodeName = null; |
69 | 0 | } |
70 | |
|
71 | 0 | private RoutingReportActionToTake(Builder builder) { |
72 | 0 | this.actionToPerform = builder.getActionToPerform(); |
73 | 0 | this.principalId = builder.getPrincipalId(); |
74 | 0 | this.nodeName = builder.getNodeName(); |
75 | 0 | } |
76 | |
|
77 | |
@Override |
78 | |
public String getActionToPerform() { |
79 | 0 | return this.actionToPerform; |
80 | |
} |
81 | |
|
82 | |
@Override |
83 | |
public String getPrincipalId() { |
84 | 0 | return this.principalId; |
85 | |
} |
86 | |
|
87 | |
@Override |
88 | |
public String getNodeName() { |
89 | 0 | return this.nodeName; |
90 | |
} |
91 | |
|
92 | |
|
93 | |
|
94 | |
|
95 | |
|
96 | |
|
97 | 0 | public final static class Builder |
98 | |
implements Serializable, ModelBuilder, RoutingReportActionToTakeContract |
99 | |
{ |
100 | |
|
101 | |
private String actionToPerform; |
102 | |
private String principalId; |
103 | |
private String nodeName; |
104 | |
|
105 | 0 | private Builder(String actionToPerform, String principalId, String nodeName) { |
106 | 0 | this.setActionToPerform(actionToPerform); |
107 | 0 | this.setPrincipalId(principalId); |
108 | 0 | this.setNodeName(nodeName); |
109 | 0 | } |
110 | |
|
111 | |
public static Builder create(String actionToPerform, String principalId, String nodeName) { |
112 | 0 | return new Builder(actionToPerform, principalId, nodeName); |
113 | |
} |
114 | |
|
115 | |
public static Builder create(RoutingReportActionToTakeContract contract) { |
116 | 0 | if (contract == null) { |
117 | 0 | throw new IllegalArgumentException("contract was null"); |
118 | |
} |
119 | 0 | return create(contract.getActionToPerform(), contract.getPrincipalId(), contract.getNodeName()); |
120 | |
} |
121 | |
|
122 | |
public RoutingReportActionToTake build() { |
123 | 0 | return new RoutingReportActionToTake(this); |
124 | |
} |
125 | |
|
126 | |
@Override |
127 | |
public String getActionToPerform() { |
128 | 0 | return this.actionToPerform; |
129 | |
} |
130 | |
|
131 | |
@Override |
132 | |
public String getPrincipalId() { |
133 | 0 | return this.principalId; |
134 | |
} |
135 | |
|
136 | |
@Override |
137 | |
public String getNodeName() { |
138 | 0 | return this.nodeName; |
139 | |
} |
140 | |
|
141 | |
public void setActionToPerform(String actionToPerform) { |
142 | 0 | this.actionToPerform = actionToPerform; |
143 | 0 | } |
144 | |
|
145 | |
public void setPrincipalId(String principalId) { |
146 | 0 | this.principalId = principalId; |
147 | 0 | } |
148 | |
|
149 | |
public void setNodeName(String nodeName) { |
150 | 0 | this.nodeName = nodeName; |
151 | 0 | } |
152 | |
|
153 | |
} |
154 | |
|
155 | |
|
156 | |
|
157 | |
|
158 | |
|
159 | |
|
160 | 0 | static class Constants { |
161 | |
|
162 | |
final static String ROOT_ELEMENT_NAME = "routingReportActionToTake"; |
163 | |
final static String TYPE_NAME = "RoutingReportActionToTakeType"; |
164 | |
|
165 | |
} |
166 | |
|
167 | |
|
168 | |
|
169 | |
|
170 | |
|
171 | |
|
172 | 0 | static class Elements { |
173 | |
|
174 | |
final static String ACTION_TO_PERFORM = "actionToPerform"; |
175 | |
final static String PRINCIPAL_ID = "principalId"; |
176 | |
final static String NODE_NAME = "nodeName"; |
177 | |
|
178 | |
} |
179 | |
|
180 | |
} |