|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.kuali.kfs.fp.document.service.impl.CashReceiptCoverSheetServiceImpl
public class CashReceiptCoverSheetServiceImpl
Implementation of service for handling creation of the cover sheet of the CashReceiptDocument
| Field Summary | |
|---|---|
static String |
CR_COVERSHEET_TEMPLATE_NM
|
| Constructor Summary | |
|---|---|
CashReceiptCoverSheetServiceImpl()
|
|
| Method Summary | |
|---|---|
void |
generateCoverSheet(CashReceiptDocument document,
String searchPath,
OutputStream returnStream)
Generate a cover sheet for the . |
protected float |
getCurrentRenderingYPosition()
Defines a state of Y position for the text. |
org.kuali.rice.kns.service.DataDictionaryService |
getDataDictionaryService()
Gets the dataDictionaryService attribute. |
org.kuali.rice.kns.service.DocumentHelperService |
getDocumentHelperService()
Gets the documentHelperService attribute. |
protected com.lowagie.text.pdf.BaseFont |
getTextFont()
Read-only accessor for . |
boolean |
isCoverSheetPrintingAllowed(CashReceiptDocument crDoc)
This method determines if cover sheet printing is allowed by reviewing the CashReceiptDocumentRule to see if the cover sheet is printable. |
protected void |
populateCheckDetail(CashReceiptDocument crDoc,
com.lowagie.text.pdf.PdfWriter writer,
com.lowagie.text.pdf.PdfReader reader)
Method responsible for producing Check Detail section of the cover sheet. |
protected void |
setCurrentRenderingYPosition(float y)
Defines a state of Y position for the text. |
void |
setDataDictionaryService(org.kuali.rice.kns.service.DataDictionaryService dataDictionaryService)
Sets the dataDictionaryService attribute value. |
void |
setDocumentHelperService(org.kuali.rice.kns.service.DocumentHelperService documentHelperService)
Sets the documentHelperService attribute value. |
protected void |
stampPdfFormValues(CashReceiptDocument document,
String searchPath,
OutputStream returnStream)
Use iText to stamp information from into field
values on a PDF Form Template. |
protected com.lowagie.text.pdf.PdfContentByte |
startNewPage(com.lowagie.text.pdf.PdfWriter writer,
com.lowagie.text.pdf.PdfReader reader,
org.kuali.kfs.fp.document.service.impl.ModifiableInteger pageNumber)
Responsible for creating a new PDF page and workspace through for direct writing to the
PDF. |
protected void |
writeCheckAmount(com.lowagie.text.pdf.PdfContentByte output,
Check check)
This method writes the check amount from the check provided to the PDF template. |
protected void |
writeCheckDate(com.lowagie.text.pdf.PdfContentByte output,
Check check)
This method writes the check date from the check provided to the PDF template. |
protected void |
writeCheckDescription(com.lowagie.text.pdf.PdfContentByte output,
Check check)
This method writes the check description from the check provided to the PDF template. |
protected void |
writeCheckField(com.lowagie.text.pdf.PdfContentByte output,
float xPos,
String fieldValue)
This method writes out the value provided to the output provided and aligns the value outputted using the xPos float provided. |
protected void |
writeCheckNumber(com.lowagie.text.pdf.PdfContentByte output,
Check check)
This method writes the check number from the check provided to the PDF template. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String CR_COVERSHEET_TEMPLATE_NM
| Constructor Detail |
|---|
public CashReceiptCoverSheetServiceImpl()
| Method Detail |
|---|
public boolean isCoverSheetPrintingAllowed(CashReceiptDocument crDoc)
isCoverSheetPrintingAllowed in interface CashReceiptCoverSheetServicecrDoc - The document the cover sheet is being printed for.
CashReceiptCoverSheetService.isCoverSheetPrintingAllowed(org.kuali.kfs.fp.document.CashReceiptDocument),
org.kuali.kfs.fp.document.validation.impl.CashReceiptDocumentRule#isCoverSheetPrintable(org.kuali.kfs.fp.document.CashReceiptFamilyBase)
public void generateCoverSheet(CashReceiptDocument document,
String searchPath,
OutputStream returnStream)
throws Exception
CashReceiptDocument. An OutputStream is written
to for the cover sheet.
generateCoverSheet in interface CashReceiptCoverSheetServicedocument - The cash receipt document the cover sheet is for.searchPath - The directory path to the template to be used to generate the cover sheet.returnStream - The output stream the cover sheet will be written to.
com.lowagie.text.DocumentException - Thrown if the document provided is invalid, including null.
IOException - Thrown if there is a problem writing to the output stream.
Exception - Thrown if there are any problems generating the cover sheet.org.kuali.rice.kns.module.financial.service.CashReceiptCoverSheetServiceImpl#generateCoverSheet(
org.kuali.module.financial.documentCashReceiptDocument )
protected void stampPdfFormValues(CashReceiptDocument document,
String searchPath,
OutputStream returnStream)
throws Exception
PdfStamper to stamp information from CashReceiptDocument into field
values on a PDF Form Template.
document - The cash receipt document the values will be pulled from.searchPath - The directory path of the template to be used to generate the cover sheet.returnStream - The output stream the cover sheet will be written to.
Exception
protected void writeCheckNumber(com.lowagie.text.pdf.PdfContentByte output,
Check check)
output - The PDF output field the check number will be written to.check - The check the check number will be retrieved from.
protected void writeCheckDate(com.lowagie.text.pdf.PdfContentByte output,
Check check)
output - The PDF output field the check date will be written to.check - The check the check date will be retrieved from.
protected void writeCheckDescription(com.lowagie.text.pdf.PdfContentByte output,
Check check)
output - The PDF output field the check description will be written to.check - The check the check description will be retrieved from.
protected void writeCheckAmount(com.lowagie.text.pdf.PdfContentByte output,
Check check)
output - The PDF output field the check amount will be written to.check - The check the check amount will be retrieved from.
protected void writeCheckField(com.lowagie.text.pdf.PdfContentByte output,
float xPos,
String fieldValue)
output - The content byte used to write out the field to the PDF template.xPos - The x coordinate of the starting point on the document where the value will be written to.fieldValue - The value to be written to the PDF cover sheet.
protected com.lowagie.text.pdf.BaseFont getTextFont()
throws com.lowagie.text.DocumentException,
IOException
BaseFont. Used for creating the check detail information. The font being
used is Helvetica.
com.lowagie.text.DocumentException
IOExceptionprotected void setCurrentRenderingYPosition(float y)
y - The y coordinate to be set.protected float getCurrentRenderingYPosition()
protected void populateCheckDetail(CashReceiptDocument crDoc,
com.lowagie.text.pdf.PdfWriter writer,
com.lowagie.text.pdf.PdfReader reader)
throws Exception
crDoc - The CashReceipt document the cover sheet is being created for.writer - The output writer used to write the check data to the PDF file.reader - The input reader used to read data from the PDF file.
Exception
protected com.lowagie.text.pdf.PdfContentByte startNewPage(com.lowagie.text.pdf.PdfWriter writer,
com.lowagie.text.pdf.PdfReader reader,
org.kuali.kfs.fp.document.service.impl.ModifiableInteger pageNumber)
throws com.lowagie.text.DocumentException,
IOException
PdfContentByte for direct writing to the
PDF.
writer - The PDF writer used to write to the new page with.reader - The PDF reader used to read information from the PDF file.pageNumber - The current number of pages in the PDF file, which will be incremented by one inside this method.
com.lowagie.text.DocumentException
IOExceptionpublic org.kuali.rice.kns.service.DataDictionaryService getDataDictionaryService()
public void setDataDictionaryService(org.kuali.rice.kns.service.DataDictionaryService dataDictionaryService)
dataDictionaryService - The dataDictionaryService to set.public org.kuali.rice.kns.service.DocumentHelperService getDocumentHelperService()
public void setDocumentHelperService(org.kuali.rice.kns.service.DocumentHelperService documentHelperService)
documentHelperService - The documentHelperService to set.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||