1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.rice.kim.bo.entity.dto; |
17 | |
|
18 | |
import org.kuali.rice.kim.api.identity.affiliation.EntityAffiliation; |
19 | |
import org.kuali.rice.kim.api.identity.name.EntityName; |
20 | |
import org.kuali.rice.kim.api.identity.principal.Principal; |
21 | |
import org.kuali.rice.kim.api.identity.privacy.EntityPrivacyPreferences; |
22 | |
import org.kuali.rice.kim.api.identity.type.EntityTypeDataDefault; |
23 | |
import org.kuali.rice.kim.bo.entity.KimEntityEmploymentInformation; |
24 | |
|
25 | |
import java.util.ArrayList; |
26 | |
import java.util.List; |
27 | |
|
28 | |
|
29 | |
|
30 | |
|
31 | |
|
32 | |
|
33 | |
|
34 | 0 | public class KimEntityDefaultInfo extends KimInactivatableInfo { |
35 | |
|
36 | |
private static final long serialVersionUID = 7930630152792502380L; |
37 | |
protected String entityId; |
38 | |
protected EntityName defaultName; |
39 | |
protected List<Principal> principals; |
40 | |
protected List<EntityTypeDataDefault> entityTypes; |
41 | |
protected List<EntityAffiliation> affiliations; |
42 | |
protected EntityAffiliation defaultAffiliation; |
43 | |
protected KimEntityEmploymentInformationInfo primaryEmployment; |
44 | |
protected List<KimEntityExternalIdentifierInfo> externalIdentifiers; |
45 | |
protected EntityPrivacyPreferences privacyPreferences; |
46 | |
|
47 | |
|
48 | |
|
49 | |
|
50 | |
|
51 | |
public String getEntityId() { |
52 | 0 | return this.entityId; |
53 | |
} |
54 | |
|
55 | |
public void setEntityId(String entityId) { |
56 | 0 | this.entityId = entityId; |
57 | 0 | } |
58 | |
|
59 | |
|
60 | |
|
61 | |
|
62 | |
|
63 | |
public EntityName getDefaultName() { |
64 | 0 | return defaultName; |
65 | |
} |
66 | |
|
67 | |
public void setDefaultName(EntityName defaultName) { |
68 | 0 | this.defaultName = defaultName; |
69 | 0 | } |
70 | |
|
71 | |
|
72 | |
|
73 | |
|
74 | |
|
75 | |
|
76 | |
public List<EntityTypeDataDefault> getEntityTypes() { |
77 | |
|
78 | 0 | return (entityTypes != null) ? entityTypes : (entityTypes = new ArrayList<EntityTypeDataDefault>()); |
79 | |
} |
80 | |
|
81 | |
public void setEntityTypes(List<EntityTypeDataDefault> entityTypes) { |
82 | 0 | this.entityTypes = entityTypes; |
83 | 0 | } |
84 | |
|
85 | |
|
86 | |
|
87 | |
|
88 | |
|
89 | |
|
90 | |
public List<EntityAffiliation> getAffiliations() { |
91 | |
|
92 | 0 | return (affiliations != null) ? affiliations : (affiliations = new ArrayList<EntityAffiliation>()); |
93 | |
} |
94 | |
|
95 | |
public void setAffiliations(List<EntityAffiliation> affiliations) { |
96 | 0 | this.affiliations = affiliations; |
97 | 0 | } |
98 | |
|
99 | |
|
100 | |
|
101 | |
|
102 | |
|
103 | |
public EntityAffiliation getDefaultAffiliation() { |
104 | 0 | return defaultAffiliation; |
105 | |
} |
106 | |
|
107 | |
public void setDefaultAffiliation(EntityAffiliation defaultAffiliation) { |
108 | 0 | this.defaultAffiliation = defaultAffiliation; |
109 | 0 | } |
110 | |
|
111 | |
|
112 | |
|
113 | |
|
114 | |
|
115 | |
public KimEntityEmploymentInformationInfo getPrimaryEmployment() { |
116 | 0 | return primaryEmployment; |
117 | |
} |
118 | |
|
119 | |
public void setPrimaryEmployment(KimEntityEmploymentInformation primaryEmployment) { |
120 | 0 | if (primaryEmployment != null) { |
121 | 0 | if (primaryEmployment instanceof KimEntityEmploymentInformationInfo) { |
122 | 0 | this.primaryEmployment = (KimEntityEmploymentInformationInfo) primaryEmployment; |
123 | |
} |
124 | |
else { |
125 | 0 | this.primaryEmployment = new KimEntityEmploymentInformationInfo(primaryEmployment); |
126 | |
} |
127 | |
} |
128 | 0 | } |
129 | |
|
130 | |
public void setPrimaryEmployment(KimEntityEmploymentInformationInfo primaryEmployment) { |
131 | 0 | this.primaryEmployment = primaryEmployment; |
132 | 0 | } |
133 | |
|
134 | |
|
135 | |
|
136 | |
|
137 | |
|
138 | |
|
139 | |
public List<KimEntityExternalIdentifierInfo> getExternalIdentifiers() { |
140 | |
|
141 | 0 | return (externalIdentifiers != null) ? |
142 | |
externalIdentifiers : (externalIdentifiers = new ArrayList<KimEntityExternalIdentifierInfo>()); |
143 | |
} |
144 | |
|
145 | |
public void setExternalIdentifiers( |
146 | |
List<KimEntityExternalIdentifierInfo> externalIdentifiers) { |
147 | 0 | this.externalIdentifiers = externalIdentifiers; |
148 | 0 | } |
149 | |
|
150 | |
|
151 | |
|
152 | |
|
153 | |
|
154 | |
|
155 | |
public List<Principal> getPrincipals() { |
156 | |
|
157 | 0 | return (principals != null) ? principals : (principals = new ArrayList<Principal>()); |
158 | |
} |
159 | |
|
160 | |
public void setPrincipals(List<Principal> principals) { |
161 | 0 | this.principals = principals; |
162 | 0 | } |
163 | |
|
164 | |
|
165 | |
|
166 | |
|
167 | |
|
168 | |
|
169 | |
public EntityTypeDataDefault getEntityType(String entityTypeCode) { |
170 | 0 | EntityTypeDataDefault result = null; |
171 | 0 | if (entityTypes == null) { |
172 | 0 | entityTypes = new ArrayList<EntityTypeDataDefault>(); |
173 | |
} |
174 | 0 | for (EntityTypeDataDefault entType : entityTypes) { |
175 | 0 | if (entType.getEntityTypeCode().equals(entityTypeCode)) { |
176 | 0 | result = entType; |
177 | |
} |
178 | |
} |
179 | 0 | return result; |
180 | |
} |
181 | |
|
182 | |
|
183 | |
|
184 | |
|
185 | |
|
186 | |
public EntityPrivacyPreferences getPrivacyPreferences() { |
187 | 0 | return privacyPreferences; |
188 | |
} |
189 | |
|
190 | |
public void setPrivacyPreferences(EntityPrivacyPreferences privacyPreferences) { |
191 | 0 | this.privacyPreferences = privacyPreferences; |
192 | 0 | } |
193 | |
|
194 | |
} |