Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright 2005-2012 The Kuali Foundation Licensed under the Educational Community License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.opensource.org/licenses/ecl2.php Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
 
 package org.kuali.rice.kim.impl.identity;
 
 
 import java.util.List;
 import java.util.Map;

This IdentityService implementation is largely just a knee-jerk delegator, except for getters returning org.kuali.rice.kim.api.identity.entity.EntityDefault in which case the IdentityArchiveService will be invoked if the inner IndentityService impl returns null.

Author(s):
Kuali Rice Team (rice.collab@kuali.org)
 
This constructs a IdentityCurrentAndArchivedServiceImpl, injecting the needed services.
 
 	public IdentityCurrentAndArchivedServiceImpl(IdentityService innerIdentityService
 			IdentityArchiveService identityArchiveService) {
 		this. = innerIdentityService;
 		this. = identityArchiveService;
 	}

 
     @Override
 	public CodedAttribute getAddressType(String code) {
 	}
 
     @Override
 	}

    
        
     @Override
 		return CodedAttribute.Builder.create(getInnerIdentityService().getCitizenshipStatus(code)).build();
 	}
     
     @Override
     	if(name == null || ObjectUtils.isNull(name.getDefaultName()) || StringUtils.isBlank(name.getPrincipalName()) || StringUtils.isBlank(name.getDefaultName().getCompositeName())) {
     		EntityDefault defaultEntity = this.getEntityDefaultByPrincipalId(principalId);
 			EntityNamePrincipalName.Builder nameBuilder = EntityNamePrincipalName.Builder.create();
 			for(Principal principal : defaultEntity.getPrincipals()) {
 				nameBuilder.setPrincipalName(principal.getPrincipalName());
 			}
			nameBuilder.setDefaultName(EntityName.Builder.create(defaultEntity.getName()));
			if (StringUtils.isBlank(defaultEntity.getName().getCompositeName())) {
				String formattedName = defaultEntity.getName().getLastName() + ", " + defaultEntity.getName().getFirstName() + (defaultEntity.getName().getMiddleName()==null?"":" " + defaultEntity.getName().getMiddleName());
				nameBuilder.getDefaultName().setCompositeName(formattedName);
			}
			return nameBuilder.build();
    	}
		return name;
	}
    @Override
    public EntityName addNameToEntity(EntityName name) {
        return getInnerIdentityService().addNameToEntity(name);
    }
    @Override
    public EntityName updateName(EntityName name) {
        return getInnerIdentityService().updateName(name);
    }
    @Override
    public EntityName inactivateName(String id) {
        return getInnerIdentityService().inactivateName(id);
    }
    @Override
        return getInnerIdentityService().addEmploymentToEntity(employment);
    }
    @Override
    public EntityEmployment updateEmployment(EntityEmployment employment) {
        return getInnerIdentityService().updateEmployment(employment);
    }
    @Override
        return getInnerIdentityService().inactivateEmployment(id);
    }
    @Override
        return getInnerIdentityService().addBioDemographicsToEntity(bioDemographics);
    }
    @Override
        return getInnerIdentityService().updateBioDemographics(bioDemographics);
    }

    @Override
	}

    
    @Override
	}


    
    @Override
	}


    
This method first tries the inner IdentityService impl, and resorts to the IdentityArchiveService if need be.
    @Override
	public EntityDefault getEntityDefault(String entityId) {
    	if ( entity == null ) {
    	} else {
    	}
		return entity;
	}

This method first tries the inner IdentityService impl, and resorts to the IdentityArchiveService if need be.
    @Override
    	if ( entity == null ) {
    	} else {
    	}
    	return entity;
	}

This method first tries the inner IdentityService impl, and resorts to the IdentityArchiveService if need be.
    @Override
    	if ( entity == null ) {
    	} else {
    	}
    	return entity;
	}

    
This method first tries the inner IdentityService impl, and resorts to the IdentityArchiveService if need be.
    @Override
    public EntityDefault getEntityDefaultByEmployeeId(String employeeId) {
        EntityDefault entity = getInnerIdentityService().getEntityDefaultByEmployeeId(employeeId);
        if ( entity == null ) {
            entity = getIdentityArchiveService().getEntityDefaultFromArchiveByEmployeeIdemployeeId );
        } else {
            getIdentityArchiveService().saveEntityDefaultToArchive(entity);
        }
        return entity;
    }
    @Override
    public EntityDefaultQueryResults findEntityDefaultsQueryByCriteria queryByCriteria) {
        return getInnerIdentityService().findEntityDefaults(queryByCriteria);
    }
    @Override
    public EntityQueryResults findEntities(QueryByCriteria queryByCriteria) {
        return getInnerIdentityService().findEntities(queryByCriteria);
    }
    @Override
	public Entity getEntity(String entityId) {
	}
    @Override
	public Entity getEntityByPrincipalId(String principalId) {
	}
    @Override
	public Entity getEntityByPrincipalName(String principalName) {
	}
    
    @Override
	public Entity getEntityByEmployeeId(String employeeId) {
	}
    @Override
    public Entity createEntity(Entity entity) {
        return getInnerIdentityService().createEntity(entity);
    }
    @Override
    public Entity updateEntity(Entity entity) {
        return getInnerIdentityService().updateEntity(entity);
    }
    @Override
    public Entity inactivateEntity(String entityId) {
        return getInnerIdentityService().inactivateEntity(entityId);
    }

    
    @Override
	}
    @Override
			String entityId) {
	}
    @Override
        return getInnerIdentityService().addPrivacyPreferencesToEntity(privacyPreferences);
    }
    @Override
        return getInnerIdentityService().updatePrivacyPreferences(privacyPreferences);
    }
    @Override
        return getInnerIdentityService().addCitizenshipToEntity(citizenship);
    }
    @Override
    public EntityCitizenship updateCitizenship(EntityCitizenship citizenship) {
        return getInnerIdentityService().updateCitizenship(citizenship);
    }
    @Override
        return getInnerIdentityService().inactivateCitizenship(id);
    }
    @Override
        return getInnerIdentityService().addEthnicityToEntity(ethnicity);
    }
    @Override
    public EntityEthnicity updateEthnicity(EntityEthnicity ethnicity) {
        return getInnerIdentityService().updateEthnicity(ethnicity);
    }
    @Override
        return getInnerIdentityService().addResidencyToEntity(residency);
    }
    @Override
    public EntityResidency updateResidency(EntityResidency residency) {
        return getInnerIdentityService().updateResidency(residency);
    }
    @Override
    public EntityVisa addVisaToEntity(EntityVisa visa) {
        return getInnerIdentityService().addVisaToEntity(visa);
    }
    @Override
    public EntityVisa updateVisa(EntityVisa visa) {
        return getInnerIdentityService().updateVisa(visa);
    }

    
    @Override
	}
    @Override
	}


    @Override
	}
    @Override
	public Principal getPrincipal(String principalId) {
		return getInnerIdentityService().getPrincipal(principalId);
	}
    @Override
	public Principal getPrincipalByPrincipalName(String principalName) {
	}
    @Override
			String principalNameString password) {
				principalNamepassword);
	}
    @Override
    public Principal addPrincipalToEntity(Principal principal) {
        return getInnerIdentityService().addPrincipalToEntity(principal);
    }
    @Override
    public Principal updatePrincipal(Principal principal) {
        return getInnerIdentityService().updatePrincipal(principal);
    }
    @Override
    public Principal inactivatePrincipal(String principalId) {
        return getInnerIdentityService().inactivatePrincipal(principalId);
    }
    @Override
    public Principal inactivatePrincipalByName(String principalName) {
        return getInnerIdentityService().inactivatePrincipalByName(principalName);
    }
    @Override
        return getInnerIdentityService().addEntityTypeContactInfoToEntity(entityTypeContactInfo);
    }
    @Override
        return getInnerIdentityService().updateEntityTypeContactInfo(entityTypeContactInfo);
    }
    @Override
    public EntityTypeContactInfo inactivateEntityTypeContactInfo(String entityIdString entityTypeCode) {
        return getInnerIdentityService().inactivateEntityTypeContactInfo(entityIdentityTypeCode);
    }
    @Override
    public EntityAddress addAddressToEntity(EntityAddress address) {
        return getInnerIdentityService().addAddressToEntity(address);
    }
    @Override
    public EntityAddress updateAddress(EntityAddress address) {
        return getInnerIdentityService().updateAddress(address);
    }
    @Override
    public EntityAddress inactivateAddress(String addressId) {
        return getInnerIdentityService().inactivateAddress(addressId);
    }
    @Override
    public EntityEmail addEmailToEntity(EntityEmail email) {
        return getInnerIdentityService().addEmailToEntity(email);
    }
    @Override
    public EntityEmail updateEmail(EntityEmail email) {
        return getInnerIdentityService().updateEmail(email);
    }
    @Override
    public EntityEmail inactivateEmail(String emailId) {
        return getInnerIdentityService().inactivateEmail(emailId);
    }
    @Override
    public EntityPhone addPhoneToEntity(EntityPhone phone) {
        return getInnerIdentityService().addPhoneToEntity(phone);
    }
    @Override
    public EntityPhone updatePhone(EntityPhone phone) {
        return getInnerIdentityService().updatePhone(phone);
    }
    @Override
    public EntityPhone inactivatePhone(String phoneId) {
        return getInnerIdentityService().inactivatePhone(phoneId);
    }
    @Override
        return getInnerIdentityService().addExternalIdentifierToEntity(externalId);
    }
    @Override
        return getInnerIdentityService().updateExternalIdentifier(externalId);
    }
    @Override
        return getInnerIdentityService().addAffiliationToEntity(affiliation);
    }
    @Override
    public EntityAffiliation updateAffiliation(EntityAffiliation affiliation) {
        return getInnerIdentityService().updateAffiliation(affiliation);
    }
    @Override
        return getInnerIdentityService().inactivateAffiliation(id);
    }
	}
	}
New to GrepCode? Check out our FAQ X