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