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.kuali.rice.core.api.CoreConstants; |
28 | |
import org.kuali.rice.core.api.mo.AbstractDataTransferObject; |
29 | |
import org.w3c.dom.Element; |
30 | |
|
31 | |
@XmlRootElement(name = RequestedActions.Constants.ROOT_ELEMENT_NAME) |
32 | |
@XmlAccessorType(XmlAccessType.NONE) |
33 | |
@XmlType(name = RequestedActions.Constants.TYPE_NAME, propOrder = { |
34 | |
RequestedActions.Elements.COMPLETE_REQUESTED, |
35 | |
RequestedActions.Elements.APPROVE_REQUESTED, |
36 | |
RequestedActions.Elements.ACKNOWLEDGE_REQUESTED, |
37 | |
RequestedActions.Elements.FYI_REQUESTED, |
38 | |
CoreConstants.CommonElements.FUTURE_ELEMENTS |
39 | |
}) |
40 | |
public final class RequestedActions extends AbstractDataTransferObject { |
41 | |
|
42 | |
private static final long serialVersionUID = -6600754341497697330L; |
43 | |
|
44 | |
@XmlElement(name = Elements.COMPLETE_REQUESTED, required = true) |
45 | |
private final boolean completeRequested; |
46 | |
|
47 | |
@XmlElement(name = Elements.APPROVE_REQUESTED, required = true) |
48 | |
private final boolean approveRequested; |
49 | |
|
50 | |
@XmlElement(name = Elements.ACKNOWLEDGE_REQUESTED, required = true) |
51 | |
private final boolean acknowledgeRequested; |
52 | |
|
53 | |
@XmlElement(name = Elements.FYI_REQUESTED, required = true) |
54 | |
private final boolean fyiRequested; |
55 | |
|
56 | 0 | @SuppressWarnings("unused") |
57 | |
@XmlAnyElement |
58 | |
private final Collection<Element> _futureElements = null; |
59 | |
|
60 | 0 | private RequestedActions() { |
61 | 0 | this.completeRequested = false; |
62 | 0 | this.approveRequested = false; |
63 | 0 | this.acknowledgeRequested = false; |
64 | 0 | this.fyiRequested = false; |
65 | 0 | } |
66 | |
|
67 | 0 | private RequestedActions(boolean completeRequested, boolean approveRequested, boolean acknowledgeRequested, boolean fyiRequested) { |
68 | 0 | this.completeRequested = completeRequested; |
69 | 0 | this.approveRequested = approveRequested; |
70 | 0 | this.acknowledgeRequested = acknowledgeRequested; |
71 | 0 | this.fyiRequested = fyiRequested; |
72 | 0 | } |
73 | |
|
74 | |
public static RequestedActions create(boolean completeRequested, boolean approveRequested, boolean acknowledgeRequested, boolean fyiRequested) { |
75 | 0 | return new RequestedActions(completeRequested, approveRequested, acknowledgeRequested, fyiRequested); |
76 | |
} |
77 | |
|
78 | |
public boolean isCompleteRequested() { |
79 | 0 | return completeRequested; |
80 | |
} |
81 | |
|
82 | |
public boolean isApproveRequested() { |
83 | 0 | return approveRequested; |
84 | |
} |
85 | |
|
86 | |
public boolean isAcknowledgeRequested() { |
87 | 0 | return acknowledgeRequested; |
88 | |
} |
89 | |
|
90 | |
public boolean isFyiRequested() { |
91 | 0 | return fyiRequested; |
92 | |
} |
93 | |
|
94 | |
|
95 | |
|
96 | |
|
97 | 0 | static class Constants { |
98 | |
final static String ROOT_ELEMENT_NAME = "requestedActions"; |
99 | |
final static String TYPE_NAME = "RequestedActionsType"; |
100 | |
} |
101 | |
|
102 | |
|
103 | |
|
104 | |
|
105 | 0 | static class Elements { |
106 | |
final static String COMPLETE_REQUESTED = "completeRequested"; |
107 | |
final static String APPROVE_REQUESTED = "approveRequested"; |
108 | |
final static String ACKNOWLEDGE_REQUESTED = "acknowledgeRequested"; |
109 | |
final static String FYI_REQUESTED = "fyiRequested"; |
110 | |
} |
111 | |
|
112 | |
} |