| 1 | |
|
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 15 | |
|
| 16 | |
package org.kuali.rice.kim.bo.entity.dto; |
| 17 | |
|
| 18 | |
import java.util.ArrayList; |
| 19 | |
import java.util.List; |
| 20 | |
|
| 21 | |
import org.kuali.rice.kim.api.entity.principal.Principal; |
| 22 | |
import org.kuali.rice.kim.api.entity.privacy.EntityPrivacyPreferences; |
| 23 | |
import org.kuali.rice.kim.api.entity.privacy.EntityPrivacyPreferencesContract; |
| 24 | |
import org.kuali.rice.kim.bo.entity.KimEntityAffiliation; |
| 25 | |
import org.kuali.rice.kim.bo.entity.KimEntityEmploymentInformation; |
| 26 | |
import org.kuali.rice.kim.bo.entity.KimEntityName; |
| 27 | |
import org.kuali.rice.kim.api.entity.type.EntityTypeDataDefault; |
| 28 | |
|
| 29 | |
|
| 30 | |
|
| 31 | |
|
| 32 | |
|
| 33 | |
|
| 34 | |
|
| 35 | 0 | public class KimEntityDefaultInfo extends KimInactivatableInfo { |
| 36 | |
|
| 37 | |
private static final long serialVersionUID = 7930630152792502380L; |
| 38 | |
protected String entityId; |
| 39 | |
protected KimEntityNameInfo defaultName; |
| 40 | |
protected List<Principal> principals; |
| 41 | |
protected List<EntityTypeDataDefault> entityTypes; |
| 42 | |
protected List<KimEntityAffiliationInfo> affiliations; |
| 43 | |
protected KimEntityAffiliationInfo defaultAffiliation; |
| 44 | |
protected KimEntityEmploymentInformationInfo primaryEmployment; |
| 45 | |
protected List<KimEntityExternalIdentifierInfo> externalIdentifiers; |
| 46 | |
protected EntityPrivacyPreferences privacyPreferences; |
| 47 | |
|
| 48 | |
|
| 49 | |
|
| 50 | |
|
| 51 | |
|
| 52 | |
public String getEntityId() { |
| 53 | 0 | return this.entityId; |
| 54 | |
} |
| 55 | |
|
| 56 | |
public void setEntityId(String entityId) { |
| 57 | 0 | this.entityId = entityId; |
| 58 | 0 | } |
| 59 | |
|
| 60 | |
|
| 61 | |
|
| 62 | |
|
| 63 | |
|
| 64 | |
public KimEntityNameInfo getDefaultName() { |
| 65 | 0 | return defaultName; |
| 66 | |
} |
| 67 | |
|
| 68 | |
public void setDefaultName(KimEntityName defaultName) { |
| 69 | 0 | if (defaultName instanceof KimEntityNameInfo) { |
| 70 | 0 | this.defaultName = (KimEntityNameInfo) defaultName; |
| 71 | |
} |
| 72 | |
else { |
| 73 | 0 | this.defaultName = new KimEntityNameInfo(defaultName); |
| 74 | |
} |
| 75 | 0 | } |
| 76 | |
|
| 77 | |
public void setDefaultName(KimEntityNameInfo defaultName) { |
| 78 | 0 | this.defaultName = defaultName; |
| 79 | 0 | } |
| 80 | |
|
| 81 | |
|
| 82 | |
|
| 83 | |
|
| 84 | |
|
| 85 | |
|
| 86 | |
public List<EntityTypeDataDefault> getEntityTypes() { |
| 87 | |
|
| 88 | 0 | return (entityTypes != null) ? entityTypes : (entityTypes = new ArrayList<EntityTypeDataDefault>()); |
| 89 | |
} |
| 90 | |
|
| 91 | |
public void setEntityTypes(List<EntityTypeDataDefault> entityTypes) { |
| 92 | 0 | this.entityTypes = entityTypes; |
| 93 | 0 | } |
| 94 | |
|
| 95 | |
|
| 96 | |
|
| 97 | |
|
| 98 | |
|
| 99 | |
|
| 100 | |
public List<KimEntityAffiliationInfo> getAffiliations() { |
| 101 | |
|
| 102 | 0 | return (affiliations != null) ? affiliations : (affiliations = new ArrayList<KimEntityAffiliationInfo>()); |
| 103 | |
} |
| 104 | |
|
| 105 | |
public void setAffiliations(List<KimEntityAffiliationInfo> affiliations) { |
| 106 | 0 | this.affiliations = affiliations; |
| 107 | 0 | } |
| 108 | |
|
| 109 | |
|
| 110 | |
|
| 111 | |
|
| 112 | |
|
| 113 | |
public KimEntityAffiliationInfo getDefaultAffiliation() { |
| 114 | 0 | return defaultAffiliation; |
| 115 | |
} |
| 116 | |
|
| 117 | |
public void setDefaultAffiliation(KimEntityAffiliation defaultAffiliation) { |
| 118 | 0 | if (defaultAffiliation != null) { |
| 119 | 0 | if (defaultAffiliation instanceof KimEntityAffiliationInfo) { |
| 120 | 0 | this.defaultAffiliation = (KimEntityAffiliationInfo) defaultAffiliation; |
| 121 | |
} |
| 122 | |
else { |
| 123 | 0 | this.defaultAffiliation = new KimEntityAffiliationInfo(defaultAffiliation); |
| 124 | |
} |
| 125 | |
} |
| 126 | 0 | } |
| 127 | |
|
| 128 | |
public void setDefaultAffiliation(KimEntityAffiliationInfo defaultAffiliation) { |
| 129 | 0 | this.defaultAffiliation = defaultAffiliation; |
| 130 | 0 | } |
| 131 | |
|
| 132 | |
|
| 133 | |
|
| 134 | |
|
| 135 | |
|
| 136 | |
public KimEntityEmploymentInformationInfo getPrimaryEmployment() { |
| 137 | 0 | return primaryEmployment; |
| 138 | |
} |
| 139 | |
|
| 140 | |
public void setPrimaryEmployment(KimEntityEmploymentInformation primaryEmployment) { |
| 141 | 0 | if (primaryEmployment != null) { |
| 142 | 0 | if (primaryEmployment instanceof KimEntityEmploymentInformationInfo) { |
| 143 | 0 | this.primaryEmployment = (KimEntityEmploymentInformationInfo) primaryEmployment; |
| 144 | |
} |
| 145 | |
else { |
| 146 | 0 | this.primaryEmployment = new KimEntityEmploymentInformationInfo(primaryEmployment); |
| 147 | |
} |
| 148 | |
} |
| 149 | 0 | } |
| 150 | |
|
| 151 | |
public void setPrimaryEmployment(KimEntityEmploymentInformationInfo primaryEmployment) { |
| 152 | 0 | this.primaryEmployment = primaryEmployment; |
| 153 | 0 | } |
| 154 | |
|
| 155 | |
|
| 156 | |
|
| 157 | |
|
| 158 | |
|
| 159 | |
|
| 160 | |
public List<KimEntityExternalIdentifierInfo> getExternalIdentifiers() { |
| 161 | |
|
| 162 | 0 | return (externalIdentifiers != null) ? |
| 163 | |
externalIdentifiers : (externalIdentifiers = new ArrayList<KimEntityExternalIdentifierInfo>()); |
| 164 | |
} |
| 165 | |
|
| 166 | |
public void setExternalIdentifiers( |
| 167 | |
List<KimEntityExternalIdentifierInfo> externalIdentifiers) { |
| 168 | 0 | this.externalIdentifiers = externalIdentifiers; |
| 169 | 0 | } |
| 170 | |
|
| 171 | |
|
| 172 | |
|
| 173 | |
|
| 174 | |
|
| 175 | |
|
| 176 | |
public List<Principal> getPrincipals() { |
| 177 | |
|
| 178 | 0 | return (principals != null) ? principals : (principals = new ArrayList<Principal>()); |
| 179 | |
} |
| 180 | |
|
| 181 | |
public void setPrincipals(List<Principal> principals) { |
| 182 | 0 | this.principals = principals; |
| 183 | 0 | } |
| 184 | |
|
| 185 | |
|
| 186 | |
|
| 187 | |
|
| 188 | |
|
| 189 | |
|
| 190 | |
public EntityTypeDataDefault getEntityType(String entityTypeCode) { |
| 191 | 0 | EntityTypeDataDefault result = null; |
| 192 | 0 | if (entityTypes == null) { |
| 193 | 0 | entityTypes = new ArrayList<EntityTypeDataDefault>(); |
| 194 | |
} |
| 195 | 0 | for (EntityTypeDataDefault entType : entityTypes) { |
| 196 | 0 | if (entType.getEntityTypeCode().equals(entityTypeCode)) { |
| 197 | 0 | result = entType; |
| 198 | |
} |
| 199 | |
} |
| 200 | 0 | return result; |
| 201 | |
} |
| 202 | |
|
| 203 | |
|
| 204 | |
|
| 205 | |
|
| 206 | |
|
| 207 | |
public EntityPrivacyPreferences getPrivacyPreferences() { |
| 208 | 0 | return privacyPreferences; |
| 209 | |
} |
| 210 | |
|
| 211 | |
public void setPrivacyPreferences(EntityPrivacyPreferences privacyPreferences) { |
| 212 | 0 | this.privacyPreferences = privacyPreferences; |
| 213 | 0 | } |
| 214 | |
|
| 215 | |
} |