org.kuali.kfs.fp.document.service.impl
Class DisbursementVoucherCoverSheetServiceImpl

java.lang.Object
  extended by org.kuali.kfs.fp.document.service.impl.DisbursementVoucherCoverSheetServiceImpl
All Implemented Interfaces:
DisbursementVoucherCoverSheetService

public class DisbursementVoucherCoverSheetServiceImpl
extends Object
implements DisbursementVoucherCoverSheetService

This is the default implementation of the DisbursementVoucherCoverSheetService interface.


Constructor Summary
DisbursementVoucherCoverSheetServiceImpl()
           
 
Method Summary
 void generateDisbursementVoucherCoverSheet(String templateDirectory, String templateName, DisbursementVoucherDocument document, OutputStream outputStream)
          This method uses the values provided to build and populate a cover sheet associated with a given DisbursementVoucher.
protected  String getValueForKey(org.kuali.rice.kns.lookup.keyvalues.KeyValuesFinder keyValuesFinder, String key)
          This method is a helper method to retrieve values from a list based on a primary key provided.
 boolean isCoverSheetPrintable(DisbursementVoucherDocument document)
          checks the status of the document to see if the cover sheet is printable
protected  String retrieveAddress(String docLocCd)
          This method contains logic to determine the address the cover sheet should be sent to.
protected  org.kuali.rice.kns.bo.PersistableBusinessObject retrieveObjectByKey(Class clazz, String keyValue)
          This method is used to retrieve business objects that have a single primary key field without hard-coding the key field name.
 void setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService businessObjectService)
          Sets the businessObjectService attribute value.
 void setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)
          Sets the parameterService attribute value.
 void setPersistenceStructureService(org.kuali.rice.kns.service.PersistenceStructureService persistenceStructureService)
          Sets the persistenceStructureService attribute value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DisbursementVoucherCoverSheetServiceImpl

public DisbursementVoucherCoverSheetServiceImpl()
Method Detail

generateDisbursementVoucherCoverSheet

public void generateDisbursementVoucherCoverSheet(String templateDirectory,
                                                  String templateName,
                                                  DisbursementVoucherDocument document,
                                                  OutputStream outputStream)
                                           throws com.lowagie.text.DocumentException,
                                                  IOException
This method uses the values provided to build and populate a cover sheet associated with a given DisbursementVoucher.

Specified by:
generateDisbursementVoucherCoverSheet in interface DisbursementVoucherCoverSheetService
Parameters:
templateDirectory - The directory where the cover sheet template can be found.
templateName - The name of the cover sheet template to be used to build the cover sheet.
document - The DisbursementVoucher the cover sheet will be populated from.
outputStream - The stream the cover sheet file will be written to.
Throws:
com.lowagie.text.DocumentException - Thrown if there is a problem pulling data from the document to create the cover sheet.
IOException - Thrown if there is a problem writing the cover sheet to the output stream.
See Also:
DisbursementVoucherCoverSheetService.generateDisbursementVoucherCoverSheet(java.lang.String, java.lang.String, org.kuali.kfs.fp.document.DisbursementVoucherDocument, java.io.OutputStream)

isCoverSheetPrintable

public boolean isCoverSheetPrintable(DisbursementVoucherDocument document)
Description copied from interface: DisbursementVoucherCoverSheetService
checks the status of the document to see if the cover sheet is printable

Specified by:
isCoverSheetPrintable in interface DisbursementVoucherCoverSheetService
Parameters:
document - submitted document
Returns:
true if document is not canceled, initiated, disapproved, exception, or saved
See Also:
DisbursementVoucherCoverSheetService.isCoverSheetPrintable(org.kuali.kfs.fp.document.DisbursementVoucherDocument)

retrieveObjectByKey

protected org.kuali.rice.kns.bo.PersistableBusinessObject retrieveObjectByKey(Class clazz,
                                                                              String keyValue)
This method is used to retrieve business objects that have a single primary key field without hard-coding the key field name.

Parameters:
clazz - The class type that will be used to retrieve the primary key field names.
keyValue - The primary key value to be used to lookup the object by.
Returns:
An instance of a business object matching the class type and primary key value given.

getValueForKey

protected String getValueForKey(org.kuali.rice.kns.lookup.keyvalues.KeyValuesFinder keyValuesFinder,
                                String key)
This method is a helper method to retrieve values from a list based on a primary key provided.

Parameters:
keyValuesFinder - KeyValuesFinder that the value will be retrieved from.
key - The key to the value being retrieved.
Returns:
The value associated with the key provided, or empty string if no value is found.

retrieveAddress

protected String retrieveAddress(String docLocCd)
This method contains logic to determine the address the cover sheet should be sent to.

Parameters:
docLocCd - A key used to retrieve the document location.
Returns:
The address the cover sheet will be sent to or empty string if no location is found.

setBusinessObjectService

public void setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService businessObjectService)
Sets the businessObjectService attribute value.

Parameters:
businessObjectService - The businessObjectService to set.

setPersistenceStructureService

public void setPersistenceStructureService(org.kuali.rice.kns.service.PersistenceStructureService persistenceStructureService)
Sets the persistenceStructureService attribute value.

Parameters:
persistenceStructureService - The persistenceService to set.

setParameterService

public void setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)
Sets the parameterService attribute value.

Parameters:
parameterService - The parameterService to set.


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