public class PrintServiceImpl extends Object implements PrintService
| Constructor and Description |
|---|
PrintServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addFileToZip(String path,
String sourceFile,
ZipOutputStream zipOutputStream) |
static void |
addFolderToZip(String path,
String sourceFolder,
ZipOutputStream zipOutputStream) |
protected String |
findSubmittedXml(S2sAppSubmission appSubmission) |
protected byte[] |
getAttContent(ProposalDevelopmentDocument pdDoc,
String contentId)
This method gets attachment contents from narrative based on content ID
|
protected AttachmentDataSource |
getAttributeContent(ProposalDevelopmentDocument pdDoc,
String contentId) |
org.kuali.rice.krad.service.BusinessObjectService |
getBusinessObjectService()
Gets the businessObjectService attribute.
|
protected String |
getFileNameForFormPrinting(ProposalDevelopmentDocument pdDoc) |
protected org.apache.xmlbeans.XmlObject |
getFormObject(gov.grants.apply.system.metaGrantApplication.GrantApplicationDocument submittedXml,
FormMappingInfo info)
This method gets formObject from submitted Application
|
protected S2sAppSubmission |
getLatestS2SAppSubmission(ProposalDevelopmentDocument pdDoc)
This method gets the latest S2SAppSubmission record from the list of
S2SAppSubmissions.
|
protected List<Printable> |
getPDFStream(ProposalDevelopmentDocument pdDoc)
This method is used to generate byte stream of forms
|
PrintingService |
getPrintingService() |
S2SUtilService |
getS2SUtilService()
Gets the s2SUtilService attribute.
|
protected List<String> |
getSortedNameSpaces(List<S2sOppForms> s2sOppForms)
This method sorts all the forms in order as specified in
S2sFormBinding.xml and returns the list of namespaces in sorted order.
|
protected List<Printable> |
getSubmittedPDFStream(ProposalDevelopmentDocument pdDoc)
This method is to write the submitted application data to a pdfStream
|
protected boolean |
isPdfType(byte[] data) |
AttachmentDataSource |
printForm(ProposalDevelopmentDocument pdDoc)
This method is used for the printing of forms in PDF format.
|
byte[] |
printProposalSponsorForms(String proposalNumber,
List<SponsorFormTemplate> sponsorFormTemplates)
Prints the proposal sponsor forms by passing the given proposal
information to
ProposalPrintReader |
protected void |
saveGrantsGovXml(ProposalDevelopmentDocument pdDoc,
boolean formEntryFlag,
org.apache.xmlbeans.XmlObject formObject,
List<AttachmentData> attachmentList,
List<S2sAppAttachments> attachmentLists) |
void |
setBusinessObjectService(org.kuali.rice.krad.service.BusinessObjectService businessObjectService)
Sets the businessObjectService attribute value.
|
protected void |
setFormObject(gov.grants.apply.system.metaGrantApplication.GrantApplicationDocument.GrantApplication.Forms forms,
org.apache.xmlbeans.XmlObject formObject) |
void |
setPrintingService(PrintingService printingService) |
void |
setS2SFormGeneratorService(S2SFormGeneratorService s2SFormGeneratorService)
Setter for
S2SFormGeneratorService |
void |
setS2SUtilService(S2SUtilService utilService)
Sets the s2SUtilService attribute value.
|
void |
setS2SValidatorService(S2SValidatorService s2SValidatorService)
Setter for
S2SFormGeneratorService |
protected void |
setValidationErrorMessage(List<org.kuali.rice.kns.util.AuditError> errors)
This method is to put validation errors on UI
|
protected static byte |
toUnsignedByte(int intVal)
convert int to unsigned byte
|
public byte[] printProposalSponsorForms(String proposalNumber, List<SponsorFormTemplate> sponsorFormTemplates) throws S2SException
ProposalPrintReaderprintProposalSponsorForms in interface PrintServiceproposalNumber - proposal number.sponsorFormTemplates - list of SponsorFormTemplate.S2SExceptionPrintService.printProposalSponsorForms(java.lang.String,
java.util.List)public AttachmentDataSource printForm(ProposalDevelopmentDocument pdDoc) throws S2SException, PrintingException
AttachmentDataSourceprintForm in interface PrintServicepdDoc(ProposalDevelopmentDocument) - AttachmentDataSource which contains all information
related to the generated PDFS2SExceptionPrintingExceptionPrintService.printForm(org.kuali.kra.proposaldevelopment.document.ProposalDevelopmentDocument)protected void saveGrantsGovXml(ProposalDevelopmentDocument pdDoc, boolean formEntryFlag, org.apache.xmlbeans.XmlObject formObject, List<AttachmentData> attachmentList, List<S2sAppAttachments> attachmentLists) throws Exception
Exceptionpublic static void addFolderToZip(String path, String sourceFolder, ZipOutputStream zipOutputStream) throws Exception
Exceptionpublic static void addFileToZip(String path, String sourceFile, ZipOutputStream zipOutputStream) throws Exception
Exceptionprotected String getFileNameForFormPrinting(ProposalDevelopmentDocument pdDoc)
public org.kuali.rice.krad.service.BusinessObjectService getBusinessObjectService()
public void setBusinessObjectService(org.kuali.rice.krad.service.BusinessObjectService businessObjectService)
businessObjectService - The businessObjectService to set.protected List<Printable> getSubmittedPDFStream(ProposalDevelopmentDocument pdDoc) throws S2SException
pdDoc - Proposal Development Document.S2SExceptionprotected String findSubmittedXml(S2sAppSubmission appSubmission)
protected List<Printable> getPDFStream(ProposalDevelopmentDocument pdDoc) throws S2SException
pdDoc - ProposalDevelopmentDocumentbookmarksList - S2SExceptionprotected void setValidationErrorMessage(List<org.kuali.rice.kns.util.AuditError> errors)
errors - List of validation errors which has to be displayed on UI.protected org.apache.xmlbeans.XmlObject getFormObject(gov.grants.apply.system.metaGrantApplication.GrantApplicationDocument submittedXml,
FormMappingInfo info)
submittedXml - GrantApplicationDocument object of the submitted form.info - form mapping information of the form.S2SExceptionprotected byte[] getAttContent(ProposalDevelopmentDocument pdDoc, String contentId)
pdDoc - Proposal Development Document.contentId - for the particular attachment in the Narrative.protected AttachmentDataSource getAttributeContent(ProposalDevelopmentDocument pdDoc, String contentId)
protected S2sAppSubmission getLatestS2SAppSubmission(ProposalDevelopmentDocument pdDoc)
pdDoc - ProposalDevelopmentDocumentS2sAppSubmissionprotected List<String> getSortedNameSpaces(List<S2sOppForms> s2sOppForms)
s2sOppForms - list of S2sOppForms.public void setS2SFormGeneratorService(S2SFormGeneratorService s2SFormGeneratorService)
S2SFormGeneratorServices2SFormGeneratorService - public void setS2SValidatorService(S2SValidatorService s2SValidatorService)
S2SFormGeneratorServices2SValidatorService - protected boolean isPdfType(byte[] data)
protected static byte toUnsignedByte(int intVal)
public S2SUtilService getS2SUtilService()
public void setS2SUtilService(S2SUtilService utilService)
utilService - The s2SUtilService to set.public PrintingService getPrintingService()
public void setPrintingService(PrintingService printingService)
protected void setFormObject(gov.grants.apply.system.metaGrantApplication.GrantApplicationDocument.GrantApplication.Forms forms,
org.apache.xmlbeans.XmlObject formObject)
Copyright © 2013 The Kuali Foundation. All Rights Reserved.