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