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