| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| IdentityArchiveService |
|
| 1.0;1 |
| 1 | /** | |
| 2 | * Copyright 2005-2011 The Kuali Foundation | |
| 3 | * | |
| 4 | * Licensed under the Educational Community License, Version 2.0 (the "License"); | |
| 5 | * you may not use this file except in compliance with the License. | |
| 6 | * You may obtain a copy of the License at | |
| 7 | * | |
| 8 | * http://www.opensource.org/licenses/ecl2.php | |
| 9 | * | |
| 10 | * Unless required by applicable law or agreed to in writing, software | |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 13 | * See the License for the specific language governing permissions and | |
| 14 | * limitations under the License. | |
| 15 | */ | |
| 16 | package org.kuali.rice.kim.impl.identity; | |
| 17 | ||
| 18 | import org.kuali.rice.kim.api.identity.entity.EntityDefault; | |
| 19 | ||
| 20 | /** | |
| 21 | * | |
| 22 | * This service archives EntityDefault. It's purpose is to provide long term | |
| 23 | * storage for basic identity data that may be removed from the IdentityService implementation's | |
| 24 | * backing store. | |
| 25 | * | |
| 26 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
| 27 | * | |
| 28 | */ | |
| 29 | public interface IdentityArchiveService { | |
| 30 | ||
| 31 | /** | |
| 32 | * Gets a {@link org.kuali.rice.kim.api.identity.entity.EntityDefault} with an id from the archive. | |
| 33 | * {@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 | |
| 34 | * default values of its subclasses | |
| 35 | * | |
| 36 | * <p> | |
| 37 | * This method will return null if the Entity does not exist. | |
| 38 | * </p> | |
| 39 | * | |
| 40 | * @param id the unique id to retrieve the entity by. cannot be null. | |
| 41 | * @return a {@link org.kuali.rice.kim.api.identity.entity.EntityDefault} or null | |
| 42 | * @throws IllegalArgumentException if the id is blank | |
| 43 | */ | |
| 44 | EntityDefault getEntityDefaultFromArchive(String id ) throws IllegalArgumentException; | |
| 45 | ||
| 46 | /** | |
| 47 | * Gets a {@link org.kuali.rice.kim.api.identity.entity.EntityDefault} with an principalId from the archive. | |
| 48 | * {@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 | |
| 49 | * default values of its subclasses | |
| 50 | * | |
| 51 | * <p> | |
| 52 | * This method will return null if the Entity does not exist. | |
| 53 | * </p> | |
| 54 | * | |
| 55 | * @param principalId the unique principalId to retrieve the entity by. cannot be null. | |
| 56 | * @return a {@link org.kuali.rice.kim.api.identity.entity.EntityDefault} or null | |
| 57 | * @throws IllegalArgumentException if the principalId is blank | |
| 58 | */ | |
| 59 | EntityDefault getEntityDefaultFromArchiveByPrincipalId(String principalId) throws IllegalArgumentException; | |
| 60 | ||
| 61 | /** | |
| 62 | * Gets a {@link org.kuali.rice.kim.api.identity.entity.EntityDefault} with an principalName from the archive. | |
| 63 | * {@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 | |
| 64 | * default values of its subclasses | |
| 65 | * | |
| 66 | * <p> | |
| 67 | * This method will return null if the Entity does not exist. | |
| 68 | * </p> | |
| 69 | * | |
| 70 | * @param principalName the unique principalName to retrieve the entity by. cannot be null. | |
| 71 | * @return a {@link org.kuali.rice.kim.api.identity.entity.EntityDefault} or null | |
| 72 | * @throws IllegalArgumentException if the principalName is blank | |
| 73 | */ | |
| 74 | EntityDefault getEntityDefaultFromArchiveByPrincipalName(String principalName) throws IllegalArgumentException; | |
| 75 | ||
| 76 | /** | |
| 77 | * Saves a {@link org.kuali.rice.kim.api.identity.entity.EntityDefault} to the archive. | |
| 78 | * {@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 | |
| 79 | * default values of its subclasses | |
| 80 | * | |
| 81 | * <p> | |
| 82 | * This method will return the saved EntityDefault object | |
| 83 | * </p> | |
| 84 | * | |
| 85 | * @param entityDefault the unique principalName to retrieve the entity by. cannot be null. | |
| 86 | * @return a {@link org.kuali.rice.kim.api.identity.entity.EntityDefault} or null | |
| 87 | * @throws IllegalArgumentException if the entityDefault is null | |
| 88 | */ | |
| 89 | //TODO: this should probably return some kind of Future<EntityDefault> if we can find a way to remote that | |
| 90 | void saveEntityDefaultToArchive(EntityDefault entityDefault) throws IllegalArgumentException; | |
| 91 | ||
| 92 | } |