1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.rice.kim.xml; |
17 | |
|
18 | |
import java.io.Serializable; |
19 | |
import java.util.ArrayList; |
20 | |
import java.util.List; |
21 | |
|
22 | |
import javax.xml.bind.annotation.XmlAccessType; |
23 | |
import javax.xml.bind.annotation.XmlAccessorType; |
24 | |
import javax.xml.bind.annotation.XmlElement; |
25 | |
import javax.xml.bind.annotation.XmlElementWrapper; |
26 | |
import javax.xml.bind.annotation.XmlRootElement; |
27 | |
import javax.xml.bind.annotation.XmlType; |
28 | |
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; |
29 | |
|
30 | |
import org.kuali.rice.core.jaxb.AdapterAttributeSetToHashMap; |
31 | |
import org.kuali.rice.kim.bo.types.dto.AttributeSet; |
32 | |
|
33 | |
|
34 | |
|
35 | |
|
36 | |
|
37 | |
|
38 | |
|
39 | |
|
40 | |
|
41 | |
|
42 | |
@XmlRootElement(name = "group", namespace = "http://rice.kuali.org/xsd/kim/group") |
43 | |
@XmlAccessorType(XmlAccessType.FIELD) |
44 | |
@XmlType(name = "Group", namespace = "http://rice.kuali.org/xsd/kim/group", propOrder = { |
45 | |
"groupId", "groupName", "groupDescription", "active", "kimTypeId", "namespaceCode", |
46 | |
"attributes","members" |
47 | |
}) |
48 | |
public class GroupXmlDto implements Serializable { |
49 | |
|
50 | |
public GroupXmlDto(String groupName, String groupDescription, boolean active) { |
51 | 0 | super(); |
52 | 0 | this.groupName = groupName; |
53 | 0 | this.groupDescription = groupDescription; |
54 | 0 | this.active = active; |
55 | 0 | } |
56 | |
public GroupXmlDto() { |
57 | 0 | super(); |
58 | 0 | this.active = true; |
59 | 0 | } |
60 | |
|
61 | |
private static final long serialVersionUID = 1L; |
62 | |
|
63 | |
@XmlElement(name = "groupId", namespace = "http://rice.kuali.org/xsd/kim/group") |
64 | |
protected String groupId; |
65 | |
|
66 | |
@XmlElement(name = "groupName", namespace = "http://rice.kuali.org/xsd/kim/group") |
67 | |
protected String groupName; |
68 | |
|
69 | |
@XmlElement(name = "groupDescription", namespace = "http://rice.kuali.org/xsd/kim/group") |
70 | |
protected String groupDescription; |
71 | |
|
72 | |
@XmlElement(name = "active", namespace = "http://rice.kuali.org/xsd/kim/group") |
73 | |
protected boolean active; |
74 | |
|
75 | |
@XmlElement(name = "kimTypeId", namespace = "http://rice.kuali.org/xsd/kim/group") |
76 | |
protected String kimTypeId; |
77 | |
|
78 | |
@XmlElement(name = "namespaceCode", namespace = "http://rice.kuali.org/xsd/kim/group") |
79 | |
protected String namespaceCode; |
80 | |
|
81 | |
|
82 | |
|
83 | |
|
84 | |
|
85 | |
@XmlElement(name = "attributes", namespace = "http://rice.kuali.org/xsd/kim/group") |
86 | |
@XmlJavaTypeAdapter(AdapterAttributeSetToHashMap.class) |
87 | |
protected AttributeSet attributes; |
88 | |
|
89 | |
|
90 | |
|
91 | 0 | @XmlElementWrapper(name = "members", namespace = "http://rice.kuali.org/xsd/kim/group") |
92 | |
@XmlElement(name = "member", namespace = "http://rice.kuali.org/xsd/kim/group") |
93 | |
protected List<GroupMembershipXmlDto> members = new ArrayList<GroupMembershipXmlDto>(); |
94 | |
|
95 | |
public String getGroupDescription() { |
96 | 0 | return this.groupDescription; |
97 | |
} |
98 | |
|
99 | |
public String getGroupId() { |
100 | 0 | return this.groupId; |
101 | |
} |
102 | |
|
103 | |
public String getGroupName() { |
104 | 0 | return this.groupName; |
105 | |
} |
106 | |
|
107 | |
public String getKimTypeId() { |
108 | 0 | return this.kimTypeId; |
109 | |
} |
110 | |
|
111 | |
public String getNamespaceCode() { |
112 | 0 | return this.namespaceCode; |
113 | |
} |
114 | |
|
115 | |
|
116 | |
|
117 | |
|
118 | |
|
119 | |
|
120 | |
|
121 | |
|
122 | |
|
123 | |
public List<GroupMembershipXmlDto> getMembers() { |
124 | 0 | return this.members; |
125 | |
} |
126 | |
|
127 | |
public void setGroupDescription(String groupDescription) { |
128 | 0 | this.groupDescription = groupDescription; |
129 | 0 | } |
130 | |
|
131 | |
public void setGroupId(String groupId) { |
132 | 0 | this.groupId = groupId; |
133 | 0 | } |
134 | |
|
135 | |
public void setGroupName(String groupName) { |
136 | 0 | this.groupName = groupName; |
137 | 0 | } |
138 | |
|
139 | |
public void setKimTypeId(String kimTypeId) { |
140 | 0 | this.kimTypeId = kimTypeId; |
141 | 0 | } |
142 | |
|
143 | |
public void setNamespaceCode(String namespaceCode) { |
144 | 0 | this.namespaceCode = namespaceCode; |
145 | 0 | } |
146 | |
|
147 | |
|
148 | |
|
149 | |
|
150 | |
|
151 | |
|
152 | |
|
153 | |
|
154 | |
|
155 | |
public void setMembers(List<GroupMembershipXmlDto> members) { |
156 | 0 | this.members = members; |
157 | 0 | } |
158 | |
|
159 | |
public boolean isActive() { |
160 | 0 | return this.active; |
161 | |
} |
162 | |
|
163 | |
public void setActive(boolean active) { |
164 | 0 | this.active = active; |
165 | 0 | } |
166 | |
|
167 | |
public void refresh(){ |
168 | |
|
169 | 0 | } |
170 | |
|
171 | |
public void prepareForWorkflow(){ |
172 | |
|
173 | 0 | } |
174 | |
public AttributeSet getAttributes() { |
175 | 0 | return this.attributes; |
176 | |
} |
177 | |
public void setAttributes(AttributeSet attributes) { |
178 | 0 | this.attributes = attributes; |
179 | 0 | } |
180 | |
|
181 | |
} |