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