public class PrintingServiceImpl extends Object implements PrintingService
Printable object. It uses the methods available in Printable
object to generate XML, fetch XSL style-sheets, then transforms the XML to a PDF after applying the style sheet.WHITESPACE_LENGTH_60, WHITESPACE_LENGTH_76| Constructor and Description |
|---|
PrintingServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
createBookMark(int xslCount,
String bookmarkKey)
This method...
|
protected void |
createPdfWithFOP(Map<String,byte[]> streamMap,
Map<String,byte[]> pdfByteMap,
org.apache.fop.apps.FopFactory fopFactory,
int xslCount,
StreamSource xslt,
Printable printableArtifact)
This method...
|
protected void |
createPdfWithFOP(Map<String,byte[]> streamMap,
Map<String,byte[]> pdfByteMap,
org.apache.fop.apps.FopFactory fopFactory,
int xslCount,
StreamSource xslt,
String bookmark,
Printable printableArtifact) |
protected String |
formateCalendar(Calendar calendar) |
org.kuali.rice.core.api.datetime.DateTimeService |
getDateTimeService() |
org.kuali.rice.core.api.config.property.ConfigurationService |
getKualiConfigurationService() |
protected Map<String,byte[]> |
getPrintBytes(Printable printableArtifact)
This method receives a
Printable object, generates XML for it, transforms into PDF after applying style-sheet and
returns the PDF bytes as AttachmentDataSource |
String |
getReportName()
This method is to supply the report name.
|
WatermarkService |
getWatermarkService()
Gets the watermarkService attribute.
|
protected String |
getWhitespaceString(int length) |
protected boolean |
isPdfGoodToMerge(byte[] pdfBytes) |
protected void |
logPrintDetails(Map<String,byte[]> xmlStreamMap) |
protected byte[] |
mergePdfBytes(List<byte[]> pdfBytesList,
List<String> bookmarksList,
boolean headerFooterRequired) |
AttachmentDataSource |
print(List<Printable> printableArtifactList)
This method receives a
List of Printable object, generates XML for it, transforms into PDF after applying
style-sheet and returns the PDF bytes as AttachmentDataSource |
AttachmentDataSource |
print(List<Printable> printableArtifactList,
boolean headerFooterRequired) |
AttachmentDataSource |
print(Printable printableArtifacts)
This method receives a
Printable object, generates XML for it, transforms into PDF after applying style-sheet and
returns the PDF bytes as AttachmentDataSource |
void |
setDateTimeService(org.kuali.rice.core.api.datetime.DateTimeService dateTimeService) |
void |
setKualiConfigurationService(org.kuali.rice.core.api.config.property.ConfigurationService kualiConfigurationService) |
void |
setWatermarkService(WatermarkService watermarkService)
Sets the watermarkService attribute value.
|
protected Map<String,byte[]> getPrintBytes(Printable printableArtifact) throws PrintingException
Printable object, generates XML for it, transforms into PDF after applying style-sheet and
returns the PDF bytes as AttachmentDataSourceprintableArtifact - to be printedAttachmentDataSource PDF bytesPrintingException - in case of any errors occur during printing processprotected void createPdfWithFOP(Map<String,byte[]> streamMap, Map<String,byte[]> pdfByteMap, org.apache.fop.apps.FopFactory fopFactory, int xslCount, StreamSource xslt, Printable printableArtifact) throws org.apache.fop.apps.FOPException, TransformerException
streamMap - pdfByteMap - fopFactory - xslCount - transformer - org.apache.fop.apps.FOPExceptionTransformerExceptionprotected void createPdfWithFOP(Map<String,byte[]> streamMap, Map<String,byte[]> pdfByteMap, org.apache.fop.apps.FopFactory fopFactory, int xslCount, StreamSource xslt, String bookmark, Printable printableArtifact) throws org.apache.fop.apps.FOPException, TransformerException
org.apache.fop.apps.FOPExceptionTransformerExceptionprotected String createBookMark(int xslCount, String bookmarkKey)
xslCount - xmlData - public AttachmentDataSource print(Printable printableArtifacts) throws PrintingException
Printable object, generates XML for it, transforms into PDF after applying style-sheet and
returns the PDF bytes as AttachmentDataSourceprint in interface PrintingServiceprintableArtifact - to be printedAttachmentDataSource PDF bytesPrintingException - in case of any errors occur during printing processpublic AttachmentDataSource print(List<Printable> printableArtifactList) throws PrintingException
List of Printable object, generates XML for it, transforms into PDF after applying
style-sheet and returns the PDF bytes as AttachmentDataSourceprint in interface PrintingServiceList - of printableArtifact to be printedAttachmentDataSource PDF bytesPrintingException - in case of any errors occur during printing processpublic AttachmentDataSource print(List<Printable> printableArtifactList, boolean headerFooterRequired) throws PrintingException
PrintingExceptionprotected boolean isPdfGoodToMerge(byte[] pdfBytes)
public String getReportName()
PrintingServicegetReportName in interface PrintingServiceprotected byte[] mergePdfBytes(List<byte[]> pdfBytesList, List<String> bookmarksList, boolean headerFooterRequired) throws PrintingException
pdfBytesList - List containing the PDF data bytesbookmarksList - List of bookmarks corresponding to the PDF bytes.PrintingExceptionpublic org.kuali.rice.core.api.datetime.DateTimeService getDateTimeService()
public void setDateTimeService(org.kuali.rice.core.api.datetime.DateTimeService dateTimeService)
dateTimeService - the dateTimeService to setprotected String getWhitespaceString(int length)
protected void logPrintDetails(Map<String,byte[]> xmlStreamMap) throws PrintingException
PrintingExceptionpublic void setKualiConfigurationService(org.kuali.rice.core.api.config.property.ConfigurationService kualiConfigurationService)
public org.kuali.rice.core.api.config.property.ConfigurationService getKualiConfigurationService()
public WatermarkService getWatermarkService()
public void setWatermarkService(WatermarkService watermarkService)
watermarkService - The watermarkService to set.Copyright © 2013 The Kuali Foundation. All Rights Reserved.