public class AdminPdfMgr extends AdminBaseMgr implements AdminPdfMgrIf
Modifier and Type | Class and Description |
---|---|
protected class |
AdminPdfMgr.StaticData |
Modifier and Type | Field and Description |
---|---|
protected static org.apache.commons.logging.Log |
log
the log
|
protected static java.lang.String |
mutex |
protected static java.util.Map<java.lang.String,AdminPdfMgr.StaticData> |
staticDataHM
Hash Map that contains the static data
|
adminEng, baseMgrMutex, baseStaticDataHM, cDataEnd, cDataStart, debugStackTraceExclusions, kkAdminPropsFilePath, kkConf, kkInstanceId, mgrFactory, STORE_ID, templateBaseDir
Constructor and Description |
---|
AdminPdfMgr(KKAdminIf eng)
Constructor
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
createPdfDirNameAfterBase(PdfOptions options)
Returns the directory name (after the base part) where the PDF file will be generated
|
java.lang.String |
createPdfFileNameLastPart(PdfOptions options)
For creating a file name for the PDF file to be generated.
|
void |
createPDFFromHTML(PdfOptions options,
java.lang.String html,
java.lang.String pdfFileName)
Created the PDF file from the specified HTML String
|
java.lang.String |
getFullPdfFileName(java.lang.String dirPath,
java.lang.String pdfFileNameAfterBasePath)
For creating a file name for the PDF file to be generated
|
PdfResult |
getPdf(PdfOptions options)
Create the PDF document and return the URL, File name or bytes as defined by the input
options.
|
java.lang.String |
getPdfFileBasePath()
Get the base path for the PDF files from the configuration parameter.
|
java.lang.String |
getUUID()
Returns a UUID to add to the PDF file name to make it unique and hard to guess
|
java.lang.String |
modifyHtml(java.lang.String html)
A customisation point to allow for modification of the HTML prior to being converted to PDF
|
void |
refreshConfigs()
Retrieve some commonly-used properties and set the velocity log file location
|
org.xhtmlrenderer.pdf.ITextRenderer |
renderHtml(java.lang.String html)
Render the HTML and return the ITextRenderer object for further processing
|
addInsertAttr, addInsertAttr, addStringRuleConstraint, addStringRuleConstraint, checkAPICallEnabled, checkIntInRange, checkIntIsSet, checkRequired, executeQuery, executeQuery, getAdminAddressMgr, getAdminAuditMgr, getAdminBillingMgr, getAdminBookableProductMgr, getAdminCatMgr, getAdminConfigMgr, getAdminContentMgr, getAdminCurrMgr, getAdminCustMgr, getAdminCustPwdHistMgr, getAdminCustTagMgr, getAdminEmailMgr, getAdminEng, getAdminEngineCacheMgr, getAdminEventMgr, getAdminExecuteMgr, getAdminFileMgr, getAdminFilterMgr, getAdminHtmlMgr, getAdminImportMgr, getAdminLanguageMgr, getAdminManuMgr, getAdminMessageMgr, getAdminMiscItemMgr, getAdminMiscPriceMgr, getAdminModulesMgr, getAdminMultiStoreMgr, getAdminOrderMgr, getAdminPdfMgr, getAdminProdAttrMgr, getAdminProdMgr, getAdminPromMgr, getAdminReviewMgr, getAdminSearchRuleMgr, getAdminSecMgr, getAdminServletMgr, getAdminShipmentMgr, getAdminSolrMgr, getAdminStoreMgr, getAdminSuggestionMgr, getAdminTagMgr, getAdminTaxMgr, getAdminValidationMgr, getAdminVelocityContextMgr, getAdminWishListMgr, getBooleanFromString, getDebugStackTraceExclusions, getEmailThreadGracefulShutdownTimeout, getExportMgr, getExportMgr, getExportXMLData, getIntFromString, getKkAdminPropsFilePath, getKkConfig, getKkInstanceId, getMode, getModeString, getMqMgr, getNewCriteria, getNewCriteria, getNewCriteria, getNewCriteria, getOtherModuleByName, getPostSearchText, getPreSearchText, getProductsToCategoresCriteria, getPropertyValue, getPropertyValue, getPropertyValueAsBool, getPropertyValueAsInt, getPropertyValueAsLong, getRecordCount, getRecordCount, getRewardPointMgr, getSingleIntResult, getStoreId, getTemplate, getTemplateBase, getXml_io, init, insertKKEvent, insertKKEvent, isBusiness, isBusinessOrEnterprise, isCommunity, isConfigSet, isEnterprise, isMultiStoreLanguagesShared, isMultiStoreMode, isMultiStoreShareCategories, isMultiStoreShareCustomers, isMultiStoreShareCustomersOrProducts, isMultiStoreShareProducts, isMultiStoreSingleDBCSMode, isMultiStoreSingleDBMode, isMultiStoreSingleDBNonCSMode, isUnix, isWindows, manageException, manageThrowable, removeCData, sendMQMessages, setAdminEng, setDebugStackTraceExclusions, setKkAdminPropsFilePath, setupWildCardRules, setWildCardAfter, setWildCardBefore, shutdownGracefully, shutdownGracefully, timestampStr, updateStaticVariablesNow
protected static org.apache.commons.logging.Log log
protected static java.lang.String mutex
protected static java.util.Map<java.lang.String,AdminPdfMgr.StaticData> staticDataHM
public AdminPdfMgr(KKAdminIf eng) throws java.lang.Exception
eng
- KKAdmin enginejava.lang.Exception
- an unexpected exceptionpublic PdfResult getPdf(PdfOptions options) throws java.lang.Exception
getPdf
in interface AdminPdfMgrIf
options
- the options that define the PDF report to be produced and what is returned from
this interface. If the html attribute on PdfOptions is set this is used as the
source for the PDF otherwise getHtml on the AdminHgetAdminHtmlMgr is called to
produce the HTML.java.lang.Exception
- an unexpected exceptionpublic java.lang.String createPdfDirNameAfterBase(PdfOptions options)
options
- The PdfOptions that were specified for creating the PDF filepublic java.lang.String createPdfFileNameLastPart(PdfOptions options)
options
- The PdfOptions that were specified for creating the PDF filepublic java.lang.String getFullPdfFileName(java.lang.String dirPath, java.lang.String pdfFileNameAfterBasePath)
dirPath
- the directory path for the PDF filespdfFileNameAfterBasePath
- The PDF file name appended after the base pathpublic java.lang.String getPdfFileBasePath() throws KKAdminException
KKAdminException
- unexpected exception in the KonaKart Admin Enginepublic java.lang.String getUUID()
public void createPDFFromHTML(PdfOptions options, java.lang.String html, java.lang.String pdfFileName) throws java.lang.Exception
createPDFFromHTML
in interface AdminPdfMgrIf
options
- the PdfOptions options object which might one day be used to affect the PDF
generation if this method is overriden.html
- the HTML String to convert into a PDF filepdfFileName
- the target pdfFileNamejava.lang.Exception
- an unexpected exceptionpublic java.lang.String modifyHtml(java.lang.String html) throws java.lang.Exception
modifyHtml
in interface AdminPdfMgrIf
html
- the HTML to modifyjava.lang.Exception
- an unexpected exceptionpublic org.xhtmlrenderer.pdf.ITextRenderer renderHtml(java.lang.String html)
html
- the htmlpublic void refreshConfigs() throws java.lang.Exception
refreshConfigs
in interface AdminPdfMgrIf
refreshConfigs
in class AdminBaseMgr
java.lang.Exception
- an unexpected exceptionCopyright © 2018 DS Data Systems UK Ltd.