1 package org.kuali.ole.deliver.api;
2
3 import org.kuali.rice.kim.api.identity.affiliation.EntityAffiliationContract;
4 import org.kuali.rice.kim.api.identity.citizenship.EntityCitizenshipContract;
5 import org.kuali.rice.kim.api.identity.employment.EntityEmploymentContract;
6 import org.kuali.rice.kim.api.identity.entity.Entity;
7 import org.kuali.rice.kim.api.identity.entity.EntityContract;
8 import org.kuali.rice.kim.api.identity.external.EntityExternalIdentifierContract;
9 import org.kuali.rice.kim.api.identity.name.EntityName;
10 import org.kuali.rice.kim.api.identity.name.EntityNameContract;
11 import org.kuali.rice.kim.api.identity.personal.EntityBioDemographicsContract;
12 import org.kuali.rice.kim.api.identity.personal.EntityEthnicityContract;
13 import org.kuali.rice.kim.api.identity.principal.PrincipalContract;
14 import org.kuali.rice.kim.api.identity.privacy.EntityPrivacyPreferencesContract;
15 import org.kuali.rice.kim.api.identity.residency.EntityResidencyContract;
16 import org.kuali.rice.kim.api.identity.type.EntityTypeContactInfo;
17 import org.kuali.rice.kim.api.identity.type.EntityTypeContactInfoContract;
18 import org.kuali.rice.kim.api.identity.visa.EntityVisaContract;
19
20 import java.util.Collections;
21 import java.util.List;
22 import java.util.UUID;
23
24
25
26
27
28
29
30
31 public class EntityHelper {
32 private static final String ENTITY_ID = "190192";
33 private static final EntityTypeContactInfo ENTITY_TYPE = EntityTypeContactInfoHelper.create();
34 private static final EntityName NAME = EntityNameHelper.create() ;
35 private static final boolean ACTIVE = true;
36 private static final Long VERSION_NUMBER = new Long(1);
37 private static final String OBJECT_ID = String.valueOf(UUID.randomUUID());
38 public static Entity create() {
39 final List<EntityTypeContactInfo> testEntityTypes = Collections.singletonList(EntityHelper.ENTITY_TYPE);
40
41 final List<EntityName> testNames = Collections.singletonList(EntityHelper.NAME);
42
43 return Entity.Builder.create(new EntityContract() {
44 @Override
45 public List<? extends EntityTypeContactInfoContract> getEntityTypeContactInfos() {
46 return testEntityTypes;
47 }
48
49 @Override
50 public List<? extends PrincipalContract> getPrincipals() {
51 return null;
52 }
53
54 @Override
55 public List<? extends EntityExternalIdentifierContract> getExternalIdentifiers() {
56 return null;
57 }
58
59 @Override
60 public List<? extends EntityAffiliationContract> getAffiliations() {
61 return null;
62 }
63
64 @Override
65 public List<? extends EntityNameContract> getNames() {
66 return testNames;
67 }
68
69 @Override
70 public List<? extends EntityEmploymentContract> getEmploymentInformation() {
71 return null;
72 }
73
74 @Override
75 public EntityPrivacyPreferencesContract getPrivacyPreferences() {
76 return null;
77 }
78
79 @Override
80 public EntityBioDemographicsContract getBioDemographics() {
81 return null;
82 }
83
84 @Override
85 public List<? extends EntityCitizenshipContract> getCitizenships() {
86 return null;
87 }
88
89 @Override
90 public EntityTypeContactInfoContract getEntityTypeContactInfoByTypeCode(String entityTypeCode) {
91 return this.getEntityTypeContactInfoByTypeCode(entityTypeCode);
92 }
93
94 @Override
95 public EntityEmploymentContract getPrimaryEmployment() {
96 return null;
97 }
98
99 @Override
100 public EntityAffiliationContract getDefaultAffiliation() {
101 return null;
102 }
103
104 @Override
105 public EntityExternalIdentifierContract getEntityExternalIdentifier(String externalIdentifierTypeCode) {
106 return this.getEntityExternalIdentifier(externalIdentifierTypeCode);
107 }
108
109 @Override
110 public EntityNameContract getDefaultName() {
111 return EntityHelper.NAME;
112 }
113
114 @Override
115 public List<? extends EntityEthnicityContract> getEthnicities() {
116 return null;
117 }
118
119 @Override
120 public List<? extends EntityResidencyContract> getResidencies() {
121 return null;
122 }
123
124 @Override
125 public List<? extends EntityVisaContract> getVisas() {
126 return null;
127 }
128
129 @Override
130 public String getObjectId() {
131 return EntityHelper.OBJECT_ID;
132 }
133
134 @Override
135 public String getId() {
136 return EntityHelper.ENTITY_ID;
137 }
138
139 @Override
140 public boolean isActive() {
141 return EntityHelper.ACTIVE;
142 }
143
144 @Override
145 public Long getVersionNumber() {
146 return EntityHelper.VERSION_NUMBER;
147 }
148 }).build();
149
150 }
151 }