| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| KimEntity |
|
| 1.0;1 |
| 1 | /* | |
| 2 | * Copyright 2007-2008 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.bo.entity; | |
| 17 | ||
| 18 | import java.util.List; | |
| 19 | ||
| 20 | import org.kuali.rice.kim.api.entity.citizenship.EntityCitizenshipContract; | |
| 21 | import org.kuali.rice.kim.api.entity.personal.EntityBioDemographicsContract; | |
| 22 | import org.kuali.rice.kim.api.entity.principal.PrincipalContract; | |
| 23 | import org.kuali.rice.kim.api.entity.privacy.EntityPrivacyPreferencesContract; | |
| 24 | import org.kuali.rice.kim.api.entity.type.EntityTypeDataContract; | |
| 25 | import org.kuali.rice.kns.bo.Inactivateable; | |
| 26 | ||
| 27 | ||
| 28 | /** | |
| 29 | * Represents an Entity (person/vendor/system) within the Rice system. | |
| 30 | * | |
| 31 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
| 32 | * | |
| 33 | */ | |
| 34 | public interface KimEntity extends Inactivateable { | |
| 35 | ||
| 36 | /** | |
| 37 | * Gets this {@link KimEntity}'s entity id. | |
| 38 | * @return the id for this {@link KimEntity}, or null if none has been assigned. | |
| 39 | */ | |
| 40 | String getEntityId(); | |
| 41 | ||
| 42 | /** | |
| 43 | * Gets this {@link KimEntity}'s entity types | |
| 44 | * @return the List of {@link EntityTypeDataContract}S for this {@link KimEntity}. | |
| 45 | * The returned List will never be null, an empty List will be assigned and returned if needed. | |
| 46 | */ | |
| 47 | List<? extends EntityTypeDataContract> getEntityTypes(); | |
| 48 | ||
| 49 | /** | |
| 50 | * Gets this {@link KimEntity}'s principals | |
| 51 | * @return the List of {@link PrincipalContract}s for this {@link KimEntity}. | |
| 52 | * The returned List will never be null, an empty List will be assigned and returned if needed. | |
| 53 | */ | |
| 54 | List<? extends PrincipalContract> getPrincipals(); | |
| 55 | ||
| 56 | ||
| 57 | /** | |
| 58 | * Gets this {@link KimEntity}'s external identifiers | |
| 59 | * @return the List of {@link KimEntityExternalIdentifier}S for this {@link KimEntity}. | |
| 60 | * The returned List will never be null, an empty List will be assigned and returned if needed. | |
| 61 | */ | |
| 62 | List<? extends KimEntityExternalIdentifier> getExternalIdentifiers(); | |
| 63 | ||
| 64 | /** | |
| 65 | * Gets this {@link KimEntity}'s affiliations | |
| 66 | * @return the List of {@link KimEntityAffiliation}S for this {@link KimEntity}. | |
| 67 | * The returned List will never be null, an empty List will be assigned and returned if needed. | |
| 68 | */ | |
| 69 | List<? extends KimEntityAffiliation> getAffiliations(); | |
| 70 | ||
| 71 | /** | |
| 72 | * Gets this {@link KimEntity}'s names | |
| 73 | * @return the List of {@link KimEntityName}S for this {@link KimEntity}. | |
| 74 | * The returned List will never be null, an empty List will be assigned and returned if needed. | |
| 75 | */ | |
| 76 | List<? extends KimEntityName> getNames(); | |
| 77 | ||
| 78 | ||
| 79 | /** | |
| 80 | * Gets this {@link KimEntity}'s employment information List | |
| 81 | * @return the List of {@link KimEntityEmploymentInformation}S for this {@link KimEntity}. | |
| 82 | * The returned List will never be null, an empty List will be assigned and returned if needed. | |
| 83 | */ | |
| 84 | List<? extends KimEntityEmploymentInformation> getEmploymentInformation(); | |
| 85 | ||
| 86 | /** | |
| 87 | * Gets this {@link KimEntity}'s privacy preferences | |
| 88 | * @return the {@link org.kuali.rice.kim.api.entity.privacy.EntityPrivacyPreferences} for this {@link KimEntity}, | |
| 89 | * or null if none has been assigned. | |
| 90 | */ | |
| 91 | EntityPrivacyPreferencesContract getPrivacyPreferences(); | |
| 92 | ||
| 93 | /** | |
| 94 | * Gets this {@link KimEntity}'s demographic information | |
| 95 | * @return the {@link EntityBioDemographicsContract} for this {@link KimEntity}, | |
| 96 | * or null if none has been assigned. | |
| 97 | */ | |
| 98 | EntityBioDemographicsContract getBioDemographics(); | |
| 99 | ||
| 100 | /** | |
| 101 | * Gets this {@link KimEntity}'s citizenship information | |
| 102 | * @return the List of {@link EntityCitizenshipContract}s for this {@link KimEntity}. | |
| 103 | * The returned List will never be null, an empty List will be assigned and returned if needed. | |
| 104 | */ | |
| 105 | List<? extends EntityCitizenshipContract> getCitizenships(); | |
| 106 | ||
| 107 | /** | |
| 108 | * Gets this {@link KimEntity}'s entity type for the given type code | |
| 109 | * @param entityTypeCode the type code | |
| 110 | * @return the EntityEntityType object corresponding to the given code or null if this | |
| 111 | * entity does not have data for that type. | |
| 112 | */ | |
| 113 | EntityTypeDataContract getEntityType( String entityTypeCode ); | |
| 114 | ||
| 115 | /** | |
| 116 | * Gets this {@link KimEntity}'s employment information | |
| 117 | * @return the primary {@link KimEntityEmploymentInformation} for this {@link KimEntity}, | |
| 118 | * or null if none has been assigned. | |
| 119 | */ | |
| 120 | KimEntityEmploymentInformation getPrimaryEmployment(); | |
| 121 | ||
| 122 | /** | |
| 123 | * Gets this {@link KimEntity}'s default affiliation | |
| 124 | * @return the default {@link KimEntityAffiliation} for the entity. If no default is defined, then | |
| 125 | * it returns the first one found. If none are defined, it returns null. | |
| 126 | */ | |
| 127 | KimEntityAffiliation getDefaultAffiliation(); | |
| 128 | ||
| 129 | /** | |
| 130 | * Gets this {@link KimEntity}'s external identifier for the given type code | |
| 131 | * @param externalIdentifierTypeCode the type code | |
| 132 | * @return the {@link KimEntityExternalIdentifier} for this {@link KimEntity}, or null if none has been assigned. | |
| 133 | */ | |
| 134 | KimEntityExternalIdentifier getEntityExternalIdentifier( String externalIdentifierTypeCode ); | |
| 135 | ||
| 136 | /** | |
| 137 | * Gets this {@link KimEntity}'s default name | |
| 138 | * @return the default {@link KimEntityName} record for the entity. If no default is defined, then | |
| 139 | * it returns the first one found. If none are defined, it returns null. | |
| 140 | */ | |
| 141 | KimEntityName getDefaultName(); | |
| 142 | ||
| 143 | /** | |
| 144 | * Gets this {@link KimEntity}'s ethnicities | |
| 145 | * @return the List of {@link KimEntityEthnicity}S for this {@link KimEntity}. | |
| 146 | * The returned List will never be null, an empty List will be assigned and returned if needed. | |
| 147 | */ | |
| 148 | public List<? extends KimEntityEthnicity> getEthnicities(); | |
| 149 | ||
| 150 | /** | |
| 151 | * Gets this {@link KimEntity}'s residencies | |
| 152 | * @return the List of {@link KimEntityResidency}S for this {@link KimEntity}. | |
| 153 | * The returned List will never be null, an empty List will be assigned and returned if needed. | |
| 154 | */ | |
| 155 | public List<? extends KimEntityResidency> getResidencies(); | |
| 156 | ||
| 157 | /** | |
| 158 | * Gets this {@link KimEntity}'s visas | |
| 159 | * @return the List of {@link KimEntityVisa}S for this {@link KimEntity}. | |
| 160 | * The returned List will never be null, an empty List will be assigned and returned if needed. | |
| 161 | */ | |
| 162 | public List<? extends KimEntityVisa> getVisas(); | |
| 163 | ||
| 164 | } |