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 java.util.Collection; |
19 | |
|
20 | |
import javax.xml.bind.annotation.XmlAccessType; |
21 | |
import javax.xml.bind.annotation.XmlAccessorType; |
22 | |
import javax.xml.bind.annotation.XmlAnyElement; |
23 | |
import javax.xml.bind.annotation.XmlElement; |
24 | |
import javax.xml.bind.annotation.XmlRootElement; |
25 | |
import javax.xml.bind.annotation.XmlType; |
26 | |
|
27 | |
import org.apache.commons.lang.StringUtils; |
28 | |
import org.apache.commons.lang.builder.EqualsBuilder; |
29 | |
import org.apache.commons.lang.builder.HashCodeBuilder; |
30 | |
import org.apache.commons.lang.builder.ToStringBuilder; |
31 | |
import org.kuali.rice.core.api.CoreConstants; |
32 | |
import org.w3c.dom.Element; |
33 | |
|
34 | |
@XmlRootElement(name = ReturnPoint.Constants.ROOT_ELEMENT_NAME) |
35 | |
@XmlAccessorType(XmlAccessType.NONE) |
36 | |
@XmlType(name = ReturnPoint.Constants.TYPE_NAME, propOrder = { |
37 | |
ReturnPoint.Elements.NODE_NAME, |
38 | |
CoreConstants.CommonElements.FUTURE_ELEMENTS |
39 | |
}) |
40 | |
public final class ReturnPoint { |
41 | |
|
42 | |
@XmlElement(name = Elements.NODE_NAME, required = true) |
43 | |
private final String nodeName; |
44 | |
|
45 | 0 | @SuppressWarnings("unused") |
46 | |
@XmlAnyElement |
47 | |
private final Collection<Element> _futureElements = null; |
48 | |
|
49 | 0 | private ReturnPoint() { |
50 | 0 | this.nodeName = null; |
51 | 0 | } |
52 | |
|
53 | 0 | private ReturnPoint(String nodeName) { |
54 | 0 | if (StringUtils.isBlank(nodeName)) { |
55 | 0 | throw new IllegalArgumentException("nodeName was null or blank"); |
56 | |
} |
57 | 0 | this.nodeName = nodeName; |
58 | 0 | } |
59 | |
|
60 | |
public static ReturnPoint create(String nodeName) { |
61 | 0 | return new ReturnPoint(nodeName); |
62 | |
} |
63 | |
|
64 | |
public String getNodeName() { |
65 | 0 | return nodeName; |
66 | |
} |
67 | |
|
68 | |
@Override |
69 | |
public int hashCode() { |
70 | 0 | return HashCodeBuilder.reflectionHashCode(this, Constants.HASH_CODE_EQUALS_EXCLUDE); |
71 | |
} |
72 | |
|
73 | |
@Override |
74 | |
public boolean equals(Object object) { |
75 | 0 | return EqualsBuilder.reflectionEquals(object, this, Constants.HASH_CODE_EQUALS_EXCLUDE); |
76 | |
} |
77 | |
|
78 | |
@Override |
79 | |
public String toString() { |
80 | 0 | return ToStringBuilder.reflectionToString(this); |
81 | |
} |
82 | |
|
83 | |
|
84 | |
|
85 | |
|
86 | 0 | static class Constants { |
87 | |
final static String ROOT_ELEMENT_NAME = "returnPoint"; |
88 | |
final static String TYPE_NAME = "ReturnPointType"; |
89 | 0 | final static String[] HASH_CODE_EQUALS_EXCLUDE = new String[] { CoreConstants.CommonElements.FUTURE_ELEMENTS }; |
90 | |
} |
91 | |
|
92 | |
|
93 | |
|
94 | |
|
95 | 0 | static class Elements { |
96 | |
final static String NODE_NAME = "nodeName"; |
97 | |
} |
98 | |
|
99 | |
} |