1
2
3
4
5 package org.kuali.student.kim.permission.mock;
6
7 import org.kuali.rice.core.api.criteria.QueryByCriteria;
8 import org.kuali.rice.core.api.exception.RiceIllegalArgumentException;
9 import org.kuali.rice.core.api.exception.RiceIllegalStateException;
10 import org.kuali.rice.kim.api.identity.CodedAttribute;
11 import org.kuali.rice.kim.api.identity.IdentityService;
12 import org.kuali.rice.kim.api.identity.address.EntityAddress;
13 import org.kuali.rice.kim.api.identity.affiliation.EntityAffiliation;
14 import org.kuali.rice.kim.api.identity.affiliation.EntityAffiliationType;
15 import org.kuali.rice.kim.api.identity.citizenship.EntityCitizenship;
16 import org.kuali.rice.kim.api.identity.email.EntityEmail;
17 import org.kuali.rice.kim.api.identity.employment.EntityEmployment;
18 import org.kuali.rice.kim.api.identity.entity.Entity;
19 import org.kuali.rice.kim.api.identity.entity.EntityDefault;
20 import org.kuali.rice.kim.api.identity.entity.EntityDefaultQueryResults;
21 import org.kuali.rice.kim.api.identity.entity.EntityQueryResults;
22 import org.kuali.rice.kim.api.identity.external.EntityExternalIdentifier;
23 import org.kuali.rice.kim.api.identity.external.EntityExternalIdentifierType;
24 import org.kuali.rice.kim.api.identity.name.EntityName;
25 import org.kuali.rice.kim.api.identity.personal.EntityBioDemographics;
26 import org.kuali.rice.kim.api.identity.personal.EntityEthnicity;
27 import org.kuali.rice.kim.api.identity.phone.EntityPhone;
28 import org.kuali.rice.kim.api.identity.principal.EntityNamePrincipalName;
29 import org.kuali.rice.kim.api.identity.principal.Principal;
30 import org.kuali.rice.kim.api.identity.principal.PrincipalQueryResults;
31 import org.kuali.rice.kim.api.identity.privacy.EntityPrivacyPreferences;
32 import org.kuali.rice.kim.api.identity.residency.EntityResidency;
33 import org.kuali.rice.kim.api.identity.type.EntityTypeContactInfo;
34 import org.kuali.rice.kim.api.identity.visa.EntityVisa;
35 import org.kuali.student.common.mock.MockService;
36 import org.kuali.student.common.util.UUIDHelper;
37
38 import javax.jws.WebParam;
39 import java.util.HashMap;
40 import java.util.List;
41 import java.util.Map;
42
43
44
45
46
47 public class IdentityServiceMockImpl implements IdentityService, MockService {
48
49 private Map<String, Entity> entities = new HashMap<String,Entity> ();
50
51
52 @Override
53 public void clear() {
54 this.entities.clear();
55
56 }
57
58 @Override
59 public EntityAddress addAddressToEntity(EntityAddress ea) throws RiceIllegalArgumentException, RiceIllegalStateException {
60 throw new UnsupportedOperationException("Not supported yet.");
61 }
62
63 @Override
64 public EntityAffiliation addAffiliationToEntity(EntityAffiliation ea) throws RiceIllegalArgumentException, RiceIllegalStateException {
65 throw new UnsupportedOperationException("Not supported yet.");
66 }
67
68 @Override
69 public EntityBioDemographics addBioDemographicsToEntity(EntityBioDemographics ebd) throws RiceIllegalArgumentException, RiceIllegalStateException {
70 throw new UnsupportedOperationException("Not supported yet.");
71 }
72
73 @Override
74 public EntityCitizenship addCitizenshipToEntity(EntityCitizenship ec) throws RiceIllegalArgumentException, RiceIllegalStateException {
75 throw new UnsupportedOperationException("Not supported yet.");
76 }
77
78 @Override
79 public EntityEmail addEmailToEntity(EntityEmail ee) throws RiceIllegalArgumentException, RiceIllegalStateException {
80 throw new UnsupportedOperationException("Not supported yet.");
81 }
82
83 @Override
84 public EntityEmployment addEmploymentToEntity(EntityEmployment ee) throws RiceIllegalArgumentException, RiceIllegalStateException {
85 throw new UnsupportedOperationException("Not supported yet.");
86 }
87
88 @Override
89 public EntityTypeContactInfo addEntityTypeContactInfoToEntity(EntityTypeContactInfo etci) throws RiceIllegalArgumentException, RiceIllegalStateException {
90 throw new UnsupportedOperationException("Not supported yet.");
91 }
92
93 @Override
94 public EntityEthnicity addEthnicityToEntity(EntityEthnicity ee) throws RiceIllegalArgumentException, RiceIllegalStateException {
95 throw new UnsupportedOperationException("Not supported yet.");
96 }
97
98 @Override
99 public EntityExternalIdentifier addExternalIdentifierToEntity(EntityExternalIdentifier eei) throws RiceIllegalArgumentException, RiceIllegalStateException {
100 throw new UnsupportedOperationException("Not supported yet.");
101 }
102
103 @Override
104 public EntityName addNameToEntity(EntityName en) throws RiceIllegalArgumentException, RiceIllegalStateException {
105 throw new UnsupportedOperationException("Not supported yet.");
106 }
107
108 @Override
109 public EntityPhone addPhoneToEntity(EntityPhone ep) throws RiceIllegalArgumentException, RiceIllegalStateException {
110 throw new UnsupportedOperationException("Not supported yet.");
111 }
112
113 @Override
114 public Principal addPrincipalToEntity(Principal prncpl) throws RiceIllegalArgumentException, RiceIllegalStateException {
115 throw new UnsupportedOperationException("Not supported yet.");
116 }
117
118 @Override
119 public EntityPrivacyPreferences addPrivacyPreferencesToEntity(EntityPrivacyPreferences epp) throws RiceIllegalArgumentException, RiceIllegalStateException {
120 throw new UnsupportedOperationException("Not supported yet.");
121 }
122
123 @Override
124 public EntityResidency addResidencyToEntity(EntityResidency er) throws RiceIllegalArgumentException, RiceIllegalStateException {
125 throw new UnsupportedOperationException("Not supported yet.");
126 }
127
128 @Override
129 public EntityVisa addVisaToEntity(EntityVisa ev) throws RiceIllegalArgumentException, RiceIllegalStateException {
130 throw new UnsupportedOperationException("Not supported yet.");
131 }
132
133 @Override
134 public Entity createEntity(Entity entity) throws RiceIllegalArgumentException, RiceIllegalStateException {
135 Entity.Builder builder = Entity.Builder.create(entity);
136 if (builder.getId() == null) {
137 builder.setId(UUIDHelper.genStringUUID());
138 }
139 Entity copy = builder.build();
140 this.entities.put(entity.getId(), copy);
141 return copy;
142 }
143
144 @Override
145 public EntityQueryResults findEntities(QueryByCriteria qbc) throws RiceIllegalArgumentException {
146 throw new UnsupportedOperationException("Not supported yet.");
147 }
148
149 @Override
150 public EntityDefaultQueryResults findEntityDefaults(QueryByCriteria qbc) throws RiceIllegalArgumentException {
151 throw new UnsupportedOperationException("Not supported yet.");
152 }
153
154 @Override
155 public CodedAttribute getAddressType(String string) throws RiceIllegalArgumentException {
156 throw new UnsupportedOperationException("Not supported yet.");
157 }
158
159 @Override
160 public List<CodedAttribute> findAllAddressTypes() {
161 throw new UnsupportedOperationException("Not supported yet.");
162 }
163
164 @Override
165 public EntityAffiliationType getAffiliationType(String string) throws RiceIllegalArgumentException {
166 throw new UnsupportedOperationException("Not supported yet.");
167 }
168
169 @Override
170 public List<EntityAffiliationType> findAllAffiliationTypes() {
171 throw new UnsupportedOperationException("Not supported yet.");
172 }
173
174 @Override
175 public CodedAttribute getCitizenshipStatus(String string) throws RiceIllegalArgumentException {
176 throw new UnsupportedOperationException("Not supported yet.");
177 }
178
179 @Override
180 public List<CodedAttribute> findAllCitizenshipStatuses() {
181 throw new UnsupportedOperationException("Not supported yet.");
182 }
183
184 @Override
185 public CodedAttribute getEmailType(String string) throws RiceIllegalArgumentException {
186 throw new UnsupportedOperationException("Not supported yet.");
187 }
188
189 @Override
190 public List<CodedAttribute> findAllEmailTypes() {
191 throw new UnsupportedOperationException("Not supported yet.");
192 }
193
194 @Override
195 public PrincipalQueryResults findPrincipals(@WebParam(name = "query") QueryByCriteria query) throws RiceIllegalArgumentException {
196 throw new UnsupportedOperationException("Not supported yet.");
197 }
198
199 @Override
200 public CodedAttribute getEmploymentStatus(String string) throws RiceIllegalArgumentException {
201 throw new UnsupportedOperationException("Not supported yet.");
202 }
203
204 @Override
205 public List<CodedAttribute> findAllEmploymentStatuses() {
206 throw new UnsupportedOperationException("Not supported yet.");
207 }
208
209 @Override
210 public CodedAttribute getEmploymentType(String string) throws RiceIllegalArgumentException {
211 throw new UnsupportedOperationException("Not supported yet.");
212 }
213
214 @Override
215 public List<CodedAttribute> findAllEmploymentTypes() {
216 throw new UnsupportedOperationException("Not supported yet.");
217 }
218
219 @Override
220 public Entity getEntity(String id) throws RiceIllegalArgumentException {
221 Entity entity = this.entities.get(id);
222 return entity;
223 }
224
225 @Override
226 public Entity getEntityByPrincipalId(String string) throws RiceIllegalArgumentException {
227 throw new UnsupportedOperationException("Not supported yet.");
228 }
229
230 @Override
231 public Entity getEntityByPrincipalName(String string) throws RiceIllegalArgumentException {
232 throw new UnsupportedOperationException("Not supported yet.");
233 }
234
235
236
237
238
239
240
241
242
243
244
245
246 @Override
247 public Entity getEntityByEmployeeId(@WebParam(name = "employeeId") String employeeId) throws RiceIllegalArgumentException {
248 throw new UnsupportedOperationException("Not supported yet.");
249 }
250
251 @Override
252 public EntityDefault getEntityDefault(String string) throws RiceIllegalArgumentException {
253 throw new UnsupportedOperationException("Not supported yet.");
254 }
255
256 @Override
257 public EntityDefault getEntityDefaultByPrincipalId(String string) throws RiceIllegalArgumentException {
258 throw new UnsupportedOperationException("Not supported yet.");
259 }
260
261 @Override
262 public EntityDefault getEntityDefaultByPrincipalName(String string) throws RiceIllegalArgumentException {
263 throw new UnsupportedOperationException("Not supported yet.");
264 }
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279 @Override
280 public EntityDefault getEntityDefaultByEmployeeId(@WebParam(name = "employeeId") String employeeId) throws RiceIllegalArgumentException {
281 throw new UnsupportedOperationException("Not supported yet.");
282 }
283
284 @Override
285 public EntityPrivacyPreferences getEntityPrivacyPreferences(String string) throws RiceIllegalArgumentException {
286 throw new UnsupportedOperationException("Not supported yet.");
287 }
288
289 @Override
290 public CodedAttribute getEntityType(String string) throws RiceIllegalArgumentException {
291 throw new UnsupportedOperationException("Not supported yet.");
292 }
293
294 @Override
295 public List<CodedAttribute> findAllEntityTypes() {
296 throw new UnsupportedOperationException("Not supported yet.");
297 }
298
299 @Override
300 public EntityExternalIdentifierType getExternalIdentifierType(String string) throws RiceIllegalArgumentException {
301 throw new UnsupportedOperationException("Not supported yet.");
302 }
303
304 @Override
305 public List<EntityExternalIdentifierType> findAllExternalIdendtifierTypes() {
306 throw new UnsupportedOperationException("Not supported yet.");
307 }
308
309 @Override
310 public CodedAttribute getNameType(String string) throws RiceIllegalArgumentException {
311 throw new UnsupportedOperationException("Not supported yet.");
312 }
313
314 @Override
315 public List<CodedAttribute> findAllNameTypes() {
316 throw new UnsupportedOperationException("Not supported yet.");
317 }
318
319 @Override
320 public CodedAttribute getPhoneType(String string) throws RiceIllegalArgumentException {
321 throw new UnsupportedOperationException("Not supported yet.");
322 }
323
324 @Override
325 public List<CodedAttribute> findAllPhoneTypes() {
326 throw new UnsupportedOperationException("Not supported yet.");
327 }
328
329 @Override
330 public Principal getPrincipal(String string) throws RiceIllegalArgumentException {
331 throw new UnsupportedOperationException("Not supported yet.");
332 }
333
334 @Override
335 public List<Principal> getPrincipals(@WebParam(name = "principalIds") List<String> strings) {
336 throw new UnsupportedOperationException("Not supported yet.");
337 }
338
339 @Override
340 public Principal getPrincipalByPrincipalName(String string) throws RiceIllegalArgumentException {
341 throw new UnsupportedOperationException("Not supported yet.");
342 }
343
344 @Override
345 public Principal getPrincipalByPrincipalNameAndPassword(String string, String string1) throws RiceIllegalArgumentException {
346 throw new UnsupportedOperationException("Not supported yet.");
347 }
348
349 @Override
350 public EntityAddress inactivateAddress(String string) throws RiceIllegalArgumentException, RiceIllegalStateException {
351 throw new UnsupportedOperationException("Not supported yet.");
352 }
353
354 @Override
355 public EntityAffiliation inactivateAffiliation(String string) throws RiceIllegalArgumentException, RiceIllegalStateException {
356 throw new UnsupportedOperationException("Not supported yet.");
357 }
358
359
360
361
362
363
364
365
366 @Override
367 public EntityNamePrincipalName getDefaultNamesForPrincipalId(@WebParam(name = "principalId") String principalId) {
368 throw new UnsupportedOperationException("Not supported yet.");
369 }
370
371 @Override
372 public EntityCitizenship inactivateCitizenship(String string) throws RiceIllegalArgumentException, RiceIllegalStateException {
373 throw new UnsupportedOperationException("Not supported yet.");
374 }
375
376 @Override
377 public EntityEmail inactivateEmail(String string) throws RiceIllegalArgumentException, RiceIllegalStateException {
378 throw new UnsupportedOperationException("Not supported yet.");
379 }
380
381 @Override
382 public EntityEmployment inactivateEmployment(String string) throws RiceIllegalArgumentException, RiceIllegalStateException {
383 throw new UnsupportedOperationException("Not supported yet.");
384 }
385
386 @Override
387 public Entity inactivateEntity(String string) throws RiceIllegalArgumentException, RiceIllegalStateException {
388 throw new UnsupportedOperationException("Not supported yet.");
389 }
390
391 @Override
392 public EntityTypeContactInfo inactivateEntityTypeContactInfo(String string, String string1) throws RiceIllegalArgumentException, RiceIllegalStateException {
393 throw new UnsupportedOperationException("Not supported yet.");
394 }
395
396 @Override
397 public EntityName inactivateName(String string) throws RiceIllegalArgumentException, RiceIllegalStateException {
398 throw new UnsupportedOperationException("Not supported yet.");
399 }
400
401 @Override
402 public EntityPhone inactivatePhone(String string) throws RiceIllegalArgumentException, RiceIllegalStateException {
403 throw new UnsupportedOperationException("Not supported yet.");
404 }
405
406 @Override
407 public Principal inactivatePrincipal(String string) throws RiceIllegalArgumentException, RiceIllegalStateException {
408 throw new UnsupportedOperationException("Not supported yet.");
409 }
410
411 @Override
412 public Principal inactivatePrincipalByName(String string) throws RiceIllegalArgumentException, RiceIllegalStateException {
413 throw new UnsupportedOperationException("Not supported yet.");
414 }
415
416 @Override
417 public EntityAddress updateAddress(EntityAddress ea) throws RiceIllegalArgumentException, RiceIllegalStateException {
418 throw new UnsupportedOperationException("Not supported yet.");
419 }
420
421 @Override
422 public EntityAffiliation updateAffiliation(EntityAffiliation ea) throws RiceIllegalArgumentException, RiceIllegalStateException {
423 throw new UnsupportedOperationException("Not supported yet.");
424 }
425
426 @Override
427 public EntityBioDemographics updateBioDemographics(EntityBioDemographics ebd) throws RiceIllegalArgumentException, RiceIllegalStateException {
428 throw new UnsupportedOperationException("Not supported yet.");
429 }
430
431 @Override
432 public EntityCitizenship updateCitizenship(EntityCitizenship ec) throws RiceIllegalArgumentException, RiceIllegalStateException {
433 throw new UnsupportedOperationException("Not supported yet.");
434 }
435
436 @Override
437 public EntityEmail updateEmail(EntityEmail ee) throws RiceIllegalArgumentException, RiceIllegalStateException {
438 throw new UnsupportedOperationException("Not supported yet.");
439 }
440
441 @Override
442 public EntityEmployment updateEmployment(EntityEmployment ee) throws RiceIllegalArgumentException, RiceIllegalStateException {
443 throw new UnsupportedOperationException("Not supported yet.");
444 }
445
446 @Override
447 public Entity updateEntity(Entity entity) throws RiceIllegalArgumentException, RiceIllegalStateException {
448 throw new UnsupportedOperationException("Not supported yet.");
449 }
450
451 @Override
452 public EntityTypeContactInfo updateEntityTypeContactInfo(EntityTypeContactInfo etci) throws RiceIllegalArgumentException, RiceIllegalStateException {
453 throw new UnsupportedOperationException("Not supported yet.");
454 }
455
456 @Override
457 public EntityEthnicity updateEthnicity(EntityEthnicity ee) throws RiceIllegalArgumentException, RiceIllegalStateException {
458 throw new UnsupportedOperationException("Not supported yet.");
459 }
460
461 @Override
462 public EntityExternalIdentifier updateExternalIdentifier(EntityExternalIdentifier eei) throws RiceIllegalArgumentException, RiceIllegalStateException {
463 throw new UnsupportedOperationException("Not supported yet.");
464 }
465
466 @Override
467 public EntityName updateName(EntityName en) throws RiceIllegalArgumentException, RiceIllegalStateException {
468 throw new UnsupportedOperationException("Not supported yet.");
469 }
470
471 @Override
472 public EntityPhone updatePhone(EntityPhone ep) throws RiceIllegalArgumentException, RiceIllegalStateException {
473 throw new UnsupportedOperationException("Not supported yet.");
474 }
475
476 @Override
477 public Principal updatePrincipal(Principal prncpl) throws RiceIllegalArgumentException, RiceIllegalStateException {
478 throw new UnsupportedOperationException("Not supported yet.");
479 }
480
481 @Override
482 public EntityPrivacyPreferences updatePrivacyPreferences(EntityPrivacyPreferences epp) throws RiceIllegalArgumentException, RiceIllegalStateException {
483 throw new UnsupportedOperationException("Not supported yet.");
484 }
485
486 @Override
487 public EntityResidency updateResidency(EntityResidency er) throws RiceIllegalArgumentException, RiceIllegalStateException {
488 throw new UnsupportedOperationException("Not supported yet.");
489 }
490
491 @Override
492 public EntityVisa updateVisa(EntityVisa ev) throws RiceIllegalArgumentException, RiceIllegalStateException {
493 throw new UnsupportedOperationException("Not supported yet.");
494 }
495
496
497 }