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