@Component(value="s2SPrintingService") public class S2SPrintingServiceImpl extends Object implements S2SPrintingService
S2SPrintable
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.Modifier and Type | Field and Description |
---|---|
static String |
PDF_FILE_EXTENSION |
static String |
PDF_REPORT_CONTENT_TYPE |
char |
SPACE_SEPARATOR |
int |
WHITESPACE_LENGTH_60 |
int |
WHITESPACE_LENGTH_76 |
Constructor and Description |
---|
S2SPrintingServiceImpl() |
Modifier and Type | Method and Description |
---|---|
protected String |
createBookMark(int xslCount,
String bookmarkKey) |
protected void |
createPdfWithFOP(Map<String,byte[]> streamMap,
Map<String,byte[]> pdfByteMap,
org.apache.fop.apps.FopFactory fopFactory,
int xslCount,
StreamSource xslt,
S2SPrintable printableArtifact) |
protected void |
createPdfWithFOP(Map<String,byte[]> streamMap,
Map<String,byte[]> pdfByteMap,
org.apache.fop.apps.FopFactory fopFactory,
int xslCount,
StreamSource xslt,
String bookmark,
S2SPrintable printableArtifact) |
protected String |
formateCalendar(Calendar calendar) |
protected Map<String,byte[]> |
getPrintBytes(S2SPrintable printableArtifact)
This method receives a
S2SPrintable object, generates XML for it, transforms into PDF after applying style-sheet and
returns the PDF bytes |
protected String |
getReportName() |
org.kuali.coeus.propdev.api.s2s.S2SConfigurationService |
getS2SConfigurationService() |
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) |
S2SFile |
print(List<S2SPrintable> printableArtifactList)
This method receives a
List of S2SPrintable object, generates XML for it, transforms into PDF after applying
style-sheet and returns the PDF bytes as S2SFile |
S2SFile |
print(List<S2SPrintable> printableArtifactList,
boolean headerFooterRequired) |
S2SFile |
print(S2SPrintable printableArtifacts)
This method receives a
S2SPrintable object, generates XML for it, transforms into PDF after applying style-sheet and
returns the PDF bytes as S2SFile |
void |
setS2SConfigurationService(org.kuali.coeus.propdev.api.s2s.S2SConfigurationService s2SConfigurationService) |
public static final String PDF_REPORT_CONTENT_TYPE
public static final String PDF_FILE_EXTENSION
public char SPACE_SEPARATOR
public int WHITESPACE_LENGTH_76
public int WHITESPACE_LENGTH_60
public S2SPrintingServiceImpl()
protected Map<String,byte[]> getPrintBytes(S2SPrintable printableArtifact)
S2SPrintable
object, generates XML for it, transforms into PDF after applying style-sheet and
returns the PDF bytesprintableArtifact
- to be printedprotected void createPdfWithFOP(Map<String,byte[]> streamMap, Map<String,byte[]> pdfByteMap, org.apache.fop.apps.FopFactory fopFactory, int xslCount, StreamSource xslt, S2SPrintable printableArtifact) throws org.apache.fop.apps.FOPException, TransformerException
org.apache.fop.apps.FOPException
TransformerException
protected void createPdfWithFOP(Map<String,byte[]> streamMap, Map<String,byte[]> pdfByteMap, org.apache.fop.apps.FopFactory fopFactory, int xslCount, StreamSource xslt, String bookmark, S2SPrintable printableArtifact) throws org.apache.fop.apps.FOPException, TransformerException
org.apache.fop.apps.FOPException
TransformerException
protected String createBookMark(int xslCount, String bookmarkKey)
public S2SFile print(S2SPrintable printableArtifacts)
S2SPrintable
object, generates XML for it, transforms into PDF after applying style-sheet and
returns the PDF bytes as S2SFile
print
in interface S2SPrintingService
printableArtifacts
- to be printedpublic S2SFile print(List<S2SPrintable> printableArtifactList)
List
of S2SPrintable
object, generates XML for it, transforms into PDF after applying
style-sheet and returns the PDF bytes as S2SFile
print
in interface S2SPrintingService
printableArtifactList
- List of printableArtifact to be printedS2SFile
PDF bytespublic S2SFile print(List<S2SPrintable> printableArtifactList, boolean headerFooterRequired)
protected boolean isPdfGoodToMerge(byte[] pdfBytes)
protected String getReportName()
protected byte[] mergePdfBytes(List<byte[]> pdfBytesList, List<String> bookmarksList, boolean headerFooterRequired)
pdfBytesList
- List containing the PDF data bytesbookmarksList
- List of bookmarks corresponding to the PDF bytes.protected String formateCalendar(Calendar calendar)
protected String getWhitespaceString(int length)
protected void logPrintDetails(Map<String,byte[]> xmlStreamMap)
public org.kuali.coeus.propdev.api.s2s.S2SConfigurationService getS2SConfigurationService()
public void setS2SConfigurationService(org.kuali.coeus.propdev.api.s2s.S2SConfigurationService s2SConfigurationService)
Copyright © 2014–2015 The Kuali Foundation. All rights reserved.