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