1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.rice.kim.service.impl; |
17 | |
|
18 | |
import java.util.List; |
19 | |
import java.util.Map; |
20 | |
|
21 | |
import javax.jws.WebService; |
22 | |
|
23 | |
import org.kuali.rice.kim.bo.entity.dto.KimEntityDefaultInfo; |
24 | |
import org.kuali.rice.kim.bo.entity.dto.KimEntityInfo; |
25 | |
import org.kuali.rice.kim.bo.entity.dto.KimEntityNameInfo; |
26 | |
import org.kuali.rice.kim.bo.entity.dto.KimEntityNamePrincipalNameInfo; |
27 | |
import org.kuali.rice.kim.bo.entity.dto.KimEntityPrivacyPreferencesInfo; |
28 | |
import org.kuali.rice.kim.bo.entity.dto.KimPrincipalInfo; |
29 | |
import org.kuali.rice.kim.bo.reference.dto.AddressTypeInfo; |
30 | |
import org.kuali.rice.kim.bo.reference.dto.AffiliationTypeInfo; |
31 | |
import org.kuali.rice.kim.bo.reference.dto.CitizenshipStatusInfo; |
32 | |
import org.kuali.rice.kim.bo.reference.dto.EmailTypeInfo; |
33 | |
import org.kuali.rice.kim.bo.reference.dto.EmploymentStatusInfo; |
34 | |
import org.kuali.rice.kim.bo.reference.dto.EmploymentTypeInfo; |
35 | |
import org.kuali.rice.kim.bo.reference.dto.EntityNameTypeInfo; |
36 | |
import org.kuali.rice.kim.bo.reference.dto.EntityTypeInfo; |
37 | |
import org.kuali.rice.kim.bo.reference.dto.ExternalIdentifierTypeInfo; |
38 | |
import org.kuali.rice.kim.bo.reference.dto.PhoneTypeInfo; |
39 | |
import org.kuali.rice.kim.service.IdentityArchiveService; |
40 | |
import org.kuali.rice.kim.service.IdentityService; |
41 | |
import org.kuali.rice.kim.service.IdentityUpdateService; |
42 | |
import org.kuali.rice.kim.util.KIMWebServiceConstants; |
43 | |
|
44 | |
|
45 | |
|
46 | |
|
47 | |
|
48 | |
|
49 | |
|
50 | |
|
51 | |
|
52 | |
@WebService(endpointInterface = KIMWebServiceConstants.IdentityService.INTERFACE_CLASS, serviceName = KIMWebServiceConstants.IdentityService.WEB_SERVICE_NAME, portName = KIMWebServiceConstants.IdentityService.WEB_SERVICE_PORT, targetNamespace = KIMWebServiceConstants.MODULE_TARGET_NAMESPACE) |
53 | |
public class IdentityCurrentAndArchivedServiceImpl implements IdentityService, IdentityUpdateService { |
54 | |
|
55 | |
private final IdentityArchiveService identityArchiveService; |
56 | |
private final IdentityService innerIdentityService; |
57 | |
|
58 | |
|
59 | |
|
60 | |
|
61 | |
|
62 | |
public IdentityCurrentAndArchivedServiceImpl(IdentityService innerIdentityService, |
63 | 0 | IdentityArchiveService identityArchiveService) { |
64 | 0 | this.innerIdentityService = innerIdentityService; |
65 | 0 | this.identityArchiveService = identityArchiveService; |
66 | 0 | } |
67 | |
|
68 | |
|
69 | |
|
70 | |
|
71 | |
public AddressTypeInfo getAddressType(String code) { |
72 | 0 | return getInnerIdentityService().getAddressType(code); |
73 | |
} |
74 | |
|
75 | |
|
76 | |
|
77 | |
|
78 | |
public AffiliationTypeInfo getAffiliationType(String code) { |
79 | 0 | return getInnerIdentityService().getAffiliationType(code); |
80 | |
} |
81 | |
|
82 | |
|
83 | |
|
84 | |
|
85 | |
public CitizenshipStatusInfo getCitizenshipStatus(String code) { |
86 | 0 | return getInnerIdentityService().getCitizenshipStatus(code); |
87 | |
} |
88 | |
|
89 | |
|
90 | |
|
91 | |
|
92 | |
public Map<String, KimEntityNameInfo> getDefaultNamesForEntityIds( |
93 | |
List<String> entityIds) { |
94 | 0 | return getInnerIdentityService().getDefaultNamesForEntityIds(entityIds); |
95 | |
} |
96 | |
|
97 | |
|
98 | |
|
99 | |
|
100 | |
public Map<String, KimEntityNamePrincipalNameInfo> getDefaultNamesForPrincipalIds( |
101 | |
List<String> principalIds) { |
102 | 0 | return getInnerIdentityService().getDefaultNamesForPrincipalIds(principalIds); |
103 | |
} |
104 | |
|
105 | |
|
106 | |
|
107 | |
|
108 | |
public EmailTypeInfo getEmailType(String code) { |
109 | 0 | return getInnerIdentityService().getEmailType(code); |
110 | |
} |
111 | |
|
112 | |
|
113 | |
|
114 | |
|
115 | |
public EmploymentStatusInfo getEmploymentStatus(String code) { |
116 | 0 | return getInnerIdentityService().getEmploymentStatus(code); |
117 | |
} |
118 | |
|
119 | |
|
120 | |
|
121 | |
|
122 | |
public EmploymentTypeInfo getEmploymentType(String code) { |
123 | 0 | return getInnerIdentityService().getEmploymentType(code); |
124 | |
} |
125 | |
|
126 | |
|
127 | |
|
128 | |
|
129 | |
|
130 | |
|
131 | |
|
132 | |
public KimEntityDefaultInfo getEntityDefaultInfo(String entityId) { |
133 | 0 | KimEntityDefaultInfo entity = getInnerIdentityService().getEntityDefaultInfo(entityId); |
134 | 0 | if ( entity == null ) { |
135 | 0 | entity = getIdentityArchiveService().getEntityDefaultInfoFromArchive( entityId ); |
136 | |
} else { |
137 | 0 | getIdentityArchiveService().saveDefaultInfoToArchive(entity); |
138 | |
} |
139 | 0 | return entity; |
140 | |
} |
141 | |
|
142 | |
|
143 | |
|
144 | |
|
145 | |
|
146 | |
|
147 | |
|
148 | |
public KimEntityDefaultInfo getEntityDefaultInfoByPrincipalId( |
149 | |
String principalId) { |
150 | 0 | KimEntityDefaultInfo entity = getInnerIdentityService().getEntityDefaultInfoByPrincipalId(principalId); |
151 | 0 | if ( entity == null ) { |
152 | 0 | entity = getIdentityArchiveService().getEntityDefaultInfoFromArchiveByPrincipalId( principalId ); |
153 | |
} else { |
154 | 0 | getIdentityArchiveService().saveDefaultInfoToArchive(entity); |
155 | |
} |
156 | 0 | return entity; |
157 | |
} |
158 | |
|
159 | |
|
160 | |
|
161 | |
|
162 | |
|
163 | |
|
164 | |
|
165 | |
public KimEntityDefaultInfo getEntityDefaultInfoByPrincipalName( |
166 | |
String principalName) { |
167 | 0 | KimEntityDefaultInfo entity = getInnerIdentityService().getEntityDefaultInfoByPrincipalName(principalName); |
168 | 0 | if ( entity == null ) { |
169 | 0 | entity = getIdentityArchiveService().getEntityDefaultInfoFromArchiveByPrincipalName( principalName ); |
170 | |
} else { |
171 | 0 | getIdentityArchiveService().saveDefaultInfoToArchive(entity); |
172 | |
} |
173 | 0 | return entity; |
174 | |
} |
175 | |
|
176 | |
|
177 | |
|
178 | |
|
179 | |
public KimEntityInfo getEntityInfo(String entityId) { |
180 | 0 | return getInnerIdentityService().getEntityInfo(entityId); |
181 | |
} |
182 | |
|
183 | |
|
184 | |
|
185 | |
|
186 | |
public KimEntityInfo getEntityInfoByPrincipalId(String principalId) { |
187 | 0 | return getInnerIdentityService().getEntityInfoByPrincipalId(principalId); |
188 | |
} |
189 | |
|
190 | |
|
191 | |
|
192 | |
|
193 | |
public KimEntityInfo getEntityInfoByPrincipalName(String principalName) { |
194 | 0 | return getInnerIdentityService().getEntityInfoByPrincipalName(principalName); |
195 | |
} |
196 | |
|
197 | |
|
198 | |
|
199 | |
|
200 | |
public EntityNameTypeInfo getEntityNameType(String code) { |
201 | 0 | return getInnerIdentityService().getEntityNameType(code); |
202 | |
} |
203 | |
|
204 | |
|
205 | |
|
206 | |
|
207 | |
public KimEntityPrivacyPreferencesInfo getEntityPrivacyPreferences( |
208 | |
String entityId) { |
209 | 0 | return getInnerIdentityService().getEntityPrivacyPreferences(entityId); |
210 | |
} |
211 | |
|
212 | |
|
213 | |
|
214 | |
|
215 | |
public EntityTypeInfo getEntityType(String code) { |
216 | 0 | return getInnerIdentityService().getEntityType(code); |
217 | |
} |
218 | |
|
219 | |
|
220 | |
|
221 | |
|
222 | |
public ExternalIdentifierTypeInfo getExternalIdentifierType(String code) { |
223 | 0 | return getInnerIdentityService().getExternalIdentifierType(code); |
224 | |
} |
225 | |
|
226 | |
|
227 | |
|
228 | |
|
229 | |
public int getMatchingEntityCount(Map<String, String> searchCriteria) { |
230 | 0 | return getInnerIdentityService().getMatchingEntityCount(searchCriteria); |
231 | |
} |
232 | |
|
233 | |
|
234 | |
|
235 | |
|
236 | |
public PhoneTypeInfo getPhoneType(String code) { |
237 | 0 | return getInnerIdentityService().getPhoneType(code); |
238 | |
} |
239 | |
|
240 | |
|
241 | |
|
242 | |
|
243 | |
public KimPrincipalInfo getPrincipal(String principalId) { |
244 | 0 | return getInnerIdentityService().getPrincipal(principalId); |
245 | |
} |
246 | |
|
247 | |
|
248 | |
|
249 | |
|
250 | |
public KimPrincipalInfo getPrincipalByPrincipalName(String principalName) { |
251 | 0 | return getInnerIdentityService().getPrincipalByPrincipalName(principalName); |
252 | |
} |
253 | |
|
254 | |
|
255 | |
|
256 | |
|
257 | |
public KimPrincipalInfo getPrincipalByPrincipalNameAndPassword( |
258 | |
String principalName, String password) { |
259 | 0 | return getInnerIdentityService().getPrincipalByPrincipalNameAndPassword( |
260 | |
principalName, password); |
261 | |
} |
262 | |
|
263 | |
|
264 | |
|
265 | |
|
266 | |
public List<KimEntityDefaultInfo> lookupEntityDefaultInfo( |
267 | |
Map<String, String> searchCriteria, boolean unbounded) { |
268 | 0 | return getInnerIdentityService().lookupEntityDefaultInfo(searchCriteria, |
269 | |
unbounded); |
270 | |
} |
271 | |
|
272 | |
|
273 | |
|
274 | |
|
275 | |
public List<KimEntityInfo> lookupEntityInfo( |
276 | |
Map<String, String> searchCriteria, boolean unbounded) { |
277 | 0 | return getInnerIdentityService().lookupEntityInfo(searchCriteria, unbounded); |
278 | |
} |
279 | |
|
280 | |
private IdentityService getInnerIdentityService() { |
281 | 0 | return innerIdentityService; |
282 | |
} |
283 | |
|
284 | |
private IdentityArchiveService getIdentityArchiveService() { |
285 | 0 | return identityArchiveService; |
286 | |
} |
287 | |
|
288 | |
} |