public class BudgetRatesServiceImpl<T extends BudgetParent> extends Object implements BudgetRatesService<T>
| Modifier and Type | Field and Description |
|---|---|
static String |
ACTIVITY_TYPE_CODE_KEY |
static String |
BUDGET_ID_KEY |
static String |
UNIT_NUMBER_KEY |
| Constructor and Description |
|---|
BudgetRatesServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addRateClassesForRateClassType(String rateClassType,
List<AbstractInstituteRate> instituteRates) |
protected boolean |
areBudgetRatesOutOfSyncWithInsttituteRates(List instituteRates,
List budgetRates) |
protected boolean |
areBudgetRatesOutOfSyncWithInsttituteRatesForRateAudit(List instituteRates,
List budgetRates) |
protected boolean |
areNumbersOfBudgetRatesOutOfSyncWithInstituteRates(List instituteRates,
List budgetRates) |
protected void |
checkActivityPrefixForRateClassTypes(List<RateClassType> rateClassTypes,
BudgetDocument<T> budgetDocument) |
protected Collection |
filterForActiveRatesOnly(Collection abstractInstituteRates) |
protected void |
filterInstituteRates(Budget budget,
Collection<AbstractInstituteRate> allRates,
Collection<AbstractInstituteRate> filteredRates,
Date personSalaryEffectiveDate) |
protected void |
filterRates(Budget budget,
Collection allAbstractInstituteRates,
Collection filteredAbstractInstituteRates) |
protected Unit |
findFirstUnitWithRates(Unit leadUnit,
Class rateType) |
protected AbstractBudgetRate |
generateBudgetProposalLaRate(BudgetDocument<T> budgetDocument,
InstituteLaRate instituteLaRate) |
protected AbstractBudgetRate |
generateBudgetProposalRate(BudgetDocument<T> budgetDocument,
InstituteRate instituteRate) |
protected AbstractBudgetRate |
generateBudgetRate(BudgetDocument<T> budgetDocument,
AbstractInstituteRate abstractInstituteRate) |
protected Map<String,AbstractBudgetRate> |
generateNewAndUpdatedBudgetRates(String rateClassType,
BudgetDocument<T> budgetDocument,
List<AbstractInstituteRate> instituteRates,
Map<String,AbstractBudgetRate> existingBudgetRateMap) |
protected String |
generateThreePartKey(AbstractInstituteRate instituteRate) |
protected Collection<AbstractInstituteRate> |
getActiveInstituteRates(Class rateType,
Unit unit,
String activityTypeCode) |
protected String |
getActivityTypeDescription(BudgetDocument<T> budgetDocument) |
protected List<org.kuali.rice.kns.util.AuditError> |
getAuditErrors() |
protected void |
getBudgetLaRates(BudgetDocument<T> budgetDocument,
List<InstituteLaRate> allInstituteLaRates) |
protected void |
getBudgetLaRates(List<RateClassType> rateClassTypes,
BudgetDocument<T> budgetDocument) |
protected void |
getBudgetLaRates(List<RateClassType> rateClassTypes,
BudgetDocument<T> budgetDocument,
List<InstituteLaRate> allInstituteLaRates)
Get budget LA rates applicable for the proposal - based on unit number
|
protected BudgetParentDocument<T> |
getBudgetParentDocument(Budget budget)
This method...
|
List<BudgetPeriod> |
getBudgetPeriods() |
protected Date |
getBudgetPersonSalaryEffectiveDate(Budget budget) |
Collection<RateClass> |
getBudgetRateClasses(String rateClassType)
Searches for persisted
RateClass instances based on the given rateClassType. |
Map<String,RateClass> |
getBudgetRateClassMap(String rateClassType)
|
protected void |
getBudgetRates(BudgetDocument<T> budgetDocument,
Collection<InstituteRate> allInstituteRates) |
void |
getBudgetRates(List<RateClassType> rateClassTypes,
BudgetDocument<T> budgetDocument) |
protected void |
getBudgetRates(List<RateClassType> rateClassTypes,
BudgetDocument<T> budgetDocument,
Collection<InstituteRate> allInstituteRates) |
org.kuali.rice.krad.service.BusinessObjectService |
getBusinessObjectService() |
protected Collection |
getFilteredInstituteLaRates(Class rateType,
String unitNumber,
Unit currentUnit,
Map<String,String> rateFilterMap) |
protected Collection |
getFilteredInstituteRates(Class rateType,
String unitNumber,
Unit currentUnit,
Map<String,String> rateFilterMap) |
protected String |
getFormattedAffectedBudgetPeriod(String periodAffected) |
protected Collection<InstituteLaRate> |
getInstituteLaRates(BudgetDocument<T> budgetDocument) |
protected Collection<InstituteRate> |
getInstituteRates(BudgetDocument<T> budgetDocument) |
protected String |
getLocationFlagAsString(boolean onOffCampusFlag) |
protected Date |
getRateEffectiveStartDate(Budget budget,
AbstractInstituteRate rate,
Date personEffectiveDate) |
protected Map<String,String> |
getRateFilterMap(BudgetDocument<T> budgetDocument) |
protected void |
getRatesForProjectDates(Budget budget,
Collection allRates,
Collection filteredRates,
Date personSalaryEffectiveDate) |
protected String |
getSeparatedBudgetPeriod(Integer budgetPeriod) |
double |
getUnitFormulatedCost(String unitNumber,
String formulatedTypeCode) |
UnitService |
getUnitService() |
protected boolean |
isOutOfSync(Budget budget) |
protected boolean |
isOutOfSync(List instituteRates,
List budgetRates) |
protected boolean |
isOutOfSyncForRateAudit_org(List instituteRates,
List budgetRates) |
boolean |
isOutOfSyncForRateAudit(BudgetDocument<T> budgetDocument) |
protected boolean |
isOutOfSyncForRateAudit(List instituteRates,
List budgetRates)
This method is to check to the class type level
|
protected boolean |
isRatesMatched(List<AbstractInstituteRate> fromRates,
List<AbstractInstituteRate> toRates) |
protected Unit |
makeParentUnitAsCurrentUnit(Unit currentUnit,
Map<String,String> rateFilterMap) |
protected Map<String,AbstractInstituteRate> |
mapRatesToKeys(Collection rates)
This method load institute rates to hashmap
|
boolean |
performSyncFlag(BudgetDocument<T> budgetDocument)
By default it does not have to perform sync
|
void |
populateBudgetRatesForNewVersion(BudgetDocument<T> budgetDocument) |
protected Map<String,RateClassType> |
populateExistingRateClassTypeMap(List<RateClassType> rateClassTypes) |
protected void |
populateInstituteRates(BudgetDocument<T> budgetDocument) |
protected Map<String,AbstractBudgetRate> |
preservePersistedBudgetRatesForRateClassType(String rateClassType,
List<AbstractBudgetRate> abstractBudgetRates) |
protected void |
registerNewAndUpdatedBudgetRates(List<AbstractBudgetRate> abstractBudgetRates,
Map<String,AbstractBudgetRate> newBudgetRateMap) |
protected void |
removeAllPreviouslyRegisteredRateClassesForRateClassType(String rateClassType,
List<RateClass> budgetRateClasses) |
protected void |
removeRegisteredBudgetRatesForRateClassType(String rateClassType,
List<AbstractBudgetRate> abstractBudgetRates) |
protected void |
replaceBudgetRatesForRateClassType(String rateClassType,
BudgetDocument<T> budgetDocument,
List existingBudgetRates,
List rates) |
protected void |
replaceRateClassesForRateClassType(String rateClassType,
Budget budget,
List rates) |
protected void |
resetAbstractBudgetApplicableRatesToInstituteRates(List budgetRates) |
void |
resetAllBudgetRates(Budget budget) |
protected void |
resetBudgetRatesForRateClassType(List<RateClass> rateClasses,
String rateClassType,
List budgetRates) |
void |
resetBudgetRatesForRateClassType(String rateClassType,
Budget budget)
reset budget rates for a panel
each panel is based on rate class type
|
void |
setBusinessObjectService(org.kuali.rice.krad.service.BusinessObjectService businessObjectService)
Sets the businessObjectService attribute value.
|
void |
setUnitService(UnitService unitService) |
protected Set<String> |
storeAllKeys(List<AbstractInstituteRate> rates) |
protected Set<String> |
storeAllKeysWithRate(List<AbstractInstituteRate> rates) |
void |
syncAllBudgetRates(BudgetDocument<T> budgetDocument) |
protected void |
syncAllBudgetRatesForInstituteRateType(BudgetDocument<T> budgetDocument,
List<AbstractBudgetRate> budgetRates,
List<AbstractInstituteRate> instituteRates) |
protected void |
syncAllRateClasses(Budget budget,
List<AbstractInstituteRate> instituteRates) |
protected void |
syncAllRateClassTypes(Budget budget,
List<RateClassType> rateClassTypes,
List<AbstractInstituteRate> instituteRates) |
protected void |
syncBudgetRateCollections(List<RateClassType> rateClassTypes,
BudgetDocument<T> budgetDocument,
List abstractInstituteRates,
List budgetRates) |
void |
syncBudgetRateCollectionsToExistingRates(List<RateClassType> rateClassTypes,
BudgetDocument<T> budgetDocument) |
protected void |
syncBudgetRates(List budgetRates,
Collection abstractIntituteRates) |
protected void |
syncBudgetRatesForRateClassType(List<RateClass> rateClasses,
String rateClassType,
Collection abstractInstituteRates,
List budgetRates) |
void |
syncBudgetRatesForRateClassType(String rateClassType,
BudgetDocument<T> budgetDocument) |
void |
syncParentDocumentRates(BudgetDocument<T> budgetDocument)
Does nothing.
|
protected void |
syncVersionNumber(Map<String,AbstractInstituteRate> oldRateMap,
List rates) |
protected void |
updateRatesForEachPeriod(Budget budget)
Build rates for each period.
|
void |
viewLocation(String viewLocation,
Integer budgetPeriod,
Budget budget) |
protected void |
viewLocation(String viewLocation,
Integer budgetPeriod,
List rates) |
public static final String UNIT_NUMBER_KEY
public static final String ACTIVITY_TYPE_CODE_KEY
public static final String BUDGET_ID_KEY
public void resetAllBudgetRates(Budget budget)
resetAllBudgetRates in interface BudgetRatesService<T extends BudgetParent>BudgetRatesService.resetAllBudgetRates(org.kuali.kra.budget.core.Budget)public void resetBudgetRatesForRateClassType(String rateClassType, Budget budget)
resetBudgetRatesForRateClassType in interface BudgetRatesService<T extends BudgetParent>BudgetRatesService.resetBudgetRatesForRateClassType(java.lang.String, org.kuali.kra.budget.core.Budget)public void syncAllBudgetRates(BudgetDocument<T> budgetDocument)
syncAllBudgetRates in interface BudgetRatesService<T extends BudgetParent>org.kuali.kra.budget.rates.BudgetRatesService#syncAllBudgetRates(org.kuali.kra.budget.core.Budget)protected void syncVersionNumber(Map<String,AbstractInstituteRate> oldRateMap, List rates)
public void viewLocation(String viewLocation, Integer budgetPeriod, Budget budget)
viewLocation in interface BudgetRatesService<T extends BudgetParent>public void syncParentDocumentRates(BudgetDocument<T> budgetDocument)
syncParentDocumentRates in interface BudgetRatesService<T extends BudgetParent>budgetDocument - public void syncBudgetRatesForRateClassType(String rateClassType, BudgetDocument<T> budgetDocument)
syncBudgetRatesForRateClassType in interface BudgetRatesService<T extends BudgetParent>public void getBudgetRates(List<RateClassType> rateClassTypes, BudgetDocument<T> budgetDocument)
getBudgetRates in interface BudgetRatesService<T extends BudgetParent>org.kuali.kra.budget.rates.BudgetRatesService#getBudgetRates(java.util.List, org.kuali.kra.budget.core.Budget)protected void checkActivityPrefixForRateClassTypes(List<RateClassType> rateClassTypes, BudgetDocument<T> budgetDocument)
protected String getActivityTypeDescription(BudgetDocument<T> budgetDocument)
public List<BudgetPeriod> getBudgetPeriods()
getBudgetPeriods in interface BudgetRatesService<T extends BudgetParent>BudgetRatesService.getBudgetPeriods()public void setBusinessObjectService(org.kuali.rice.krad.service.BusinessObjectService businessObjectService)
setBusinessObjectService in interface BudgetRatesService<T extends BudgetParent>businessObjectService - The businessObjectService to set.protected void updateRatesForEachPeriod(Budget budget)
protected Map<String,AbstractInstituteRate> mapRatesToKeys(Collection rates)
rates - protected Collection<InstituteRate> getInstituteRates(BudgetDocument<T> budgetDocument)
protected Collection<AbstractInstituteRate> getActiveInstituteRates(Class rateType, Unit unit, String activityTypeCode)
protected Collection<InstituteLaRate> getInstituteLaRates(BudgetDocument<T> budgetDocument)
protected BudgetParentDocument<T> getBudgetParentDocument(Budget budget)
budget - protected Map<String,String> getRateFilterMap(BudgetDocument<T> budgetDocument)
protected Collection getFilteredInstituteLaRates(Class rateType, String unitNumber, Unit currentUnit, Map<String,String> rateFilterMap)
protected Collection getFilteredInstituteRates(Class rateType, String unitNumber, Unit currentUnit, Map<String,String> rateFilterMap)
protected Collection filterForActiveRatesOnly(Collection abstractInstituteRates)
protected Unit makeParentUnitAsCurrentUnit(Unit currentUnit, Map<String,String> rateFilterMap)
protected Date getRateEffectiveStartDate(Budget budget, AbstractInstituteRate rate, Date personEffectiveDate)
protected void getRatesForProjectDates(Budget budget, Collection allRates, Collection filteredRates, Date personSalaryEffectiveDate)
protected void filterInstituteRates(Budget budget, Collection<AbstractInstituteRate> allRates, Collection<AbstractInstituteRate> filteredRates, Date personSalaryEffectiveDate)
protected String generateThreePartKey(AbstractInstituteRate instituteRate)
protected void filterRates(Budget budget, Collection allAbstractInstituteRates, Collection filteredAbstractInstituteRates)
protected boolean isOutOfSync(Budget budget)
protected boolean areNumbersOfBudgetRatesOutOfSyncWithInstituteRates(List instituteRates, List budgetRates)
protected boolean areBudgetRatesOutOfSyncWithInsttituteRates(List instituteRates, List budgetRates)
protected Set<String> storeAllKeys(List<AbstractInstituteRate> rates)
protected void resetAbstractBudgetApplicableRatesToInstituteRates(List budgetRates)
protected void resetBudgetRatesForRateClassType(List<RateClass> rateClasses, String rateClassType, List budgetRates)
protected void syncBudgetRates(List budgetRates, Collection abstractIntituteRates)
protected String getFormattedAffectedBudgetPeriod(String periodAffected)
protected String getLocationFlagAsString(boolean onOffCampusFlag)
protected void syncBudgetRatesForRateClassType(List<RateClass> rateClasses, String rateClassType, Collection abstractInstituteRates, List budgetRates)
protected Map<String,RateClassType> populateExistingRateClassTypeMap(List<RateClassType> rateClassTypes)
protected void getBudgetRates(BudgetDocument<T> budgetDocument, Collection<InstituteRate> allInstituteRates)
protected void getBudgetRates(List<RateClassType> rateClassTypes, BudgetDocument<T> budgetDocument, Collection<InstituteRate> allInstituteRates)
protected void getBudgetLaRates(BudgetDocument<T> budgetDocument, List<InstituteLaRate> allInstituteLaRates)
protected void getBudgetLaRates(List<RateClassType> rateClassTypes, BudgetDocument<T> budgetDocument)
protected void getBudgetLaRates(List<RateClassType> rateClassTypes, BudgetDocument<T> budgetDocument, List<InstituteLaRate> allInstituteLaRates)
rateClassTypes - budget - allInstituteLaRates - public org.kuali.rice.krad.service.BusinessObjectService getBusinessObjectService()
getBusinessObjectService in interface BudgetRatesService<T extends BudgetParent>protected void syncBudgetRateCollections(List<RateClassType> rateClassTypes, BudgetDocument<T> budgetDocument, List abstractInstituteRates, List budgetRates)
public void syncBudgetRateCollectionsToExistingRates(List<RateClassType> rateClassTypes, BudgetDocument<T> budgetDocument)
syncBudgetRateCollectionsToExistingRates in interface BudgetRatesService<T extends BudgetParent>protected void syncAllBudgetRatesForInstituteRateType(BudgetDocument<T> budgetDocument, List<AbstractBudgetRate> budgetRates, List<AbstractInstituteRate> instituteRates)
protected void replaceRateClassesForRateClassType(String rateClassType, Budget budget, List rates)
protected void removeAllPreviouslyRegisteredRateClassesForRateClassType(String rateClassType, List<RateClass> budgetRateClasses)
protected void addRateClassesForRateClassType(String rateClassType, List<AbstractInstituteRate> instituteRates)
protected void replaceBudgetRatesForRateClassType(String rateClassType, BudgetDocument<T> budgetDocument, List existingBudgetRates, List rates)
protected void registerNewAndUpdatedBudgetRates(List<AbstractBudgetRate> abstractBudgetRates, Map<String,AbstractBudgetRate> newBudgetRateMap)
protected Map<String,AbstractBudgetRate> generateNewAndUpdatedBudgetRates(String rateClassType, BudgetDocument<T> budgetDocument, List<AbstractInstituteRate> instituteRates, Map<String,AbstractBudgetRate> existingBudgetRateMap)
protected void removeRegisteredBudgetRatesForRateClassType(String rateClassType, List<AbstractBudgetRate> abstractBudgetRates)
protected Map<String,AbstractBudgetRate> preservePersistedBudgetRatesForRateClassType(String rateClassType, List<AbstractBudgetRate> abstractBudgetRates)
protected void syncAllRateClasses(Budget budget, List<AbstractInstituteRate> instituteRates)
protected void syncAllRateClassTypes(Budget budget, List<RateClassType> rateClassTypes, List<AbstractInstituteRate> instituteRates)
protected AbstractBudgetRate generateBudgetProposalRate(BudgetDocument<T> budgetDocument, InstituteRate instituteRate)
protected AbstractBudgetRate generateBudgetProposalLaRate(BudgetDocument<T> budgetDocument, InstituteLaRate instituteLaRate)
protected AbstractBudgetRate generateBudgetRate(BudgetDocument<T> budgetDocument, AbstractInstituteRate abstractInstituteRate)
public Collection<RateClass> getBudgetRateClasses(String rateClassType)
RateClass instances based on the given rateClassType. Uses the BusinessObjectService
to grab appropriate RateClass instances since RateClass is a BusinessObjectgetBudgetRateClasses in interface BudgetRatesService<T extends BudgetParent>rateClassType - to use for retrieving RateClass instancespublic Map<String,RateClass> getBudgetRateClassMap(String rateClassType)
RateClass instances as a Map keyed from the rateTypeCode. This makes it easy for
classes (particularly in the UI) to grab RateClass information via rateTypeCodegetBudgetRateClassMap in interface BudgetRatesService<T extends BudgetParent>rateClassType - to use for RateClass instances to be retrievedMap keyed on rateTypeCode containing RateClass instancesprotected void populateInstituteRates(BudgetDocument<T> budgetDocument)
public boolean isOutOfSyncForRateAudit(BudgetDocument<T> budgetDocument)
isOutOfSyncForRateAudit in interface BudgetRatesService<T extends BudgetParent>protected boolean isOutOfSyncForRateAudit(List instituteRates, List budgetRates)
instituteRates - budgetRates - protected boolean isRatesMatched(List<AbstractInstituteRate> fromRates, List<AbstractInstituteRate> toRates)
protected List<org.kuali.rice.kns.util.AuditError> getAuditErrors()
protected boolean isOutOfSyncForRateAudit_org(List instituteRates, List budgetRates)
protected boolean areBudgetRatesOutOfSyncWithInsttituteRatesForRateAudit(List instituteRates, List budgetRates)
protected Set<String> storeAllKeysWithRate(List<AbstractInstituteRate> rates)
public void populateBudgetRatesForNewVersion(BudgetDocument<T> budgetDocument)
populateBudgetRatesForNewVersion in interface BudgetRatesService<T extends BudgetParent>public boolean performSyncFlag(BudgetDocument<T> budgetDocument)
performSyncFlag in interface BudgetRatesService<T extends BudgetParent>org.kuali.kra.budget.rates.BudgetRatesService#performSyncFlag()public double getUnitFormulatedCost(String unitNumber, String formulatedTypeCode)
getUnitFormulatedCost in interface BudgetRatesService<T extends BudgetParent>public UnitService getUnitService()
public void setUnitService(UnitService unitService)
Copyright © 2013 The Kuali Foundation. All Rights Reserved.