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