public class BudgetSubAwardServiceImpl extends Object implements BudgetSubAwardService
| Constructor and Description |
|---|
BudgetSubAwardServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
cleanContentId(String contentId) |
protected Element |
copyElementToName(Element element,
String tagName) |
protected gov.grants.apply.system.globalV10.HashValueDocument.HashValue |
createHashValueType(String hashValueStr) |
protected Map |
extractAttachments(com.lowagie.text.pdf.PdfReader reader)
extracts attachments from PDF File
|
protected BudgetPeriod |
findBudgetPeriod(BudgetSubAwardPeriodDetail detail,
Budget budget) |
protected BudgetSubAwardPeriodDetail |
findBudgetSubAwardPeriodDetail(Budget budget,
BudgetSubAwards budgetSubAward,
Date startDate,
Date endDate)
First find a budget period that matches the start and end date.
|
protected BudgetLineItem |
findOrCreateLineItem(List<BudgetLineItem> lineItems,
BudgetSubAwardPeriodDetail subAwardDetail,
BudgetSubAwards subAward,
BudgetPeriod budgetPeriod,
String costElement) |
protected List<BudgetLineItem> |
findSubAwardLineItems(BudgetPeriod budgetPeriod,
Integer subAwardNumber) |
void |
generateSubAwardLineItems(BudgetSubAwards subAward,
Budget budget) |
protected BudgetService |
getBudgetService() |
protected org.kuali.rice.krad.service.BusinessObjectService |
getBusinessObjectService() |
protected String |
getLoggedInUserNetworkId()
This method return loggedin user id
|
protected org.kuali.rice.coreservice.framework.parameter.ParameterService |
getParameterService() |
protected gov.grants.apply.system.globalV10.HashValueDocument.HashValue |
getValue(byte[] fileBytes) |
protected byte[] |
getXMLFromPDF(com.lowagie.text.pdf.PdfReader reader)
extracts XML from PDF
|
protected BudgetDecimal |
lesserValue(BudgetDecimal num1,
BudgetDecimal num2) |
void |
populateBudgetSubAwardAttachments(Budget budget)
This method is to handle subaward attachments
|
void |
populateBudgetSubAwardFiles(Budget budget,
BudgetSubAwards subAward,
String newFileName,
byte[] newFileData)
This method is to populate the subaward files
|
void |
prepareBudgetSubAwards(Budget budget) |
protected void |
removeAllEmptyNodes(Document document,
String xpath,
int parentLevel) |
void |
removeSubAwardAttachment(BudgetSubAwards subAward) |
void |
setBudgetService(BudgetService budgetService) |
void |
setBusinessObjectService(org.kuali.rice.krad.service.BusinessObjectService businessObjectService) |
void |
setParameterService(org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService) |
protected static Object[] |
unpackFile(com.lowagie.text.pdf.PdfReader reader,
com.lowagie.text.pdf.PdfDictionary filespec)
Unpacks a file attachment.
|
boolean |
updateSubAwardBudgetDetails(Budget budget,
BudgetSubAwards budgetSubAward,
List<String[]> errors)
Reads the XML from the PDF and parses out amounts from the budget periods.
|
protected BudgetSubAwards |
updateXML(byte[] xmlContents,
Map fileMap,
BudgetSubAwards budgetSubAwardBean,
Budget budget)
updates the XMl with hashcode for the files
|
public void populateBudgetSubAwardFiles(Budget budget, BudgetSubAwards subAward, String newFileName, byte[] newFileData)
BudgetSubAwardServicepopulateBudgetSubAwardFiles in interface BudgetSubAwardServiceorg.kuali.kra.proposaldevelopment.budget.service.BudgetSubAwardService#populateBudgetSubAwardFiles(org.kuali.kra.proposaldevelopment.budget.bo.BudgetSubAwards)public void removeSubAwardAttachment(BudgetSubAwards subAward)
removeSubAwardAttachment in interface BudgetSubAwardServicepublic void prepareBudgetSubAwards(Budget budget)
prepareBudgetSubAwards in interface BudgetSubAwardServicepublic void generateSubAwardLineItems(BudgetSubAwards subAward, Budget budget)
generateSubAwardLineItems in interface BudgetSubAwardServiceprotected BudgetPeriod findBudgetPeriod(BudgetSubAwardPeriodDetail detail, Budget budget)
protected BudgetDecimal lesserValue(BudgetDecimal num1, BudgetDecimal num2)
protected BudgetLineItem findOrCreateLineItem(List<BudgetLineItem> lineItems, BudgetSubAwardPeriodDetail subAwardDetail, BudgetSubAwards subAward, BudgetPeriod budgetPeriod, String costElement)
protected List<BudgetLineItem> findSubAwardLineItems(BudgetPeriod budgetPeriod, Integer subAwardNumber)
protected String getLoggedInUserNetworkId()
protected byte[] getXMLFromPDF(com.lowagie.text.pdf.PdfReader reader)
throws Exception
Exceptionprotected Map extractAttachments(com.lowagie.text.pdf.PdfReader reader) throws IOException
IOExceptionprotected static Object[] unpackFile(com.lowagie.text.pdf.PdfReader reader, com.lowagie.text.pdf.PdfDictionary filespec) throws IOException
reader - The object that reads the PDF documentfilespec - The dictonary containing the file specificationsIOExceptionpublic boolean updateSubAwardBudgetDetails(Budget budget, BudgetSubAwards budgetSubAward, List<String[]> errors) throws Exception
BudgetSubAwardServiceupdateSubAwardBudgetDetails in interface BudgetSubAwardServiceExceptionBudgetSubAwardService.updateSubAwardBudgetDetails(org.kuali.kra.budget.core.Budget, org.kuali.kra.proposaldevelopment.budget.bo.BudgetSubAwards, java.util.List)protected BudgetSubAwardPeriodDetail findBudgetSubAwardPeriodDetail(Budget budget, BudgetSubAwards budgetSubAward, Date startDate, Date endDate)
budget - budgetSubAward - startDate - endDate - protected BudgetSubAwards updateXML(byte[] xmlContents, Map fileMap, BudgetSubAwards budgetSubAwardBean, Budget budget) throws Exception
Exceptionpublic void populateBudgetSubAwardAttachments(Budget budget)
BudgetSubAwardServicepopulateBudgetSubAwardAttachments in interface BudgetSubAwardServiceprotected void removeAllEmptyNodes(Document document, String xpath, int parentLevel) throws TransformerException
TransformerExceptionprotected gov.grants.apply.system.globalV10.HashValueDocument.HashValue getValue(byte[] fileBytes)
throws Exception
Exceptionprotected gov.grants.apply.system.globalV10.HashValueDocument.HashValue createHashValueType(String hashValueStr) throws Exception
Exceptionprotected org.kuali.rice.coreservice.framework.parameter.ParameterService getParameterService()
public void setParameterService(org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService)
protected BudgetService getBudgetService()
public void setBudgetService(BudgetService budgetService)
protected org.kuali.rice.krad.service.BusinessObjectService getBusinessObjectService()
public void setBusinessObjectService(org.kuali.rice.krad.service.BusinessObjectService businessObjectService)
Copyright © 2013 The Kuali Foundation. All Rights Reserved.