1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.rice.ksb.api.registry; |
17 | |
|
18 | |
import java.util.ArrayList; |
19 | |
import java.util.Collection; |
20 | |
import java.util.Collections; |
21 | |
import java.util.List; |
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.XmlElementWrapper; |
28 | |
import javax.xml.bind.annotation.XmlRootElement; |
29 | |
import javax.xml.bind.annotation.XmlType; |
30 | |
|
31 | |
import org.kuali.rice.core.api.CoreConstants; |
32 | |
import org.kuali.rice.core.api.mo.AbstractDataTransferObject; |
33 | |
import org.w3c.dom.Element; |
34 | |
|
35 | |
|
36 | |
|
37 | |
|
38 | |
|
39 | |
|
40 | |
|
41 | |
|
42 | |
|
43 | |
@XmlRootElement(name = RemoveAndPublishResult.Constants.ROOT_ELEMENT_NAME) |
44 | |
@XmlAccessorType(XmlAccessType.NONE) |
45 | |
@XmlType(name = RemoveAndPublishResult.Constants.TYPE_NAME, propOrder = { |
46 | |
RemoveAndPublishResult.Elements.SERVICES_REMOVED, |
47 | |
RemoveAndPublishResult.Elements.SERVICES_PUBLISHED, |
48 | |
CoreConstants.CommonElements.FUTURE_ELEMENTS |
49 | |
}) |
50 | |
public class RemoveAndPublishResult extends AbstractDataTransferObject { |
51 | |
|
52 | |
private static final long serialVersionUID = 4279564869510247725L; |
53 | |
|
54 | |
@XmlElementWrapper(name = Elements.SERVICES_REMOVED, required = false) |
55 | |
@XmlElement(name = Elements.SERVICE_REMOVED, required = false) |
56 | |
private final List<ServiceEndpoint> servicesRemoved; |
57 | |
|
58 | |
@XmlElementWrapper(name = Elements.SERVICES_PUBLISHED, required = false) |
59 | |
@XmlElement(name = Elements.SERVICE_PUBLISHED, required = false) |
60 | |
private final List<ServiceEndpoint> servicesPublished; |
61 | |
|
62 | 0 | @SuppressWarnings("unused") |
63 | |
@XmlAnyElement |
64 | |
private final Collection<Element> _futureElements = null; |
65 | |
|
66 | 0 | private RemoveAndPublishResult() { |
67 | 0 | this.servicesRemoved = null; |
68 | 0 | this.servicesPublished = null; |
69 | 0 | } |
70 | |
|
71 | 0 | private RemoveAndPublishResult(List<ServiceEndpoint> servicesRemoved, List<ServiceEndpoint> servicesPublished) { |
72 | 0 | this.servicesRemoved = servicesRemoved; |
73 | 0 | this.servicesPublished = servicesPublished; |
74 | 0 | } |
75 | |
|
76 | |
|
77 | |
|
78 | |
|
79 | |
|
80 | |
|
81 | |
|
82 | |
|
83 | |
|
84 | |
public static RemoveAndPublishResult create(List<ServiceEndpoint> servicesRemoved, List<ServiceEndpoint> servicesPublished) { |
85 | 0 | return new RemoveAndPublishResult(new ArrayList<ServiceEndpoint>(servicesRemoved), |
86 | |
new ArrayList<ServiceEndpoint>(servicesPublished)); |
87 | |
} |
88 | |
|
89 | |
|
90 | |
|
91 | |
|
92 | |
|
93 | |
|
94 | |
|
95 | |
|
96 | |
public List<ServiceEndpoint> getServicesRemoved() { |
97 | 0 | return Collections.unmodifiableList(servicesRemoved); |
98 | |
} |
99 | |
|
100 | |
|
101 | |
|
102 | |
|
103 | |
|
104 | |
|
105 | |
|
106 | |
|
107 | |
public List<ServiceEndpoint> getServicesPublished() { |
108 | 0 | return Collections.unmodifiableList(servicesPublished); |
109 | |
} |
110 | |
|
111 | |
|
112 | |
|
113 | |
|
114 | 0 | static class Constants { |
115 | |
|
116 | |
final static String ROOT_ELEMENT_NAME = "removeAndPublishResult"; |
117 | |
final static String TYPE_NAME = "RemoveAndPublishResultType"; |
118 | |
} |
119 | |
|
120 | |
|
121 | |
|
122 | |
|
123 | 0 | static class Elements { |
124 | |
|
125 | |
final static String SERVICES_REMOVED = "servicesRemoved"; |
126 | |
final static String SERVICE_REMOVED = "serviceRemoved"; |
127 | |
final static String SERVICES_PUBLISHED = "servicesPublished"; |
128 | |
final static String SERVICE_PUBLISHED = "servicePublished"; |
129 | |
|
130 | |
} |
131 | |
|
132 | |
} |