public class MapPrinter
extends java.lang.Object
| Constructor and Description |
|---|
MapPrinter() |
| Modifier and Type | Method and Description |
|---|---|
Config |
getConfig() |
java.lang.String |
getOutputFilename(java.lang.String layout,
java.lang.String defaultName) |
OutputFormat |
getOutputFormat(PJsonObject jsonSpec) |
boolean |
isRunning() |
static PJsonObject |
parseSpec(java.lang.String spec) |
RenderingContext |
print(PJsonObject jsonSpec,
java.io.OutputStream outputStream,
java.util.Map<java.lang.String,java.lang.String> headers)
Generate the PDF using the given spec.
|
void |
printClientConfig(org.json.JSONWriter json)
Use by /info.json to generate its returned content.
|
MapPrinter |
setConfig(java.io.InputStream inputConfig) |
MapPrinter |
setConfig(java.lang.String strConfig) |
MapPrinter |
setConfigDir(java.lang.String configDir) |
MapPrinter |
setYamlConfigFile(java.io.File configFile)
Sets both the configuration by parsing the configFile and the configDir relative to the configFile
|
void |
stop()
Stop the thread pool or others.
|
public MapPrinter setYamlConfigFile(java.io.File configFile) throws java.io.FileNotFoundException
configFile - java.io.FileNotFoundExceptionpublic MapPrinter setConfig(java.lang.String strConfig)
public MapPrinter setConfig(java.io.InputStream inputConfig)
public MapPrinter setConfigDir(java.lang.String configDir)
public RenderingContext print(PJsonObject jsonSpec, java.io.OutputStream outputStream, java.util.Map<java.lang.String,java.lang.String> headers) throws com.itextpdf.text.DocumentException, java.lang.InterruptedException
java.lang.InterruptedExceptioncom.itextpdf.text.DocumentExceptionpublic static PJsonObject parseSpec(java.lang.String spec)
public void printClientConfig(org.json.JSONWriter json)
throws org.json.JSONException
json - the writer for outputting the config specificationorg.json.JSONException@PreDestroy public void stop()
public java.lang.String getOutputFilename(java.lang.String layout,
java.lang.String defaultName)
public Config getConfig()
public OutputFormat getOutputFormat(PJsonObject jsonSpec)
public boolean isRunning()