| 1 | |
|
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
package org.kuali.student.kim.permission.mock; |
| 6 | |
|
| 7 | |
import java.util.HashMap; |
| 8 | |
import java.util.Map; |
| 9 | |
import org.kuali.rice.core.api.criteria.QueryByCriteria; |
| 10 | |
import org.kuali.rice.core.api.exception.RiceIllegalArgumentException; |
| 11 | |
import org.kuali.rice.core.api.exception.RiceIllegalStateException; |
| 12 | |
import org.kuali.rice.kim.api.identity.CodedAttribute; |
| 13 | |
import org.kuali.rice.kim.api.identity.IdentityService; |
| 14 | |
import org.kuali.rice.kim.api.identity.address.EntityAddress; |
| 15 | |
import org.kuali.rice.kim.api.identity.affiliation.EntityAffiliation; |
| 16 | |
import org.kuali.rice.kim.api.identity.affiliation.EntityAffiliationType; |
| 17 | |
import org.kuali.rice.kim.api.identity.citizenship.EntityCitizenship; |
| 18 | |
import org.kuali.rice.kim.api.identity.email.EntityEmail; |
| 19 | |
import org.kuali.rice.kim.api.identity.employment.EntityEmployment; |
| 20 | |
import org.kuali.rice.kim.api.identity.entity.Entity; |
| 21 | |
import org.kuali.rice.kim.api.identity.entity.EntityDefault; |
| 22 | |
import org.kuali.rice.kim.api.identity.entity.EntityDefaultQueryResults; |
| 23 | |
import org.kuali.rice.kim.api.identity.entity.EntityQueryResults; |
| 24 | |
import org.kuali.rice.kim.api.identity.external.EntityExternalIdentifier; |
| 25 | |
import org.kuali.rice.kim.api.identity.external.EntityExternalIdentifierType; |
| 26 | |
import org.kuali.rice.kim.api.identity.name.EntityName; |
| 27 | |
import org.kuali.rice.kim.api.identity.personal.EntityBioDemographics; |
| 28 | |
import org.kuali.rice.kim.api.identity.personal.EntityEthnicity; |
| 29 | |
import org.kuali.rice.kim.api.identity.phone.EntityPhone; |
| 30 | |
import org.kuali.rice.kim.api.identity.principal.Principal; |
| 31 | |
import org.kuali.rice.kim.api.identity.privacy.EntityPrivacyPreferences; |
| 32 | |
import org.kuali.rice.kim.api.identity.residency.EntityResidency; |
| 33 | |
import org.kuali.rice.kim.api.identity.type.EntityTypeContactInfo; |
| 34 | |
import org.kuali.rice.kim.api.identity.visa.EntityVisa; |
| 35 | |
|
| 36 | |
|
| 37 | |
|
| 38 | |
|
| 39 | |
|
| 40 | 0 | public class IdentityServiceMockImpl implements IdentityService { |
| 41 | |
|
| 42 | 0 | private Map<String, Entity> entities = new HashMap<String,Entity> (); |
| 43 | |
|
| 44 | |
@Override |
| 45 | |
public EntityAddress addAddressToEntity(EntityAddress ea) throws RiceIllegalArgumentException, RiceIllegalStateException { |
| 46 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 47 | |
} |
| 48 | |
|
| 49 | |
@Override |
| 50 | |
public EntityAffiliation addAffiliationToEntity(EntityAffiliation ea) throws RiceIllegalArgumentException, RiceIllegalStateException { |
| 51 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 52 | |
} |
| 53 | |
|
| 54 | |
@Override |
| 55 | |
public EntityBioDemographics addBioDemographicsToEntity(EntityBioDemographics ebd) throws RiceIllegalArgumentException, RiceIllegalStateException { |
| 56 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 57 | |
} |
| 58 | |
|
| 59 | |
@Override |
| 60 | |
public EntityCitizenship addCitizenshipToEntity(EntityCitizenship ec) throws RiceIllegalArgumentException, RiceIllegalStateException { |
| 61 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 62 | |
} |
| 63 | |
|
| 64 | |
@Override |
| 65 | |
public EntityEmail addEmailToEntity(EntityEmail ee) throws RiceIllegalArgumentException, RiceIllegalStateException { |
| 66 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 67 | |
} |
| 68 | |
|
| 69 | |
@Override |
| 70 | |
public EntityEmployment addEmploymentToEntity(EntityEmployment ee) throws RiceIllegalArgumentException, RiceIllegalStateException { |
| 71 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 72 | |
} |
| 73 | |
|
| 74 | |
@Override |
| 75 | |
public EntityTypeContactInfo addEntityTypeContactInfoToEntity(EntityTypeContactInfo etci) throws RiceIllegalArgumentException, RiceIllegalStateException { |
| 76 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 77 | |
} |
| 78 | |
|
| 79 | |
@Override |
| 80 | |
public EntityEthnicity addEthnicityToEntity(EntityEthnicity ee) throws RiceIllegalArgumentException, RiceIllegalStateException { |
| 81 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 82 | |
} |
| 83 | |
|
| 84 | |
@Override |
| 85 | |
public EntityExternalIdentifier addExternalIdentifierToEntity(EntityExternalIdentifier eei) throws RiceIllegalArgumentException, RiceIllegalStateException { |
| 86 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 87 | |
} |
| 88 | |
|
| 89 | |
@Override |
| 90 | |
public EntityName addNameToEntity(EntityName en) throws RiceIllegalArgumentException, RiceIllegalStateException { |
| 91 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 92 | |
} |
| 93 | |
|
| 94 | |
@Override |
| 95 | |
public EntityPhone addPhoneToEntity(EntityPhone ep) throws RiceIllegalArgumentException, RiceIllegalStateException { |
| 96 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 97 | |
} |
| 98 | |
|
| 99 | |
@Override |
| 100 | |
public Principal addPrincipalToEntity(Principal prncpl) throws RiceIllegalArgumentException, RiceIllegalStateException { |
| 101 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 102 | |
} |
| 103 | |
|
| 104 | |
@Override |
| 105 | |
public EntityPrivacyPreferences addPrivacyPreferencesToEntity(EntityPrivacyPreferences epp) throws RiceIllegalArgumentException, RiceIllegalStateException { |
| 106 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 107 | |
} |
| 108 | |
|
| 109 | |
@Override |
| 110 | |
public EntityResidency addResidencyToEntity(EntityResidency er) throws RiceIllegalArgumentException, RiceIllegalStateException { |
| 111 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 112 | |
} |
| 113 | |
|
| 114 | |
@Override |
| 115 | |
public EntityVisa addVisaToEntity(EntityVisa ev) throws RiceIllegalArgumentException, RiceIllegalStateException { |
| 116 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 117 | |
} |
| 118 | |
|
| 119 | |
@Override |
| 120 | |
public Entity createEntity(Entity entity) throws RiceIllegalArgumentException, RiceIllegalStateException { |
| 121 | 0 | Entity.Builder builder = Entity.Builder.create(entity); |
| 122 | 0 | if (builder.getId() == null) { |
| 123 | 0 | builder.setId(this.entities.size() + ""); |
| 124 | |
} |
| 125 | 0 | Entity copy = builder.build(); |
| 126 | 0 | this.entities.put(entity.getId(), copy); |
| 127 | 0 | return copy; |
| 128 | |
} |
| 129 | |
|
| 130 | |
@Override |
| 131 | |
public EntityQueryResults findEntities(QueryByCriteria qbc) throws RiceIllegalArgumentException { |
| 132 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 133 | |
} |
| 134 | |
|
| 135 | |
@Override |
| 136 | |
public EntityDefaultQueryResults findEntityDefaults(QueryByCriteria qbc) throws RiceIllegalArgumentException { |
| 137 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 138 | |
} |
| 139 | |
|
| 140 | |
@Override |
| 141 | |
public CodedAttribute getAddressType(String string) throws RiceIllegalArgumentException { |
| 142 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 143 | |
} |
| 144 | |
|
| 145 | |
@Override |
| 146 | |
public EntityAffiliationType getAffiliationType(String string) throws RiceIllegalArgumentException { |
| 147 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 148 | |
} |
| 149 | |
|
| 150 | |
@Override |
| 151 | |
public CodedAttribute getCitizenshipStatus(String string) throws RiceIllegalArgumentException { |
| 152 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 153 | |
} |
| 154 | |
|
| 155 | |
@Override |
| 156 | |
public CodedAttribute getEmailType(String string) throws RiceIllegalArgumentException { |
| 157 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 158 | |
} |
| 159 | |
|
| 160 | |
@Override |
| 161 | |
public CodedAttribute getEmploymentStatus(String string) throws RiceIllegalArgumentException { |
| 162 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 163 | |
} |
| 164 | |
|
| 165 | |
@Override |
| 166 | |
public CodedAttribute getEmploymentType(String string) throws RiceIllegalArgumentException { |
| 167 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 168 | |
} |
| 169 | |
|
| 170 | |
@Override |
| 171 | |
public Entity getEntity(String id) throws RiceIllegalArgumentException { |
| 172 | 0 | Entity entity = this.entities.get(id); |
| 173 | 0 | return entity; |
| 174 | |
} |
| 175 | |
|
| 176 | |
@Override |
| 177 | |
public Entity getEntityByPrincipalId(String string) throws RiceIllegalArgumentException { |
| 178 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 179 | |
} |
| 180 | |
|
| 181 | |
@Override |
| 182 | |
public Entity getEntityByPrincipalName(String string) throws RiceIllegalArgumentException { |
| 183 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 184 | |
} |
| 185 | |
|
| 186 | |
@Override |
| 187 | |
public EntityDefault getEntityDefault(String string) throws RiceIllegalArgumentException { |
| 188 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 189 | |
} |
| 190 | |
|
| 191 | |
@Override |
| 192 | |
public EntityDefault getEntityDefaultByPrincipalId(String string) throws RiceIllegalArgumentException { |
| 193 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 194 | |
} |
| 195 | |
|
| 196 | |
@Override |
| 197 | |
public EntityDefault getEntityDefaultByPrincipalName(String string) throws RiceIllegalArgumentException { |
| 198 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 199 | |
} |
| 200 | |
|
| 201 | |
@Override |
| 202 | |
public EntityPrivacyPreferences getEntityPrivacyPreferences(String string) throws RiceIllegalArgumentException { |
| 203 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 204 | |
} |
| 205 | |
|
| 206 | |
@Override |
| 207 | |
public CodedAttribute getEntityType(String string) throws RiceIllegalArgumentException { |
| 208 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 209 | |
} |
| 210 | |
|
| 211 | |
@Override |
| 212 | |
public EntityExternalIdentifierType getExternalIdentifierType(String string) throws RiceIllegalArgumentException { |
| 213 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 214 | |
} |
| 215 | |
|
| 216 | |
@Override |
| 217 | |
public CodedAttribute getNameType(String string) throws RiceIllegalArgumentException { |
| 218 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 219 | |
} |
| 220 | |
|
| 221 | |
@Override |
| 222 | |
public CodedAttribute getPhoneType(String string) throws RiceIllegalArgumentException { |
| 223 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 224 | |
} |
| 225 | |
|
| 226 | |
@Override |
| 227 | |
public Principal getPrincipal(String string) throws RiceIllegalArgumentException { |
| 228 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 229 | |
} |
| 230 | |
|
| 231 | |
@Override |
| 232 | |
public Principal getPrincipalByPrincipalName(String string) throws RiceIllegalArgumentException { |
| 233 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 234 | |
} |
| 235 | |
|
| 236 | |
@Override |
| 237 | |
public Principal getPrincipalByPrincipalNameAndPassword(String string, String string1) throws RiceIllegalArgumentException { |
| 238 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 239 | |
} |
| 240 | |
|
| 241 | |
@Override |
| 242 | |
public EntityAddress inactivateAddress(String string) throws RiceIllegalArgumentException, RiceIllegalStateException { |
| 243 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 244 | |
} |
| 245 | |
|
| 246 | |
@Override |
| 247 | |
public EntityAffiliation inactivateAffiliation(String string) throws RiceIllegalArgumentException, RiceIllegalStateException { |
| 248 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 249 | |
} |
| 250 | |
|
| 251 | |
@Override |
| 252 | |
public EntityCitizenship inactivateCitizenship(String string) throws RiceIllegalArgumentException, RiceIllegalStateException { |
| 253 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 254 | |
} |
| 255 | |
|
| 256 | |
@Override |
| 257 | |
public EntityEmail inactivateEmail(String string) throws RiceIllegalArgumentException, RiceIllegalStateException { |
| 258 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 259 | |
} |
| 260 | |
|
| 261 | |
@Override |
| 262 | |
public EntityEmployment inactivateEmployment(String string) throws RiceIllegalArgumentException, RiceIllegalStateException { |
| 263 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 264 | |
} |
| 265 | |
|
| 266 | |
@Override |
| 267 | |
public Entity inactivateEntity(String string) throws RiceIllegalArgumentException, RiceIllegalStateException { |
| 268 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 269 | |
} |
| 270 | |
|
| 271 | |
@Override |
| 272 | |
public EntityTypeContactInfo inactivateEntityTypeContactInfo(String string, String string1) throws RiceIllegalArgumentException, RiceIllegalStateException { |
| 273 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 274 | |
} |
| 275 | |
|
| 276 | |
@Override |
| 277 | |
public EntityName inactivateName(String string) throws RiceIllegalArgumentException, RiceIllegalStateException { |
| 278 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 279 | |
} |
| 280 | |
|
| 281 | |
@Override |
| 282 | |
public EntityPhone inactivatePhone(String string) throws RiceIllegalArgumentException, RiceIllegalStateException { |
| 283 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 284 | |
} |
| 285 | |
|
| 286 | |
@Override |
| 287 | |
public Principal inactivatePrincipal(String string) throws RiceIllegalArgumentException, RiceIllegalStateException { |
| 288 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 289 | |
} |
| 290 | |
|
| 291 | |
@Override |
| 292 | |
public Principal inactivatePrincipalByName(String string) throws RiceIllegalArgumentException, RiceIllegalStateException { |
| 293 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 294 | |
} |
| 295 | |
|
| 296 | |
@Override |
| 297 | |
public EntityAddress updateAddress(EntityAddress ea) throws RiceIllegalArgumentException, RiceIllegalStateException { |
| 298 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 299 | |
} |
| 300 | |
|
| 301 | |
@Override |
| 302 | |
public EntityAffiliation updateAffiliation(EntityAffiliation ea) throws RiceIllegalArgumentException, RiceIllegalStateException { |
| 303 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 304 | |
} |
| 305 | |
|
| 306 | |
@Override |
| 307 | |
public EntityBioDemographics updateBioDemographics(EntityBioDemographics ebd) throws RiceIllegalArgumentException, RiceIllegalStateException { |
| 308 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 309 | |
} |
| 310 | |
|
| 311 | |
@Override |
| 312 | |
public EntityCitizenship updateCitizenship(EntityCitizenship ec) throws RiceIllegalArgumentException, RiceIllegalStateException { |
| 313 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 314 | |
} |
| 315 | |
|
| 316 | |
@Override |
| 317 | |
public EntityEmail updateEmail(EntityEmail ee) throws RiceIllegalArgumentException, RiceIllegalStateException { |
| 318 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 319 | |
} |
| 320 | |
|
| 321 | |
@Override |
| 322 | |
public EntityEmployment updateEmployment(EntityEmployment ee) throws RiceIllegalArgumentException, RiceIllegalStateException { |
| 323 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 324 | |
} |
| 325 | |
|
| 326 | |
@Override |
| 327 | |
public Entity updateEntity(Entity entity) throws RiceIllegalArgumentException, RiceIllegalStateException { |
| 328 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 329 | |
} |
| 330 | |
|
| 331 | |
@Override |
| 332 | |
public EntityTypeContactInfo updateEntityTypeContactInfo(EntityTypeContactInfo etci) throws RiceIllegalArgumentException, RiceIllegalStateException { |
| 333 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 334 | |
} |
| 335 | |
|
| 336 | |
@Override |
| 337 | |
public EntityEthnicity updateEthnicity(EntityEthnicity ee) throws RiceIllegalArgumentException, RiceIllegalStateException { |
| 338 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 339 | |
} |
| 340 | |
|
| 341 | |
@Override |
| 342 | |
public EntityExternalIdentifier updateExternalIdentifier(EntityExternalIdentifier eei) throws RiceIllegalArgumentException, RiceIllegalStateException { |
| 343 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 344 | |
} |
| 345 | |
|
| 346 | |
@Override |
| 347 | |
public EntityName updateName(EntityName en) throws RiceIllegalArgumentException, RiceIllegalStateException { |
| 348 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 349 | |
} |
| 350 | |
|
| 351 | |
@Override |
| 352 | |
public EntityPhone updatePhone(EntityPhone ep) throws RiceIllegalArgumentException, RiceIllegalStateException { |
| 353 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 354 | |
} |
| 355 | |
|
| 356 | |
@Override |
| 357 | |
public Principal updatePrincipal(Principal prncpl) throws RiceIllegalArgumentException, RiceIllegalStateException { |
| 358 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 359 | |
} |
| 360 | |
|
| 361 | |
@Override |
| 362 | |
public EntityPrivacyPreferences updatePrivacyPreferences(EntityPrivacyPreferences epp) throws RiceIllegalArgumentException, RiceIllegalStateException { |
| 363 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 364 | |
} |
| 365 | |
|
| 366 | |
@Override |
| 367 | |
public EntityResidency updateResidency(EntityResidency er) throws RiceIllegalArgumentException, RiceIllegalStateException { |
| 368 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 369 | |
} |
| 370 | |
|
| 371 | |
@Override |
| 372 | |
public EntityVisa updateVisa(EntityVisa ev) throws RiceIllegalArgumentException, RiceIllegalStateException { |
| 373 | 0 | throw new UnsupportedOperationException("Not supported yet."); |
| 374 | |
} |
| 375 | |
|
| 376 | |
|
| 377 | |
} |