public abstract class PublishOutputModuleBase extends java.lang.Object implements IPublishOutputModule
IPublishOutputModule
contains
convenience methods for file path generation. Clients should consider
extending this class.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DATE_FORMAT_NOW
The date format used by
#generateFilenameWithDate(String, String) |
Constructor and Description |
---|
PublishOutputModuleBase() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
generateFilenameWithDate(java.lang.String name)
Generates a string containing the current date followed by the given
name.
|
protected java.io.InputStream |
getDefaultXsltInputStream() |
java.lang.String |
getFilePath() |
java.lang.String |
getFilePath(java.io.File outputFolder)
return the complete path to the output file based on the given output
folder.
|
org.jdom.Document |
getInputDocument() |
java.lang.String |
getNewFilePath(java.io.File outputFolder)
creates new name for the output file based on the given output
folder and actual timestamp.
|
java.util.List<java.io.File> |
getStylesheets()
Returns all available stylesheets for this output module.
|
java.util.List<java.io.File> |
getStylesheetsByLocation(java.io.File stylesheetFolder) |
java.io.File |
getXslt() |
java.io.InputStream |
getXsltInputStream() |
void |
output(org.jdom.Document document,
java.io.File exportFolder,
IProgressMonitor progressMonitor)
The given
Document will be transformed into the output format defined by the implementing class. |
void |
setXslt(java.io.File xslt)
Associate an xsl file to be used by this output module
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getOutputFileSuffix
public static final java.lang.String DATE_FORMAT_NOW
#generateFilenameWithDate(String, String)
protected java.lang.String generateFilenameWithDate(java.lang.String name)
name
- a string.public java.lang.String getFilePath(java.io.File outputFolder)
outputFolder
- the folder to store the output file in.public java.lang.String getFilePath()
public java.lang.String getNewFilePath(java.io.File outputFolder)
outputFolder
- public org.jdom.Document getInputDocument()
public void output(org.jdom.Document document, java.io.File exportFolder, IProgressMonitor progressMonitor)
IPublishOutputModule
Document
will be transformed into the output format defined by the implementing class.
The generated output file will be written to the given targetFolder.output
in interface IPublishOutputModule
document
- The Document
that will be used as input for this
modules publish process.exportFolder
- The folder, the generated output should be written to.public java.util.List<java.io.File> getStylesheets() throws java.io.IOException
IPublishOutputModule
ConfigFileUtil.perUserCdmFolder()
directory to allow for custom stylesheetsgetStylesheets
in interface IPublishOutputModule
java.io.IOException
- TODOpublic java.io.File getXslt()
getXslt
in interface IPublishOutputModule
public void setXslt(java.io.File xslt)
IPublishOutputModule
setXslt
in interface IPublishOutputModule
xslt
- a filepublic java.io.InputStream getXsltInputStream()
protected java.io.InputStream getDefaultXsltInputStream()
public java.util.List<java.io.File> getStylesheetsByLocation(java.io.File stylesheetFolder)
Copyright © 2007-2020 EDIT. All Rights Reserved.