public class BudgetServiceImpl<T extends BudgetParent> extends Object implements BudgetService<T>
| Constructor and Description |
|---|
BudgetServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
BudgetDocument<T> |
addBudgetVersion(BudgetParentDocument<T> document,
String versionName)
Service method for adding a
BudgetVersionOverview to a ProposalDevelopmentDocument. |
protected boolean |
applyAuditRuleForBudgetDocument(BudgetVersionOverview budgetVersion) |
boolean |
checkActivityTypeChange(BudgetParentDocument<T> budgetParentDoc,
Budget budget)
This method check if activity type changed, then display confirmation message on 'open' budget version.
|
boolean |
checkActivityTypeChange(Collection<BudgetRate> allPropRates,
String activityTypeCode)
This method checks if activity type changed, then display confirmation message on 'open' budget version.
|
BudgetDocument |
copyBudgetVersion(BudgetDocument budgetDocument,
boolean onlyOnePeriod)
Returns a new finalized BudgetDocument with the data from the given BudgetDocument copied over.
|
protected void |
copyLineItemToPersonnelDetails(BudgetDocument budgetDocument)
Do this so that new personnel details(or copied ones) can be calculated
|
protected void |
fixProperty(Object object,
String methodName,
Class clazz,
Object propertyValue,
Map<String,Object> objectMap)
Recurse through all of the BOs and if a BO has a ProposalNumber property,
set its value to the new proposal number.
|
String |
getActivityTypeForBudget(BudgetDocument<T> budgetDocument) |
List<ValidCeJobCode> |
getApplicableCostElements(Long budgetId,
String personSequenceNumber)
This method returns the applicable Object Codes (Cost Elements) for a given Budget Person
based on his Job Code
|
String |
getApplicableCostElementsForAjaxCall(Long budgetId,
String personSequenceNumber,
String budgetCategoryTypeCode)
This method returns the applicable Object Codes (Cost Elements) for a given Budget Person, converted to string separated by ",".
|
BudgetDecimal |
getBaseSalaryByPeriod(Long budgetId,
int budgetPeriod,
KeyPersonInfo person) |
protected BudgetCommonService<BudgetParent> |
getBudgetCommonService(BudgetParentDocument parentBudgetDocument) |
String |
getBudgetExpensePanelName(BudgetPeriod budgetPeriod,
BudgetLineItem budgetLineItem)
This method returns the Non-Personnel Panel Name (based on the variables).
|
protected BudgetPersonService |
getBudgetPersonService() |
BudgetRatesService<T> |
getBudgetRatesService()
Gets the budgetRatesService attribute.
|
BudgetSummaryService |
getBudgetSummaryService()
Gets the budgetSummaryService attribute.
|
BudgetVersionRule |
getBudgetVersionRule()
Retrieve injected
singleton |
protected org.kuali.rice.krad.service.BusinessObjectService |
getBusinessObjectService() |
DeepCopyPostProcessor |
getDeepCopyPostProcessor()
Gets the deepCopyPostProcessor attribute.
|
protected org.kuali.rice.krad.service.DocumentService |
getDocumentService() |
List<String> |
getExistingGroupNames(String budgetId,
String budgetPeriod)
This method returns the existing Personnel Line Item Group Names
based on his Job Code
|
String |
getExistingGroupNamesForAjaxCall(String budgetId,
String budgetPeriod)
This method returns the existing Personnel Line Item Group Names , converted to string separated by ",".
|
FiscalYearMonthService |
getFiscalYearMonthService() |
protected List<String> |
getFormulatedCostElements() |
List<BudgetLineItem> |
getMatchingLineItems(List<BudgetLineItem> lineItems,
List<String> budgetCategoryType) |
protected BudgetDocument<T> |
getNewBudgetVersion(BudgetParentDocument<T> parentDocument,
String versionName) |
protected org.kuali.rice.coreservice.framework.parameter.ParameterService |
getParameterService() |
String |
getParticipantSupportCategoryCode() |
org.kuali.rice.krad.service.PessimisticLockService |
getPessimisticLockService()
Retrieve injected
singleton |
Collection<BudgetRate> |
getSavedBudgetRates(Budget budget)
This method returns the saved Proposal Rates collection.
|
Collection<BudgetRate> |
getSavedProposalRates(BudgetVersionOverview budgetToOpen) |
protected boolean |
isBudgetFormulatedCostEnabled() |
boolean |
isBudgetVersionNameValid(BudgetParentDocument<T> document,
String name)
Runs business rules on the given name of a
BudgetVersionOverview instance and ProposalDevelopmentDocument instance to
determine if it is ok to add a BudgetVersionOverview instance to a BudgetDocument instance. |
protected boolean |
isPropertyGetterMethod(Method method,
Method[] methods)
Is the given method a getter method for a property? Must conform to
the following:
Must start with the get
Must have a corresponding setter method
Must have zero arguments.
|
String |
populateBudgetPersonSalaryDetailsInPeriods(String budgetId,
String personSequenceNumber,
String personId) |
void |
populateNewBudgetLineItem(BudgetLineItem newBudgetLineItem,
BudgetPeriod budgetPeriod) |
protected void |
saveBudgetDocument(BudgetDocument<T> budgetDocument)
This method...
|
void |
setBudgetPersonService(BudgetPersonService budgetPersonService) |
void |
setBudgetRatesService(BudgetRatesService<T> budgetRatesService)
Sets the budgetRatesService attribute value.
|
void |
setBudgetSummaryService(BudgetSummaryService budgetSummaryService)
Sets the budgetSummaryService attribute value.
|
void |
setBudgetVersionRule(BudgetVersionRule budgetVersionRule)
Inject
singleton |
void |
setBusinessObjectService(org.kuali.rice.krad.service.BusinessObjectService businessObjectService) |
void |
setDeepCopyPostProcessor(DeepCopyPostProcessor deepCopyPostProcessor)
Sets the deepCopyPostProcessor attribute value.
|
void |
setDocumentService(org.kuali.rice.krad.service.DocumentService documentService) |
void |
setFiscalYearMonthService(FiscalYearMonthService fiscalYearMonthService) |
void |
setParameterService(org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService)
Sets the ParameterService.
|
void |
setPessimisticLockService(org.kuali.rice.krad.service.PessimisticLockService pessimisticLockService)
Inject
singleton |
void |
updateDocumentDescription(BudgetVersionOverview budgetVersion) |
protected void |
updateProjectIncomes(BudgetDocument budgetDocument,
List<BudgetProjectIncome> projectIncomes)
This method is to handle budgetprojectincomes independently.
|
boolean |
validateBudgetAuditRule(BudgetParentDocument<T> parentDocument)
This method to invoke audit rule check for budget if status is final only
This is called by PD's turnon validation
|
boolean |
validateBudgetAuditRuleBeforeSaveBudgetVersion(BudgetParentDocument<T> proposalDevelopmentDocument)
This method to check the audit rule when try to save 'budgetversion' and with 'complete' status.
|
boolean |
ValidInflationCeRate(BudgetLineItemBase budgetLineItem)
check if this line item CE has inflation rate
This method...
|
public BudgetDocument<T> addBudgetVersion(BudgetParentDocument<T> document, String versionName) throws org.kuali.rice.kew.api.exception.WorkflowException
BudgetVersionOverview to a ProposalDevelopmentDocument. If a
BudgetVersionOverview instance with the versionName already exists
in the ProposalDevelopmentDocument, then a hard error will occur. Try it and you'll see what I mean.addBudgetVersion in interface BudgetService<T extends BudgetParent>document - instance to add BudgetVersionOverview toversionName - of the BudgetVersionOvervieworg.kuali.rice.kew.api.exception.WorkflowExceptionprotected BudgetDocument<T> getNewBudgetVersion(BudgetParentDocument<T> parentDocument, String versionName) throws org.kuali.rice.kew.api.exception.WorkflowException
org.kuali.rice.kew.api.exception.WorkflowExceptionpublic boolean isBudgetVersionNameValid(BudgetParentDocument<T> document, String name)
BudgetVersionOverview instance and ProposalDevelopmentDocument instance to
determine if it is ok to add a BudgetVersionOverview instance to a BudgetDocument instance. If the business rules fail,
this should be false and there will be errors in the error map.Takes care of all the setup and calling of the KualiRuleService. Uses the AddBudgetVersionEvent.
isBudgetVersionNameValid in interface BudgetService<T extends BudgetParent>document - ProposalDevelopmentDocument to validate againstname - of the pseudo-BudgetVersionOverview instance to validatepublic org.kuali.rice.krad.service.PessimisticLockService getPessimisticLockService()
PessimisticLockService singletonpublic void setPessimisticLockService(org.kuali.rice.krad.service.PessimisticLockService pessimisticLockService)
PessimisticLockService singletonpessimisticLockService - to assignpublic BudgetVersionRule getBudgetVersionRule()
AddBudgetVersionRule singletonpublic void setBudgetVersionRule(BudgetVersionRule budgetVersionRule)
AddBudgetVersionRule singletonprotected void saveBudgetDocument(BudgetDocument<T> budgetDocument) throws org.kuali.rice.kew.api.exception.WorkflowException
budgetDocument - isProposalBudget - budget - budgetParent - org.kuali.rice.kew.api.exception.WorkflowExceptionpublic void updateDocumentDescription(BudgetVersionOverview budgetVersion)
updateDocumentDescription in interface BudgetService<T extends BudgetParent>public void setDocumentService(org.kuali.rice.krad.service.DocumentService documentService)
public void setParameterService(org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService)
parameterService - the parameter service.public void setBudgetPersonService(BudgetPersonService budgetPersonService)
public void setBusinessObjectService(org.kuali.rice.krad.service.BusinessObjectService businessObjectService)
protected void fixProperty(Object object, String methodName, Class clazz, Object propertyValue, Map<String,Object> objectMap)
object - the objectproposalNumber - the proposal numberprotected boolean isPropertyGetterMethod(Method method, Method[] methods)
method - the method to checkmethods - the other methods in the objectpublic Collection<BudgetRate> getSavedBudgetRates(Budget budget)
BudgetServicegetSavedBudgetRates in interface BudgetService<T extends BudgetParent>public boolean checkActivityTypeChange(Collection<BudgetRate> allPropRates, String activityTypeCode)
BudgetServicecheckActivityTypeChange in interface BudgetService<T extends BudgetParent>public boolean checkActivityTypeChange(BudgetParentDocument<T> budgetParentDoc, Budget budget)
BudgetServicecheckActivityTypeChange in interface BudgetService<T extends BudgetParent>public boolean ValidInflationCeRate(BudgetLineItemBase budgetLineItem)
BudgetServiceValidInflationCeRate in interface BudgetService<T extends BudgetParent>public String getActivityTypeForBudget(BudgetDocument<T> budgetDocument)
getActivityTypeForBudget in interface BudgetService<T extends BudgetParent>public List<ValidCeJobCode> getApplicableCostElements(Long budgetId, String personSequenceNumber)
BudgetServicegetApplicableCostElements in interface BudgetService<T extends BudgetParent>public String getApplicableCostElementsForAjaxCall(Long budgetId, String personSequenceNumber, String budgetCategoryTypeCode)
BudgetServicegetApplicableCostElementsForAjaxCall in interface BudgetService<T extends BudgetParent>public List<String> getExistingGroupNames(String budgetId, String budgetPeriod)
BudgetServicegetExistingGroupNames in interface BudgetService<T extends BudgetParent>public String getExistingGroupNamesForAjaxCall(String budgetId, String budgetPeriod)
BudgetServicegetExistingGroupNamesForAjaxCall in interface BudgetService<T extends BudgetParent>public String getBudgetExpensePanelName(BudgetPeriod budgetPeriod, BudgetLineItem budgetLineItem)
BudgetServicegetBudgetExpensePanelName in interface BudgetService<T extends BudgetParent>public String getParticipantSupportCategoryCode()
getParticipantSupportCategoryCode in interface BudgetService<T extends BudgetParent>public List<BudgetLineItem> getMatchingLineItems(List<BudgetLineItem> lineItems, List<String> budgetCategoryType)
getMatchingLineItems in interface BudgetService<T extends BudgetParent>public Collection<BudgetRate> getSavedProposalRates(BudgetVersionOverview budgetToOpen)
getSavedProposalRates in interface BudgetService<T extends BudgetParent>public boolean validateBudgetAuditRule(BudgetParentDocument<T> parentDocument) throws Exception
BudgetServicevalidateBudgetAuditRule in interface BudgetService<T extends BudgetParent>Exceptionorg.kuali.kra.proposaldevelopment.service.ProposalDevelopmentService#validateBudgetAuditRule(org.kuali.kra.proposaldevelopment.document.ProposalDevelopmentDocument)public boolean validateBudgetAuditRuleBeforeSaveBudgetVersion(BudgetParentDocument<T> proposalDevelopmentDocument) throws Exception
BudgetServicevalidateBudgetAuditRuleBeforeSaveBudgetVersion in interface BudgetService<T extends BudgetParent>Exceptionorg.kuali.kra.proposaldevelopment.service.ProposalDevelopmentService#validateBudgetAuditRuleBeforeSaveBudgetVersion(org.kuali.kra.proposaldevelopment.document.ProposalDevelopmentDocument)protected boolean applyAuditRuleForBudgetDocument(BudgetVersionOverview budgetVersion) throws Exception
Exceptionpublic BudgetDocument copyBudgetVersion(BudgetDocument budgetDocument, boolean onlyOnePeriod) throws org.kuali.rice.kew.api.exception.WorkflowException
BudgetServicecopyBudgetVersion in interface BudgetService<T extends BudgetParent>NoSuchMethodExceptionInvocationTargetExceptionIllegalAccessExceptionorg.kuali.rice.core.web.format.FormatExceptionorg.kuali.rice.kew.api.exception.WorkflowExceptionorg.kuali.kra.budget.core.BudgetService#copyBudgetVersion(org.kuali.kra.budget.document.BudgetDocument)protected BudgetCommonService<BudgetParent> getBudgetCommonService(BudgetParentDocument parentBudgetDocument)
protected void updateProjectIncomes(BudgetDocument budgetDocument, List<BudgetProjectIncome> projectIncomes)
budgetDocument - projectIncomes - protected void copyLineItemToPersonnelDetails(BudgetDocument budgetDocument)
budgetDocument - public BudgetRatesService<T> getBudgetRatesService()
public void setBudgetRatesService(BudgetRatesService<T> budgetRatesService)
budgetRatesService - The budgetRatesService to set.public void setDeepCopyPostProcessor(DeepCopyPostProcessor deepCopyPostProcessor)
deepCopyPostProcessor - The deepCopyPostProcessor to set.public DeepCopyPostProcessor getDeepCopyPostProcessor()
public BudgetSummaryService getBudgetSummaryService()
public void setBudgetSummaryService(BudgetSummaryService budgetSummaryService)
budgetSummaryService - The budgetSummaryService to set.public FiscalYearMonthService getFiscalYearMonthService()
public void setFiscalYearMonthService(FiscalYearMonthService fiscalYearMonthService)
public BudgetDecimal getBaseSalaryByPeriod(Long budgetId, int budgetPeriod, KeyPersonInfo person)
getBaseSalaryByPeriod in interface BudgetService<T extends BudgetParent>public String populateBudgetPersonSalaryDetailsInPeriods(String budgetId, String personSequenceNumber, String personId)
populateBudgetPersonSalaryDetailsInPeriods in interface BudgetService<T extends BudgetParent>public void populateNewBudgetLineItem(BudgetLineItem newBudgetLineItem, BudgetPeriod budgetPeriod)
populateNewBudgetLineItem in interface BudgetService<T extends BudgetParent>protected boolean isBudgetFormulatedCostEnabled()
protected org.kuali.rice.krad.service.DocumentService getDocumentService()
protected org.kuali.rice.krad.service.BusinessObjectService getBusinessObjectService()
protected org.kuali.rice.coreservice.framework.parameter.ParameterService getParameterService()
protected BudgetPersonService getBudgetPersonService()
Copyright © 2013 The Kuali Foundation. All Rights Reserved.