org.kuali.kfs.module.ar.batch.service.impl
Class CustomerInvoiceWriteoffBatchServiceImpl

java.lang.Object
  extended by org.kuali.kfs.module.ar.batch.service.impl.CustomerInvoiceWriteoffBatchServiceImpl
All Implemented Interfaces:
CustomerInvoiceWriteoffBatchService

public class CustomerInvoiceWriteoffBatchServiceImpl
extends Object
implements CustomerInvoiceWriteoffBatchService


Constructor Summary
CustomerInvoiceWriteoffBatchServiceImpl()
           
 
Method Summary
 String createBatchDrop(org.kuali.rice.kim.bo.Person person, CustomerInvoiceWriteoffBatchVO writeoffBatchVO)
          Accepts a batch VO full of invoiceNumbers to be written off in batch.
protected  void createCustomerInvoiceWriteoffDocumentsFromBatchVO(CustomerInvoiceWriteoffBatchVO batchVO, com.lowagie.text.Document pdfdoc)
           
protected  void createDoneFile(String filename)
           
protected  String doneFileName(String filename)
           
protected  String dropXmlFile(org.kuali.rice.kim.bo.Person person, Document xmldoc)
           
protected  String getBatchFilePathAndName(org.kuali.rice.kim.bo.Person person)
           
protected  String getBatchXMLNamespace()
           
protected  CustomerInvoiceWriteoffDocumentService getInvoiceWriteoffDocumentService()
           
protected  List<String> getListOfFilesToProcess()
           
protected  com.lowagie.text.Document getPdfDoc()
           
protected  org.kuali.rice.kim.service.PersonService<org.kuali.rice.kim.bo.Person> getPersonService()
           
 boolean loadFile(String fileName, com.lowagie.text.Document pdfdoc)
           
 boolean loadFiles()
           
protected  void removeDoneFiles(List<String> dataFileNames)
          Clears out associated .done files for the processed data files.
protected  byte[] safelyLoadFileBytes(String fileName)
          Accepts a file name and returns a byte-array of the file name contents, if possible.
 void setBatchInputFileService(BatchInputFileService batchInputFileService)
           
 void setBatchInputFileType(BatchInputFileType batchInputFileType)
           
 void setCustomerService(CustomerService customerService)
           
 void setDateTimeService(org.kuali.rice.kns.service.DateTimeService dateTimeService)
           
 void setInvoiceDocumentService(CustomerInvoiceDocumentService invoiceDocumentService)
           
 void setReportsDirectory(String reportsDirectory)
           
protected  Document transformVOtoXml(CustomerInvoiceWriteoffBatchVO writeoffBatchVO)
           
protected  void writeFileNameSectionTitle(com.lowagie.text.Document pdfDoc, String filenameLine)
           
protected  void writeInvoiceSectionMessage(com.lowagie.text.Document pdfDoc, String resultLine)
           
protected  void writeInvoiceSectionTitle(com.lowagie.text.Document pdfDoc, String customerNameLine)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomerInvoiceWriteoffBatchServiceImpl

public CustomerInvoiceWriteoffBatchServiceImpl()
Method Detail

loadFiles

public boolean loadFiles()
Specified by:
loadFiles in interface CustomerInvoiceWriteoffBatchService

removeDoneFiles

protected void removeDoneFiles(List<String> dataFileNames)
Clears out associated .done files for the processed data files.


loadFile

public boolean loadFile(String fileName,
                        com.lowagie.text.Document pdfdoc)

createCustomerInvoiceWriteoffDocumentsFromBatchVO

protected void createCustomerInvoiceWriteoffDocumentsFromBatchVO(CustomerInvoiceWriteoffBatchVO batchVO,
                                                                 com.lowagie.text.Document pdfdoc)
See Also:
org.kuali.kfs.module.ar.document.service.CustomerInvoiceWriteoffDocumentService#createCustomerInvoiceWriteoffDocumentsFromBatchVO(org.kuali.kfs.module.ar.batch.vo.CustomerInvoiceWriteoffBatchVO)

safelyLoadFileBytes

protected byte[] safelyLoadFileBytes(String fileName)
Accepts a file name and returns a byte-array of the file name contents, if possible. Throws RuntimeExceptions if FileNotFound or IOExceptions occur.

Parameters:
fileName - String containing valid path & filename (relative or absolute) of file to load.
Returns:
A Byte Array of the contents of the file.

getListOfFilesToProcess

protected List<String> getListOfFilesToProcess()

getPdfDoc

protected com.lowagie.text.Document getPdfDoc()

writeFileNameSectionTitle

protected void writeFileNameSectionTitle(com.lowagie.text.Document pdfDoc,
                                         String filenameLine)

writeInvoiceSectionTitle

protected void writeInvoiceSectionTitle(com.lowagie.text.Document pdfDoc,
                                        String customerNameLine)

writeInvoiceSectionMessage

protected void writeInvoiceSectionMessage(com.lowagie.text.Document pdfDoc,
                                          String resultLine)

createBatchDrop

public String createBatchDrop(org.kuali.rice.kim.bo.Person person,
                              CustomerInvoiceWriteoffBatchVO writeoffBatchVO)
Description copied from interface: CustomerInvoiceWriteoffBatchService
Accepts a batch VO full of invoiceNumbers to be written off in batch. Creates an XML file and drops it in the batch service staging area, to be processed next time the job runs.

Specified by:
createBatchDrop in interface CustomerInvoiceWriteoffBatchService
Parameters:
person - KIM person who is credited with creating the batch file.
writeoffBatchVO - Populated batch VO full of invoice numbers.
Returns:
True if everything worked, False if it failed.
See Also:
org.kuali.kfs.module.ar.batch.service.CustomerInvoiceWriteoffBatchService#createBatchDrop(org.kuali.kfs.module.ar.batch.vo.CustomerInvoiceWriteoffBatchVO)

getBatchXMLNamespace

protected String getBatchXMLNamespace()

doneFileName

protected String doneFileName(String filename)

createDoneFile

protected void createDoneFile(String filename)

getBatchFilePathAndName

protected String getBatchFilePathAndName(org.kuali.rice.kim.bo.Person person)

dropXmlFile

protected String dropXmlFile(org.kuali.rice.kim.bo.Person person,
                             Document xmldoc)

transformVOtoXml

protected Document transformVOtoXml(CustomerInvoiceWriteoffBatchVO writeoffBatchVO)

getInvoiceWriteoffDocumentService

protected CustomerInvoiceWriteoffDocumentService getInvoiceWriteoffDocumentService()

setDateTimeService

public void setDateTimeService(org.kuali.rice.kns.service.DateTimeService dateTimeService)

setBatchInputFileService

public void setBatchInputFileService(BatchInputFileService batchInputFileService)

setBatchInputFileType

public void setBatchInputFileType(BatchInputFileType batchInputFileType)

setReportsDirectory

public void setReportsDirectory(String reportsDirectory)

getPersonService

protected org.kuali.rice.kim.service.PersonService<org.kuali.rice.kim.bo.Person> getPersonService()
Returns:
Returns the personService.

setCustomerService

public void setCustomerService(CustomerService customerService)

setInvoiceDocumentService

public void setInvoiceDocumentService(CustomerInvoiceDocumentService invoiceDocumentService)


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.