View Javadoc

1   /**
2    * Copyright 2005-2011 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.rice.kim.api.identity;
17  
18  import org.kuali.rice.core.api.criteria.QueryByCriteria;
19  import org.kuali.rice.core.api.exception.RiceIllegalArgumentException;
20  import org.kuali.rice.core.api.exception.RiceIllegalStateException;
21  import org.kuali.rice.kim.api.KimConstants;
22  import org.kuali.rice.kim.api.identity.address.EntityAddress;
23  import org.kuali.rice.kim.api.identity.affiliation.EntityAffiliation;
24  import org.kuali.rice.kim.api.identity.affiliation.EntityAffiliationType;
25  import org.kuali.rice.kim.api.identity.citizenship.EntityCitizenship;
26  import org.kuali.rice.kim.api.identity.email.EntityEmail;
27  import org.kuali.rice.kim.api.identity.employment.EntityEmployment;
28  import org.kuali.rice.kim.api.identity.entity.Entity;
29  import org.kuali.rice.kim.api.identity.entity.EntityDefault;
30  import org.kuali.rice.kim.api.identity.entity.EntityDefaultQueryResults;
31  import org.kuali.rice.kim.api.identity.entity.EntityQueryResults;
32  import org.kuali.rice.kim.api.identity.external.EntityExternalIdentifier;
33  import org.kuali.rice.kim.api.identity.external.EntityExternalIdentifierType;
34  import org.kuali.rice.kim.api.identity.name.EntityName;
35  import org.kuali.rice.kim.api.identity.name.StringToKimEntityNameInfoMapAdapter;
36  import org.kuali.rice.kim.api.identity.personal.EntityBioDemographics;
37  import org.kuali.rice.kim.api.identity.personal.EntityEthnicity;
38  import org.kuali.rice.kim.api.identity.phone.EntityPhone;
39  import org.kuali.rice.kim.api.identity.principal.EntityNamePrincipalName;
40  import org.kuali.rice.kim.api.identity.principal.Principal;
41  import org.kuali.rice.kim.api.identity.principal.StringToKimEntityNamePrincipalInfoMapAdapter;
42  import org.kuali.rice.kim.api.identity.privacy.EntityPrivacyPreferences;
43  import org.kuali.rice.kim.api.identity.residency.EntityResidency;
44  import org.kuali.rice.kim.api.identity.type.EntityTypeContactInfo;
45  import org.kuali.rice.kim.api.identity.visa.EntityVisa;
46  import org.springframework.cache.annotation.CacheEvict;
47  import org.springframework.cache.annotation.Cacheable;
48  
49  import javax.jws.WebMethod;
50  import javax.jws.WebParam;
51  import javax.jws.WebResult;
52  import javax.jws.WebService;
53  import javax.jws.soap.SOAPBinding;
54  import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
55  import java.util.List;
56  import java.util.Map;
57  
58  /**
59   * This service provides operations to query for principal and identity data.
60   * 
61   * <p>A principal represents an identity that can authenticate.  In essence, a principal can be
62   * thought of as an "account" or as an identity's authentication credentials.  A principal has
63   * an id which is used to uniquely identify it.  It also has a name which represents the
64   * principal's username and is typically what is entered when authenticating.  All principals
65   * are associated with one and only one identity.
66   * 
67   * <p>An identity represents a person or system.  Additionally, other "types" of entities can
68   * be defined in KIM.  Information like name, phone number, etc. is associated with an identity.
69   * It is the representation of a concrete person or system.  While an identity will typically
70   * have a single principal associated with it, it is possible for an identity to have more than
71   * one principal or even no principals at all (in the case where the identity does not actually
72   * authenticate).
73   * 
74   * <p>This service also provides operations for querying various pieces of reference data, such as 
75   * address types, affiliation types, phone types, etc.
76   *
77   * 
78   * @author Kuali Rice Team (rice.collab@kuali.org)
79   *
80   */
81  @WebService(name = "identityService", targetNamespace = KimConstants.Namespaces.KIM_NAMESPACE_2_0)
82  @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
83  public interface IdentityService {
84  
85      /**
86       * This method finds EntityDefault data based on a query criteria.  The criteria cannot be null.
87       *
88       * @param query the criteria.  Cannot be null.
89       * @return query results.  will never return null.
90       * @throws IllegalArgumentException if the queryByCriteria is null
91       */
92      @WebMethod(operationName = "findEntityDefaults")
93      @WebResult(name = "results")
94  	EntityDefaultQueryResults findEntityDefaults(@WebParam(name = "query") QueryByCriteria query)  throws RiceIllegalArgumentException;
95  
96      /**
97       * This method finds Entities based on a query criteria.  The criteria cannot be null.
98       *
99       * @param query the criteria.  Cannot be null.
100      * @return query results.  will never return null.
101      * @throws IllegalArgumentException if the queryByCriteria is null
102      */
103     @WebMethod(operationName = "findEntities")
104     @WebResult(name = "results")
105 	EntityQueryResults findEntities(@WebParam(name = "query") QueryByCriteria query)  throws RiceIllegalArgumentException;
106 
107 	
108     /**
109      * Gets a {@link org.kuali.rice.kim.api.identity.entity.Entity} from an id.
110      *
111      * <p>
112      *   This method will return null if the Entity does not exist.
113      * </p>
114      *
115      * @param id the unique id to retrieve the entity by. cannot be null.
116      * @return a {@link org.kuali.rice.kim.api.identity.entity.Entity} or null
117      * @throws IllegalArgumentException if the id is blank
118      */
119     @WebMethod(operationName = "getEntity")
120     @WebResult(name = "entity")
121     @Cacheable(value= Entity.Cache.NAME, key="'id=' + #p0")
122 	Entity getEntity( @WebParam(name="id") String id )  throws RiceIllegalArgumentException;
123 
124 	/**
125      * Gets a {@link org.kuali.rice.kim.api.identity.entity.Entity} from a principalId.
126      *
127      * <p>
128      *   This method will return null if the Entity does not exist.
129      * </p>
130      *
131      * @param principalId the unique id to retrieve the entity by. cannot be null.
132      * @return a {@link org.kuali.rice.kim.api.identity.entity.Entity} or null
133      * @throws IllegalArgumentException if the principalId is blank
134      */
135     @WebMethod(operationName = "getEntityByPrincipalId")
136     @WebResult(name = "entity")
137     @Cacheable(value= Entity.Cache.NAME, key="'principalId=' + #p0")
138 	Entity getEntityByPrincipalId(@WebParam(name = "principalId") String principalId)  throws RiceIllegalArgumentException;
139 
140 	/**
141      * Gets a {@link org.kuali.rice.kim.api.identity.entity.Entity} from a principalName.
142      *
143      * <p>
144      *   This method will return null if the Entity does not exist.
145      * </p>
146      *
147      * @param principalName the unique id to retrieve the entity by. cannot be null.
148      * @return a {@link org.kuali.rice.kim.api.identity.entity.Entity} or null
149      * @throws IllegalArgumentException if the id is blank
150      */
151     @WebMethod(operationName = "getEntityByPrincipalName")
152     @WebResult(name = "entity")
153     @Cacheable(value= Entity.Cache.NAME, key="'principalName=' + #p0")
154 	Entity getEntityByPrincipalName(@WebParam(name = "principalName") String principalName)  throws RiceIllegalArgumentException;
155 
156 
157     /**
158      * This will create a {@link org.kuali.rice.kim.api.identity.entity.Entity} exactly like the entity passed in.
159      *
160      * @param entity the entity to create
161      * @return the newly created Entity object.
162      * @throws IllegalArgumentException if the entity is null
163      * @throws IllegalStateException if the entity already exists in the system
164      */
165     @WebMethod(operationName="createEntity")
166     @WebResult(name = "entity")
167     @CacheEvict(value={Entity.Cache.NAME, EntityDefault.Cache.NAME}, allEntries = true)
168     Entity createEntity(@WebParam(name = "entity") Entity entity)
169         throws RiceIllegalArgumentException, RiceIllegalStateException;
170 
171     /**
172      * This will update a {@link org.kuali.rice.kim.api.identity.entity.Entity}.
173      *
174      * @param entity the entity to update
175      * @return the updated Entity object.
176      * @throws IllegalArgumentException if the entity is null
177      * @throws IllegalStateException if the entity does not already exist in the system
178      */
179     @WebMethod(operationName="updateEntity")
180     @WebResult(name = "entity")
181     @CacheEvict(value={Entity.Cache.NAME, EntityDefault.Cache.NAME}, allEntries = true)
182     Entity updateEntity(@WebParam(name = "entity") Entity entity)
183         throws RiceIllegalArgumentException, RiceIllegalStateException;
184 
185     /**
186      * This will inactivate a {@link org.kuali.rice.kim.api.identity.entity.Entity}.
187      *
188      * @param id the unique id of the entity to inactivate
189      * @return the inactivated Entity object.
190      * @throws IllegalArgumentException if the entity is null
191      * @throws IllegalStateException if the entity does not already exist in the system
192      */
193     @WebMethod(operationName="inactivateEntity")
194     @WebResult(name = "entity")
195     @CacheEvict(value={Entity.Cache.NAME, EntityDefault.Cache.NAME}, allEntries = true)
196     Entity inactivateEntity(@WebParam(name = "id") String id)
197         throws RiceIllegalArgumentException, RiceIllegalStateException;
198 
199     
200     
201     /**
202      * Gets a {@link org.kuali.rice.kim.api.identity.entity.EntityDefault} from an id.
203      * {@link org.kuali.rice.kim.api.identity.entity.EntityDefault} is a condensed version of {@link org.kuali.rice.kim.api.identity.entity.Entity} that contains
204      * default values of its subclasses
205      *
206      * <p>
207      *   This method will return null if the Entity does not exist.
208      * </p>
209      *
210      * @param id the unique id to retrieve the entity by. cannot be null.
211      * @return a {@link org.kuali.rice.kim.api.identity.entity.EntityDefault} or null
212      * @throws IllegalArgumentException if the id is blank
213      */
214     @WebMethod(operationName = "getEntityDefault")
215     @WebResult(name = "entityDefault")
216     @Cacheable(value= EntityDefault.Cache.NAME, key="'id=' + #p0")
217 	EntityDefault getEntityDefault(@WebParam(name = "id") String id)  throws RiceIllegalArgumentException;
218 
219 	/**
220      * Gets a {@link org.kuali.rice.kim.api.identity.entity.EntityDefault} from an principalId.
221      * {@link org.kuali.rice.kim.api.identity.entity.EntityDefault} is a condensed version of {@link org.kuali.rice.kim.api.identity.entity.Entity} that contains
222      * default values of its subclasses
223      *
224      * <p>
225      *   This method will return null if the Entity does not exist.
226      * </p>
227      *
228      * @param principalId the unique id to retrieve the entity by. cannot be null.
229      * @return a {@link org.kuali.rice.kim.api.identity.entity.EntityDefault} or null
230      * @throws IllegalArgumentException if the principalId is blank
231      */
232     @WebMethod(operationName = "getEntityDefaultByPrincipalId")
233     @WebResult(name = "entityDefault")
234     @Cacheable(value= EntityDefault.Cache.NAME, key="'principalId=' + #p0")
235 	EntityDefault getEntityDefaultByPrincipalId(@WebParam(name = "principalId") String principalId)  throws RiceIllegalArgumentException;
236 
237 	/**
238      * Gets a {@link org.kuali.rice.kim.api.identity.entity.EntityDefault} from an principalName.
239      * {@link org.kuali.rice.kim.api.identity.entity.EntityDefault} is a condensed version of {@link org.kuali.rice.kim.api.identity.entity.Entity} that contains
240      * default values of its subclasses
241      *
242      * <p>
243      *   This method will return null if the Entity does not exist.
244      * </p>
245      *
246      * @param principalName the unique id to retrieve the entity by. cannot be null.
247      * @return a {@link org.kuali.rice.kim.api.identity.entity.EntityDefault} or null
248      * @throws IllegalArgumentException if the principalId is blank
249      */
250     @WebMethod(operationName = "getEntityDefaultByPrincipalName")
251     @WebResult(name = "entityDefault")
252     @Cacheable(value= EntityDefault.Cache.NAME, key="'principalName=' + #p0")
253 	EntityDefault getEntityDefaultByPrincipalName(@WebParam(name = "principalName") String principalName)  throws RiceIllegalArgumentException;
254     
255     
256 
257     /**
258      * Gets a {@link org.kuali.rice.kim.api.identity.principal.Principal} from an principalId.
259      *
260      * <p>
261      *   This method will return null if the Principal does not exist.
262      * </p>
263      *
264      * @param principalId the unique id to retrieve the principal by. cannot be null.
265      * @return a {@link org.kuali.rice.kim.api.identity.principal.Principal} or null
266      * @throws IllegalArgumentException if the principalId is blank
267      */
268     @WebMethod(operationName = "getPrincipal")
269     @WebResult(name = "principal")
270     @Cacheable(value= Principal.Cache.NAME, key="'principalId=' + #p0")
271     Principal getPrincipal( @WebParam(name="principalId") String principalId )  throws RiceIllegalArgumentException;
272 
273     /**
274      * Gets a {@link org.kuali.rice.kim.api.identity.principal.Principal} from an principalName.
275      *
276      * <p>
277      *   This method will return null if the Principal does not exist.
278      * </p>
279      *
280      * @param principalName the unique id to retrieve the principal by. cannot be null.
281      * @return a {@link org.kuali.rice.kim.api.identity.principal.Principal} or null
282      * @throws IllegalArgumentException if the principalId is blank
283      */
284     @WebMethod(operationName = "getPrincipalByPrincipalName")
285     @WebResult(name = "principal")
286     @Cacheable(value= Principal.Cache.NAME, key="'principalName=' + #p0")
287     Principal getPrincipalByPrincipalName( @WebParam(name="principalName") String principalName )  throws RiceIllegalArgumentException;
288 
289     /**
290      * Gets a {@link org.kuali.rice.kim.api.identity.principal.Principal} from an principalName and password.
291      *
292      * <p>
293      *   This method will return null if the Principal does not exist or the password is incorrect.
294      * </p>
295      *
296      * @param principalName the unique id to retrieve the principal by. cannot be null.
297      * @param password the password for the principal
298      * @return a {@link org.kuali.rice.kim.api.identity.principal.Principal} or null
299      * @throws IllegalArgumentException if the principalName is blank
300      */
301     @WebMethod(operationName = "getPrincipalByPrincipalNameAndPassword")
302     @WebResult(name = "principal")
303     @Cacheable(value= Principal.Cache.NAME, key="'principalName=' + #p0 + '|' + 'password=' + #p1")
304     Principal getPrincipalByPrincipalNameAndPassword( @WebParam(name="principalName") String principalName,  @WebParam(name="password") String password )  throws RiceIllegalArgumentException;
305 
306     /**
307      * This will create a {@link org.kuali.rice.kim.api.identity.principal.Principal} exactly like the principal passed in.
308      *
309      * The principal object passed in must be populated with an entityId and a principalName
310      *
311      * @param principal the principal to create
312      * @return the newly created Principal object.
313      * @throws IllegalArgumentException if the principal is null
314      * @throws IllegalStateException if the principal already exists in the system or the principal object is not populated with entityId and principalName
315      */
316     @WebMethod(operationName="addPrincipalToEntity")
317     @WebResult(name = "principal")
318     @CacheEvict(value = {Principal.Cache.NAME, Entity.Cache.NAME, EntityDefault.Cache.NAME}, allEntries = true)
319     Principal addPrincipalToEntity(@WebParam(name = "principal") Principal principal)
320         throws RiceIllegalArgumentException, RiceIllegalStateException;
321 
322     /**
323      * This will update a {@link org.kuali.rice.kim.api.identity.principal.Principal} exactly like the principal passed in.
324      *
325      *
326      * @param principal the principal to update
327      * @return the updated Principal object.
328      * @throws IllegalArgumentException if the principal is null
329      * @throws IllegalStateException if the principal does not exist in the system.
330      */
331     @WebMethod(operationName="updatePrincipal")
332     @WebResult(name = "principal")
333     @CacheEvict(value = {Principal.Cache.NAME, Entity.Cache.NAME, EntityDefault.Cache.NAME}, allEntries = true)
334     Principal updatePrincipal(@WebParam(name = "principal") Principal principal)
335         throws RiceIllegalArgumentException, RiceIllegalStateException;
336 
337     /**
338      * This will inactivate a {@link org.kuali.rice.kim.api.identity.principal.Principal}.
339      *
340      *
341      * @param principalId the unique id of the principal to inactivate
342      * @return the inactivated Principal object.
343      * @throws IllegalArgumentException if the principal is null
344      * @throws IllegalStateException if the principal does not exist in the system.
345      */
346     @WebMethod(operationName="inactivatePrincipal")
347     @WebResult(name = "principal")
348     @CacheEvict(value = {Principal.Cache.NAME, Entity.Cache.NAME, EntityDefault.Cache.NAME}, allEntries = true)
349     Principal inactivatePrincipal(@WebParam(name = "principalId") String principalId)
350         throws RiceIllegalArgumentException, RiceIllegalStateException;
351 
352     /**
353      * This will inactivate a {@link org.kuali.rice.kim.api.identity.principal.Principal}.
354      *
355      *
356      * @param principalName the unique principalName of the principal to inactivate
357      * @return the inactivated Principal object.
358      * @throws IllegalArgumentException if the principal is null
359      * @throws IllegalStateException if the principal does not exist in the system.
360      */
361     @WebMethod(operationName="inactivatePrincipalByName")
362     @WebResult(name = "principal")
363     @CacheEvict(value = {Principal.Cache.NAME, Entity.Cache.NAME, EntityDefault.Cache.NAME}, allEntries = true)
364     Principal inactivatePrincipalByName(@WebParam(name = "principalName") String principalName)
365         throws RiceIllegalArgumentException, RiceIllegalStateException;
366 
367 
368     /**
369      * This will create a {@link org.kuali.rice.kim.api.identity.type.EntityTypeContactInfo} exactly like the entityTypeContactInfo passed in.
370      *
371      * The EntityTypeContactInfo object passed in must be populated with an entityId and a entityTypeCode
372      *
373      * @param entityTypeContactInfo the EntityTypeContactInfo to create
374      * @return the newly created EntityTypeContactInfo object.
375      * @throws IllegalArgumentException if the entityTypeContactInfo is null
376      * @throws IllegalStateException if the entityTypeContactInfo already exists in the system or the EntityTypeContactInfo object is not populated with entityId and entityTypeCode
377      */
378     @WebMethod(operationName="addEntityTypeContactInfoToEntity")
379     @WebResult(name = "entityTypeContactInfo")
380     @CacheEvict(value={Entity.Cache.NAME, EntityDefault.Cache.NAME}, allEntries = true)
381     EntityTypeContactInfo addEntityTypeContactInfoToEntity(
382             @WebParam(name = "entityTypeContactInfo") EntityTypeContactInfo entityTypeContactInfo)
383         throws RiceIllegalArgumentException, RiceIllegalStateException;
384 
385     /**
386      * This will update a {@link org.kuali.rice.kim.api.identity.type.EntityTypeContactInfo} exactly like the entityTypeContactInfo passed in.
387      *
388      *
389      * @param entityTypeContactInfo the EntityTypeContactInfo to update
390      * @return the updated EntityTypeContactInfo object.
391      * @throws IllegalArgumentException if the entityTypeContactInfo is null
392      * @throws IllegalStateException if the entityTypeContactInfo does not exist in the system.
393      */
394     @WebMethod(operationName="updateEntityTypeContactInfo")
395     @WebResult(name = "entityTypeContactInfo")
396     @CacheEvict(value={Entity.Cache.NAME, EntityDefault.Cache.NAME}, allEntries = true)
397     EntityTypeContactInfo updateEntityTypeContactInfo(@WebParam(name = "entityTypeContactInfo") EntityTypeContactInfo entityTypeContactInfo)
398         throws RiceIllegalArgumentException, RiceIllegalStateException;
399 
400     /**
401      * This will inactivate a {@link org.kuali.rice.kim.api.identity.type.EntityTypeContactInfo} with the passed in parameters.
402      *
403      *
404      * @param entityId the entityId of the EntityTypeContactInfo to inactivate
405      * @param entityTypeCode the entityTypeCode of the EntityTypeContactInfo to inactivate
406      * @return the inactivated EntityTypeContactInfo object.
407      * @throws IllegalArgumentException if the entityId or entityTypeCode passed in is null
408      * @throws IllegalStateException if the EntityTypeContactInfo does not exist in the system.
409      */
410     @WebMethod(operationName="inactivateEntityTypeContactInfo")
411     @WebResult(name = "entityTypeContactInfo")
412     @CacheEvict(value={Entity.Cache.NAME, EntityDefault.Cache.NAME}, allEntries = true)
413     EntityTypeContactInfo inactivateEntityTypeContactInfo(@WebParam(name = "entityId") String entityId,
414             @WebParam(name = "entityTypeCode") String entityTypeCode)
415         throws RiceIllegalArgumentException, RiceIllegalStateException;
416 
417     /**
418      * This will create a {@link org.kuali.rice.kim.api.identity.address.EntityAddress} exactly like the address passed in.
419      *
420      * The EntityAddress object passed in must be populated with an entityId and a entityTypeCode
421      *
422      * @param address the EntityAddress to create
423      * @return the newly created EntityAddress object.
424      * @throws IllegalArgumentException if the address is null
425      * @throws IllegalStateException if the address already exists in the system or address is not populated with entityId and entityTypeCode
426      */
427     @WebMethod(operationName="addAddressToEntity")
428     @WebResult(name = "address")
429     @CacheEvict(value={Entity.Cache.NAME, EntityDefault.Cache.NAME}, allEntries = true)
430     EntityAddress addAddressToEntity(@WebParam(name = "address") EntityAddress address)
431         throws RiceIllegalArgumentException, RiceIllegalStateException;
432 
433     /**
434      * This will update a {@link org.kuali.rice.kim.api.identity.address.EntityAddress} exactly like the address passed in.
435      *
436      *
437      * @param address the EntityAddress to update
438      * @return the updated EntityAddress object.
439      * @throws IllegalArgumentException if the address is null
440      * @throws IllegalStateException if the address does not exist in the system.
441      */
442     @WebMethod(operationName="updateAddress")
443     @WebResult(name = "address")
444     @CacheEvict(value={Entity.Cache.NAME, EntityDefault.Cache.NAME}, allEntries = true)
445     EntityAddress updateAddress(@WebParam(name = "address")EntityAddress address)
446         throws RiceIllegalArgumentException, RiceIllegalStateException;
447 
448     /**
449      * This will inactivate a {@link org.kuali.rice.kim.api.identity.address.EntityAddress} with the id passed in.
450      *
451      *
452      * @param id the unique id of the EntityAddress to inactivate
453      * @return the updated EntityAddress object.
454      * @throws IllegalArgumentException if the id is null
455      * @throws IllegalStateException if the address does not exist in the system.
456      */
457     @WebMethod(operationName="inactivateAddress")
458     @WebResult(name = "address")
459     @CacheEvict(value={Entity.Cache.NAME, EntityDefault.Cache.NAME}, allEntries = true)
460     EntityAddress inactivateAddress(@WebParam(name = "id") String id)
461         throws RiceIllegalArgumentException, RiceIllegalStateException;
462 
463     /**
464      * This will create a {@link org.kuali.rice.kim.api.identity.email.EntityEmail} exactly like the email passed in.
465      *
466      * The EntityEmail object passed in must be populated with an entityId and a entityTypeCode
467      *
468      * @param email the EntityEmail to create
469      * @return the newly created EntityEmail object.
470      * @throws IllegalArgumentException if the email is null
471      * @throws IllegalStateException if the email already exists in the system or email is not populated with entityId and entityTypeCode
472      */
473     @WebMethod(operationName="addEmailToEntity")
474     @WebResult(name = "email")
475     @CacheEvict(value={Entity.Cache.NAME, EntityDefault.Cache.NAME}, allEntries = true)
476     EntityEmail addEmailToEntity(@WebParam(name = "email") EntityEmail email)
477         throws RiceIllegalArgumentException, RiceIllegalStateException;
478 
479     /**
480      * This will update a {@link org.kuali.rice.kim.api.identity.email.EntityEmail} exactly like the email passed in.
481      *
482      *
483      * @param email the EntityEmail to update
484      * @return the updated EntityEmail object.
485      * @throws IllegalArgumentException if the email is null
486      * @throws IllegalStateException if the email does not exist in the system.
487      */
488     @WebMethod(operationName="updateEmail")
489     @WebResult(name = "email")
490     @CacheEvict(value={Entity.Cache.NAME, EntityDefault.Cache.NAME}, allEntries = true)
491     EntityEmail updateEmail(@WebParam(name = "email") EntityEmail email)
492         throws RiceIllegalArgumentException, RiceIllegalStateException;
493 
494     /**
495      * This will inactivate the {@link org.kuali.rice.kim.api.identity.email.EntityEmail} with the passed in id.
496      *
497      *
498      * @param id the unique id of the EntityEmail to inactivate
499      * @return the inactivated EntityEmail object.
500      * @throws IllegalArgumentException if the id is null
501      * @throws IllegalStateException if the email does not exist in the system.
502      */
503     @WebMethod(operationName="inactivateEmail")
504     @WebResult(name = "email")
505     @CacheEvict(value={Entity.Cache.NAME, EntityDefault.Cache.NAME}, allEntries = true)
506     EntityEmail inactivateEmail(@WebParam(name = "id") String id)
507         throws RiceIllegalArgumentException, RiceIllegalStateException;
508 
509     /**
510      * This will create a {@link org.kuali.rice.kim.api.identity.phone.EntityPhone} exactly like the phone passed in.
511      *
512      * The EntityPhone object passed in must be populated with an entityId and a entityTypeCode
513      *
514      * @param phone the EntityPhone to create
515      * @return the newly created EntityPhone object.
516      * @throws IllegalArgumentException if the phone is null
517      * @throws IllegalStateException if the phone already exists in the system or phone is not populated with entityId and entityTypeCode
518      */
519     @WebMethod(operationName="addPhoneToEntity")
520     @WebResult(name = "phone")
521     @CacheEvict(value={Entity.Cache.NAME, EntityDefault.Cache.NAME}, allEntries = true)
522     EntityPhone addPhoneToEntity(@WebParam(name = "phone") EntityPhone phone)
523         throws RiceIllegalArgumentException, RiceIllegalStateException;
524 
525     /**
526      * This will update a {@link org.kuali.rice.kim.api.identity.phone.EntityPhone} exactly like the phone passed in.
527      *
528      *
529      * @param phone the EntityPhone to update
530      * @return the updated EntityPhone object.
531      * @throws IllegalArgumentException if the phone is null
532      * @throws IllegalStateException if the phone does not exist in the system.
533      */
534     @WebMethod(operationName="updatePhone")
535     @WebResult(name = "phone")
536     @CacheEvict(value={Entity.Cache.NAME, EntityDefault.Cache.NAME}, allEntries = true)
537     EntityPhone updatePhone(@WebParam(name = "phone") EntityPhone phone)
538             throws RiceIllegalArgumentException, RiceIllegalStateException;
539 
540     /**
541      * This will inactivate the {@link org.kuali.rice.kim.api.identity.phone.EntityPhone} with the passed in id.
542      *
543      *
544      * @param id the unique id of the EntityPhone to inactivate
545      * @return the inactivated EntityPhone object.
546      * @throws IllegalArgumentException if the id is null
547      * @throws IllegalStateException if the phone does not exist in the system.
548      */
549     @WebMethod(operationName="inactivatePhone")
550     @WebResult(name = "phone")
551     @CacheEvict(value={Entity.Cache.NAME, EntityDefault.Cache.NAME}, allEntries = true)
552     EntityPhone inactivatePhone(@WebParam(name = "id") String id)
553         throws RiceIllegalArgumentException, RiceIllegalStateException;
554 
555 
556     /**
557      * This will create a {@link org.kuali.rice.kim.api.identity.external.EntityExternalIdentifier} exactly like the externalId passed in.
558      *
559      * The EntityExternalIdentifier object passed in must be populated with an entityId and a externalIdentifierTypeCode
560      *
561      * @param externalId the EntityExternalIdentifier to create
562      * @return the newly created EntityExternalIdentifier object.
563      * @throws IllegalArgumentException if the externalId is null
564      * @throws IllegalStateException if the externalId already exists in the system or externalId is not populated with entityId and externalIdentifierTypeCode
565      */
566     @WebMethod(operationName="addExternalIdentifierToEntity")
567     @WebResult(name = "externalId")
568     @CacheEvict(value={Entity.Cache.NAME, EntityDefault.Cache.NAME}, allEntries = true)
569     EntityExternalIdentifier addExternalIdentifierToEntity(@WebParam(name = "externalId") EntityExternalIdentifier externalId)
570         throws RiceIllegalArgumentException, RiceIllegalStateException;
571 
572     /**
573      * This will update a {@link org.kuali.rice.kim.api.identity.external.EntityExternalIdentifier} exactly like the externalId passed in.
574      *
575      *
576      * @param externalId the EntityExternalIdentifier to update
577      * @return the updated EntityExternalIdentifier object.
578      * @throws IllegalArgumentException if the externalId is null
579      * @throws IllegalStateException if the externalId does not exist in the system.
580      */
581     @WebMethod(operationName="updateExternalIdentifier")
582     @WebResult(name = "externalId")
583     @CacheEvict(value={Entity.Cache.NAME, EntityDefault.Cache.NAME}, allEntries = true)
584     EntityExternalIdentifier updateExternalIdentifier(@WebParam(name = "externalId") EntityExternalIdentifier externalId)
585         throws RiceIllegalArgumentException, RiceIllegalStateException;
586 
587     /**
588      * This will create a {@link org.kuali.rice.kim.api.identity.affiliation.EntityAffiliation} exactly like the affiliation passed in.
589      *
590      * The EntityAffiliation object passed in must be populated with an entityId and a affiliationType
591      *
592      * @param affiliation the EntityAffiliation to create
593      * @return the newly created EntityAffiliation object.
594      * @throws IllegalArgumentException if the affiliation is null
595      * @throws IllegalStateException if the affiliation already exists in the system or affiliation is not populated with entityId and affiliationType
596      */
597     @WebMethod(operationName="addAffiliationToEntity")
598     @WebResult(name = "affiliation")
599     @CacheEvict(value={Entity.Cache.NAME, EntityDefault.Cache.NAME}, allEntries = true)
600     EntityAffiliation addAffiliationToEntity(@WebParam(name = "affiliation") EntityAffiliation affiliation)
601         throws RiceIllegalArgumentException, RiceIllegalStateException;
602 
603     /**
604      * This will update a {@link org.kuali.rice.kim.api.identity.affiliation.EntityAffiliation} exactly like the affiliation passed in.
605      *
606      *
607      * @param affiliation the EntityAffiliation to update
608      * @return the updated EntityAffiliation object.
609      * @throws IllegalArgumentException if the affiliation is null
610      * @throws IllegalStateException if the affiliation does not exist in the system.
611      */
612     @WebMethod(operationName="updateAffiliation")
613     @WebResult(name = "affiliation")
614     @CacheEvict(value={Entity.Cache.NAME, EntityDefault.Cache.NAME}, allEntries = true)
615     EntityAffiliation updateAffiliation(@WebParam(name = "affiliation") EntityAffiliation affiliation)
616         throws RiceIllegalArgumentException, RiceIllegalStateException;
617 
618     /**
619      * This will inactivate a {@link org.kuali.rice.kim.api.identity.affiliation.EntityAffiliation} with the id passed in.
620      *
621      *
622      * @param id the unique id of the  EntityAffiliation to inactivate
623      * @return the updated EntityAffiliation object.
624      * @throws IllegalArgumentException if the affiliation is null
625      * @throws IllegalStateException if the affiliation does not exist in the system.
626      */
627     @WebMethod(operationName="inactivateAffiliation")
628     @WebResult(name = "affiliation")
629     @CacheEvict(value={Entity.Cache.NAME, EntityDefault.Cache.NAME}, allEntries = true)
630     EntityAffiliation inactivateAffiliation(@WebParam(name = "id") String id)
631         throws RiceIllegalArgumentException, RiceIllegalStateException;
632 
633     /**
634      * This will create a {@link org.kuali.rice.kim.api.identity.name.EntityName} exactly like the name passed in.
635      *
636      * The EntityName object passed in must be populated with an entityId and a nameType
637      *
638      * @param name the EntityName to create
639      * @return the newly created EntityName object.
640      * @throws IllegalArgumentException if the name is null
641      * @throws IllegalStateException if the name already exists in the system or name is not populated with entityId and nameType
642      */
643     @WebMethod(operationName="addNameToEntity")
644     @WebResult(name = "name")
645     @CacheEvict(value={Entity.Cache.NAME, EntityDefault.Cache.NAME}, allEntries = true)
646     EntityName addNameToEntity(@WebParam(name = "name") EntityName name)
647         throws RiceIllegalArgumentException, RiceIllegalStateException;
648 
649     /**
650      * This will update a {@link org.kuali.rice.kim.api.identity.name.EntityName} exactly like the name passed in.
651      *
652      *
653      * @param name the EntityName to update
654      * @return the updated EntityName object.
655      * @throws IllegalArgumentException if the name is null
656      * @throws IllegalStateException if the name does not exist in the system.
657      */
658     @WebMethod(operationName="updateName")
659     @WebResult(name = "name")
660     @CacheEvict(value={Entity.Cache.NAME, EntityDefault.Cache.NAME}, allEntries = true)
661     EntityName updateName(@WebParam(name = "name") EntityName name)
662         throws RiceIllegalArgumentException, RiceIllegalStateException;
663 
664     /**
665      * This will inactivate a {@link org.kuali.rice.kim.api.identity.name.EntityName} with the passed in id.
666      *
667      *
668      * @param id the unique id of the EntityName to inactivate
669      * @return the inactivated EntityName object.
670      * @throws IllegalArgumentException if the id is null
671      * @throws IllegalStateException if the name with the id does not exist in the system.
672      */
673     @WebMethod(operationName="inactivateName")
674     @WebResult(name = "name")
675     @CacheEvict(value={Entity.Cache.NAME, EntityDefault.Cache.NAME}, allEntries = true)
676     EntityName inactivateName(@WebParam(name = "id") String id)
677         throws RiceIllegalArgumentException, RiceIllegalStateException;
678 
679     /**
680      * This will create a {@link org.kuali.rice.kim.api.identity.employment.EntityEmployment} exactly like the employment passed in.
681      *
682      * The EntityEmployment object passed in must be populated with an entityId and a employmentType
683      *
684      * @param employment the EntityEmployment to create
685      * @return the newly created EntityName object.
686      * @throws IllegalArgumentException if the employment is null
687      * @throws IllegalStateException if the employment already exists in the system or employment is not populated with entityId and employmentType
688      */
689     @WebMethod(operationName="addEmploymentToEntity")
690     @WebResult(name = "employment")
691     @CacheEvict(value={Entity.Cache.NAME, EntityDefault.Cache.NAME}, allEntries = true)
692     EntityEmployment addEmploymentToEntity(@WebParam(name = "employment") EntityEmployment employment)
693         throws RiceIllegalArgumentException, RiceIllegalStateException;
694 
695     /**
696      * This will update a {@link org.kuali.rice.kim.api.identity.employment.EntityEmployment} exactly like the employment passed in.
697      *
698      *
699      * @param employment the EntityEmployment to update
700      * @return the updated EntityEmployment object.
701      * @throws IllegalArgumentException if the employment is null
702      * @throws IllegalStateException if the employment does not exist in the system.
703      */
704     @WebMethod(operationName="updateEmployment")
705     @WebResult(name = "employment")
706     @CacheEvict(value={Entity.Cache.NAME, EntityDefault.Cache.NAME}, allEntries = true)
707     EntityEmployment updateEmployment(@WebParam(name = "employment") EntityEmployment employment)
708         throws RiceIllegalArgumentException, RiceIllegalStateException;
709 
710     /**
711      * This will inactivate a {@link org.kuali.rice.kim.api.identity.employment.EntityEmployment} with the passed in id.
712      *
713      *
714      * @param id the unique id of the EntityEmployment to inactivate
715      * @return the inactivated EntityEmployment object.
716      * @throws IllegalArgumentException if the id is null
717      * @throws IllegalStateException if the employment with the id does not exist in the system.
718      */
719     @WebMethod(operationName="inactivateEmployment")
720     @WebResult(name = "employment")
721     @CacheEvict(value={Entity.Cache.NAME, EntityDefault.Cache.NAME}, allEntries = true)
722     EntityEmployment inactivateEmployment(@WebParam(name = "id") String id)
723         throws RiceIllegalArgumentException, RiceIllegalStateException;
724 
725     /**
726      * This will create a {@link org.kuali.rice.kim.api.identity.personal.EntityBioDemographics} exactly like the bioDemographics passed in.
727      *
728      * The EntityBioDemographics object passed in must be populated with an entityId
729      *
730      * @param bioDemographics the EntityBioDemographics to create
731      * @return the newly created EntityBioDemographics object.
732      * @throws IllegalArgumentException if the bioDemographics is null
733      * @throws IllegalStateException if the bioDemographics already exists in the system or bioDemographics is not populated with entityId
734      */
735     @WebMethod(operationName="addBioDemographicsToEntity")
736     @WebResult(name = "bioDemographics")
737     @CacheEvict(value={Entity.Cache.NAME, EntityDefault.Cache.NAME}, allEntries = true)
738     EntityBioDemographics addBioDemographicsToEntity(@WebParam(name = "bioDemographics") EntityBioDemographics bioDemographics)
739         throws RiceIllegalArgumentException, RiceIllegalStateException;
740 
741     /**
742      * This will update a {@link org.kuali.rice.kim.api.identity.personal.EntityBioDemographics} exactly like the bioDemographics passed in.
743      *
744      *
745      * @param bioDemographics the EntityBioDemographics to update
746      * @return the updated EntityBioDemographics object.
747      * @throws IllegalArgumentException if the bioDemographics is null
748      * @throws IllegalStateException if the bioDemographics does not exist in the system.
749      */
750     @WebMethod(operationName="updateBioDemographics")
751     @WebResult(name = "bioDemographics")
752     @CacheEvict(value={Entity.Cache.NAME, EntityDefault.Cache.NAME}, allEntries = true)
753     EntityBioDemographics updateBioDemographics(@WebParam(name = "bioDemographics") EntityBioDemographics bioDemographics)
754         throws RiceIllegalArgumentException, RiceIllegalStateException;
755     
756     /**
757      * Gets a {@link org.kuali.rice.kim.api.identity.privacy.EntityPrivacyPreferences} for a given id.
758      *
759      * <p>
760      *   This method will return null if the EntityPrivacyPreferences does not exist.
761      * </p>
762      *
763      * @param id the unique id to retrieve the EntityPrivacyPreferences by. Cannot be null.
764      * @return a {@link org.kuali.rice.kim.api.identity.privacy.EntityPrivacyPreferences} or null
765      * @throws IllegalArgumentException if the entityId is blank
766      */
767     @WebMethod(operationName = "getEntityPrivacyPreferences")
768     @WebResult(name = "privacyPreferences")
769     @Cacheable(value= EntityPrivacyPreferences.Cache.NAME, key="'id=' + #p0")
770 	EntityPrivacyPreferences getEntityPrivacyPreferences( @WebParam(name="id") String id )  throws RiceIllegalArgumentException;
771 
772     /**
773      * This will create a {@link org.kuali.rice.kim.api.identity.privacy.EntityPrivacyPreferences} exactly like the privacyPreferences passed in.
774      *
775      * The EntityPrivacyPreferences object passed in must be populated with an entityId
776      *
777      * @param privacyPreferences the EntityPrivacyPreferences to create
778      * @return the newly created EntityPrivacyPreferences object.
779      * @throws IllegalArgumentException if the privacyPreferences is null
780      * @throws IllegalStateException if the privacyPreferences already exists in the system or privacyPreferences is not populated with entityId
781      */
782     @WebMethod(operationName="addPrivacyPreferencesToEntity")
783     @WebResult(name = "privacyPreferences")
784     @CacheEvict(value={Entity.Cache.NAME, EntityDefault.Cache.NAME, EntityPrivacyPreferences.Cache.NAME}, allEntries = true)
785     EntityPrivacyPreferences addPrivacyPreferencesToEntity(@WebParam(name = "privacyPreferences") EntityPrivacyPreferences privacyPreferences)
786         throws RiceIllegalArgumentException, RiceIllegalStateException;
787 
788     /**
789      * This will update a {@link org.kuali.rice.kim.api.identity.privacy.EntityPrivacyPreferences} exactly like the privacyPreferences passed in.
790      *
791      *
792      * @param privacyPreferences the EntityPrivacyPreferences to update
793      * @return the updated EntityPrivacyPreferences object.
794      * @throws IllegalArgumentException if the privacyPreferences is null
795      * @throws IllegalStateException if the privacyPreferences does not exist in the system.
796      */
797     @WebMethod(operationName="updatePrivacyPreferences")
798     @WebResult(name = "privacyPreferences")
799     @CacheEvict(value={Entity.Cache.NAME, EntityDefault.Cache.NAME, EntityPrivacyPreferences.Cache.NAME}, allEntries = true)
800     EntityPrivacyPreferences updatePrivacyPreferences(@WebParam(name = "privacyPreferences") EntityPrivacyPreferences privacyPreferences)
801         throws RiceIllegalArgumentException, RiceIllegalStateException;
802 
803 
804     /**
805      * This will create a {@link org.kuali.rice.kim.api.identity.citizenship.EntityCitizenship} exactly like the citizenship passed in.
806      *
807      * The EntityCitizenship object passed in must be populated with an entityId and a status
808      *
809      * @param citizenship the EntityCitizenship to create
810      * @return the newly created EntityCitizenship object.
811      * @throws IllegalArgumentException if the citizenship is null
812      * @throws IllegalStateException if the citizenship already exists in the system or citizenship is not populated with entityId and status
813      */
814     @WebMethod(operationName="addCitizenshipToEntity")
815     @WebResult(name = "citizenship")
816     @CacheEvict(value={Entity.Cache.NAME, EntityDefault.Cache.NAME}, allEntries = true)
817     EntityCitizenship addCitizenshipToEntity(@WebParam(name = "citizenship") EntityCitizenship citizenship)
818         throws RiceIllegalArgumentException, RiceIllegalStateException;
819 
820     /**
821      * This will update a {@link org.kuali.rice.kim.api.identity.citizenship.EntityCitizenship} exactly like the citizenship passed in.
822      *
823      *
824      * @param citizenship the EntityCitizenship to update
825      * @return the updated EntityCitizenship object.
826      * @throws IllegalArgumentException if the citizenship is null
827      * @throws IllegalStateException if the citizenship does not exist in the system.
828      */
829     @WebMethod(operationName="updateCitizenship")
830     @WebResult(name = "citizenship")
831     @CacheEvict(value={Entity.Cache.NAME, EntityDefault.Cache.NAME}, allEntries = true)
832     EntityCitizenship updateCitizenship(@WebParam(name = "citizenship") EntityCitizenship citizenship)
833         throws RiceIllegalArgumentException, RiceIllegalStateException;
834 
835     /**
836      * This will inactivate a {@link org.kuali.rice.kim.api.identity.citizenship.EntityCitizenship} with the unique id passed in.
837      *
838      *
839      * @param id the id of the EntityCitizenship to inactivate
840      * @return the inactivated EntityCitizenship object.
841      * @throws IllegalArgumentException if the citizenship is null
842      * @throws IllegalStateException if the citizenship does not exist in the system.
843      */
844     @WebMethod(operationName="inactivateCitizenship")
845     @WebResult(name = "citizenship")
846     @CacheEvict(value={Entity.Cache.NAME, EntityDefault.Cache.NAME}, allEntries = true)
847     EntityCitizenship inactivateCitizenship(@WebParam(name = "id") String id)
848         throws RiceIllegalArgumentException, RiceIllegalStateException;
849 
850     /**
851      * This will create a {@link EntityEthnicity} exactly like the ethnicity passed in.
852      *
853      * The EntityEthnicity object passed in must be populated with an entityId and a ethnicity code
854      *
855      * @param ethnicity the EntityEthnicity to create
856      * @return the newly created EntityEthnicity object.
857      * @throws IllegalArgumentException if the ethnicity is null
858      * @throws IllegalStateException if the ethnicity already exists in the system or ethnicity is not populated with entityId and ethnicity code
859      */
860     @WebMethod(operationName="addEthnicityToEntity")
861     @WebResult(name = "ethnicity")
862     @CacheEvict(value={Entity.Cache.NAME, EntityDefault.Cache.NAME}, allEntries = true)
863     EntityEthnicity addEthnicityToEntity(@WebParam(name = "ethnicity") EntityEthnicity ethnicity)
864         throws RiceIllegalArgumentException, RiceIllegalStateException;
865 
866     /**
867      * This will update a {@link EntityEthnicity} exactly like the ethnicity passed in.
868      *
869      *
870      * @param ethnicity the EntityEthnicity to update
871      * @return the updated EntityEthnicity object.
872      * @throws IllegalArgumentException if the ethnicity is null
873      * @throws IllegalStateException if the ethnicity does not exist in the system.
874      */
875     @WebMethod(operationName="updateEthnicity")
876     @WebResult(name = "ethnicity")
877     @CacheEvict(value={Entity.Cache.NAME, EntityDefault.Cache.NAME}, allEntries = true)
878     EntityEthnicity updateEthnicity(@WebParam(name = "ethnicity") EntityEthnicity ethnicity)
879         throws RiceIllegalArgumentException, RiceIllegalStateException;
880 
881     /**
882      * This will create a {@link org.kuali.rice.kim.api.identity.residency.EntityResidency} exactly like the residency passed in.
883      *
884      * The EntityResidency object passed in must be populated with an entityId
885      *
886      * @param residency the EntityResidency to create
887      * @return the newly created EntityResidency object.
888      * @throws IllegalArgumentException if the residency is null
889      * @throws IllegalStateException if the residency already exists in the system or residency is not populated with entityId
890      */
891     @WebMethod(operationName="addResidencyToEntity")
892     @WebResult(name = "residency")
893     @CacheEvict(value={Entity.Cache.NAME, EntityDefault.Cache.NAME}, allEntries = true)
894     EntityResidency addResidencyToEntity(@WebParam(name = "residency") EntityResidency residency)
895         throws RiceIllegalArgumentException, RiceIllegalStateException;
896 
897     /**
898      * This will update a {@link org.kuali.rice.kim.api.identity.residency.EntityResidency} exactly like the residency passed in.
899      *
900      *
901      * @param residency the EntityResidency to update
902      * @return the updated EntityResidency object.
903      * @throws IllegalArgumentException if the residency is null
904      * @throws IllegalStateException if the residency does not exist in the system.
905      */
906     @WebMethod(operationName="updateResidency")
907     @WebResult(name = "residency")
908     @CacheEvict(value={Entity.Cache.NAME, EntityDefault.Cache.NAME}, allEntries = true)
909     EntityResidency updateResidency(@WebParam(name = "residency") EntityResidency residency)
910         throws RiceIllegalArgumentException, RiceIllegalStateException;
911 
912 
913     /**
914      * This will create a {@link org.kuali.rice.kim.api.identity.visa.EntityVisa} exactly like the visa passed in.
915      *
916      * The EntityVisa object passed in must be populated with an entityId and a visaTypeKey
917      *
918      * @param visa the EntityVisa to create
919      * @return the newly created EntityVisa object.
920      * @throws IllegalArgumentException if the visa is null
921      * @throws IllegalStateException if the visa already exists in the system or visa is not populated with entityId and a visaTypeKey
922      */
923     @WebMethod(operationName="addVisaToEntity")
924     @WebResult(name = "visa")
925     @CacheEvict(value={Entity.Cache.NAME, EntityDefault.Cache.NAME}, allEntries = true)
926     EntityVisa addVisaToEntity(@WebParam(name = "visa") EntityVisa visa)
927         throws RiceIllegalArgumentException, RiceIllegalStateException;
928 
929     /**
930      * This will update a {@link org.kuali.rice.kim.api.identity.visa.EntityVisa} exactly like the visa passed in.
931      *
932      *
933      * @param visa the EntityVisa to update
934      * @return the updated EntityVisa object.
935      * @throws IllegalArgumentException if the visa is null
936      * @throws IllegalStateException if the visa does not exist in the system.
937      */
938     @WebMethod(operationName="updateVisa")
939     @WebResult(name = "visa")
940     @CacheEvict(value={Entity.Cache.NAME, EntityDefault.Cache.NAME}, allEntries = true)
941     EntityVisa updateVisa(@WebParam(name = "visa") EntityVisa visa)
942         throws RiceIllegalArgumentException, RiceIllegalStateException;
943 
944     /**
945      * Gets the {@link org.kuali.rice.kim.api.identity.CodedAttribute} for a given EntityType code.
946      *
947      * <p>
948      *   This method will return null if the code does not exist.
949      * </p>
950      *
951      * @param code the unique id to retrieve the Type by. Cannot be null.
952      * @return a {@link org.kuali.rice.kim.api.identity.CodedAttribute} or null
953      * @throws IllegalArgumentException if the code is blank
954      */
955     @WebMethod(operationName = "getEntityType")
956     @WebResult(name = "type")
957     @Cacheable(value= CodedAttribute.Cache.NAME + "{EntityType}", key="'code=' + #p0")
958 	CodedAttribute getEntityType( @WebParam(name="code") String code ) throws RiceIllegalArgumentException;
959 
960 
961     /**
962      * Gets the {@link org.kuali.rice.kim.api.identity.CodedAttribute} for a given EntityAddressType code.
963      *
964      * <p>
965      *   This method will return null if the code does not exist.
966      * </p>
967      *
968      * @param code the unique id to retrieve the Type by. Cannot be null.
969      * @return a {@link org.kuali.rice.kim.api.identity.CodedAttribute} or null
970      * @throws IllegalArgumentException if the code is blank
971      */
972     @WebMethod(operationName = "getAddressType")
973     @WebResult(name = "type")
974     @Cacheable(value= CodedAttribute.Cache.NAME + "{AddressType}", key="'code=' + #p0")
975 	CodedAttribute getAddressType( @WebParam(name="code") String code ) throws RiceIllegalArgumentException;
976 
977     /**
978      * Gets the {@link org.kuali.rice.kim.api.identity.affiliation.EntityAffiliationType} for a given EntityAffiliationType code.
979      *
980      * <p>
981      *   This method will return null if the code does not exist.
982      * </p>
983      *
984      * @param code the unique id to retrieve the EntityAffiliationType by. Cannot be null.
985      * @return a {@link org.kuali.rice.kim.api.identity.affiliation.EntityAffiliationType} or null
986      * @throws IllegalArgumentException if the code is blank
987      */
988     @WebMethod(operationName = "getAffiliationType")
989     @WebResult(name = "affiliationType")
990     @Cacheable(value= CodedAttribute.Cache.NAME + "{AffiliationType}", key="'code=' + #p0")
991 	EntityAffiliationType getAffiliationType( @WebParam(name="code") String code )  throws RiceIllegalArgumentException;
992 
993     /**
994      * Gets the {@link org.kuali.rice.kim.api.identity.CodedAttribute} for a given EntityCitizenship status code.
995      *
996      * <p>
997      *   This method will return null if the code does not exist.
998      * </p>
999      *
1000      * @param code the unique id to retrieve the Type by. Cannot be null.
1001      * @return a {@link org.kuali.rice.kim.api.identity.CodedAttribute} or null
1002      * @throws IllegalArgumentException if the code is blank
1003      */
1004     @WebMethod(operationName = "getCitizenshipStatus")
1005     @WebResult(name = "type")
1006     @Cacheable(value= CodedAttribute.Cache.NAME + "{CitizenshipStatus}", key="'code=' + #p0")
1007 	CodedAttribute getCitizenshipStatus( @WebParam(name="code") String code ) throws RiceIllegalArgumentException;
1008 
1009     /**
1010      * Gets the {@link org.kuali.rice.kim.api.identity.CodedAttribute} for a given EntityEmployment type code.
1011      *
1012      * <p>
1013      *   This method will return null if the code does not exist.
1014      * </p>
1015      *
1016      * @param code the unique id to retrieve the Type by. Cannot be null.
1017      * @return a {@link org.kuali.rice.kim.api.identity.CodedAttribute} or null
1018      * @throws IllegalArgumentException if the code is blank
1019      */
1020     @WebMethod(operationName = "getEmploymentType")
1021     @WebResult(name = "type")
1022     @Cacheable(value= CodedAttribute.Cache.NAME + "{EmploymentType}", key="'code=' + #p0")
1023 	CodedAttribute getEmploymentType( @WebParam(name="code") String code ) throws RiceIllegalArgumentException;
1024     
1025     /**
1026      * Gets the {@link org.kuali.rice.kim.api.identity.CodedAttribute} for a given EntityEmployment status code.
1027      *
1028      * <p>
1029      *   This method will return null if the code does not exist.
1030      * </p>
1031      *
1032      * @param code the unique id to retrieve the Type by. Cannot be null.
1033      * @return a {@link org.kuali.rice.kim.api.identity.CodedAttribute} or null
1034      * @throws IllegalArgumentException if the code is blank
1035      */
1036     @WebMethod(operationName = "getEmploymentStatus")
1037     @WebResult(name = "type")
1038     @Cacheable(value= CodedAttribute.Cache.NAME + "{EmploymentStatus}", key="'code=' + #p0")
1039 	CodedAttribute getEmploymentStatus( @WebParam(name="code") String code ) throws RiceIllegalArgumentException;
1040     
1041     /**
1042      * Gets the {@link org.kuali.rice.kim.api.identity.external.EntityExternalIdentifierType} for a given type code.
1043      *
1044      * <p>
1045      *   This method will return null if the code does not exist.
1046      * </p>
1047      *
1048      * @param code the unique id to retrieve the EntityExternalIdentifierType by. Cannot be null.
1049      * @return a {@link org.kuali.rice.kim.api.identity.CodedAttribute} or null
1050      * @throws IllegalArgumentException if the code is blank
1051      */
1052     @WebMethod(operationName = "getExternalIdentifierType")
1053     @WebResult(name = "type")
1054     @Cacheable(value= CodedAttribute.Cache.NAME + "{ExternalIdentifierType}", key="'code=' + #p0")
1055 	EntityExternalIdentifierType getExternalIdentifierType( @WebParam(name="code") String code )  throws RiceIllegalArgumentException;
1056     
1057     /**
1058      * Gets the {@link org.kuali.rice.kim.api.identity.CodedAttribute} for a given EntityName type code.
1059      *
1060      * <p>
1061      *   This method will return null if the code does not exist.
1062      * </p>
1063      *
1064      * @param code the unique id to retrieve the Type by. Cannot be null.
1065      * @return a {@link org.kuali.rice.kim.api.identity.CodedAttribute} or null
1066      * @throws IllegalArgumentException if the code is blank
1067      */
1068     @WebMethod(operationName = "getNameType")
1069     @WebResult(name = "type")
1070     @Cacheable(value= CodedAttribute.Cache.NAME + "{NameType}", key="'code=' + #p0")
1071 	CodedAttribute getNameType(@WebParam(name = "code") String code) throws RiceIllegalArgumentException;
1072     
1073     /**
1074      * Gets the {@link org.kuali.rice.kim.api.identity.CodedAttribute} for a given EntityPhone type code.
1075      *
1076      * <p>
1077      *   This method will return null if the code does not exist.
1078      * </p>
1079      *
1080      * @param code the unique id to retrieve the Type by. Cannot be null.
1081      * @return a {@link org.kuali.rice.kim.api.identity.CodedAttribute} or null
1082      * @throws IllegalArgumentException if the code is blank
1083      */
1084     @WebMethod(operationName = "getPhoneType")
1085     @WebResult(name = "type")
1086     @Cacheable(value= CodedAttribute.Cache.NAME + "{PhoneType}", key="'code=' + #p0")
1087 	CodedAttribute getPhoneType( @WebParam(name="code") String code ) throws RiceIllegalArgumentException;
1088     
1089     /**
1090      * Gets the {@link org.kuali.rice.kim.api.identity.CodedAttribute} for a given EntityEmail type code.
1091      *
1092      * <p>
1093      *   This method will return null if the code does not exist.
1094      * </p>
1095      *
1096      * @param code the unique id to retrieve the Type by. Cannot be null.
1097      * @return a {@link org.kuali.rice.kim.api.identity.CodedAttribute} or null
1098      * @throws IllegalArgumentException if the code is blank
1099      */
1100     @WebMethod(operationName = "getEmailType")
1101     @WebResult(name = "type")
1102     @Cacheable(value= CodedAttribute.Cache.NAME + "{EmailType}", key="'code=' + #p0")
1103 	CodedAttribute getEmailType( @WebParam(name="code") String code ) throws RiceIllegalArgumentException;
1104 
1105 }