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