public class UBL4JConsole
extends com.plainsource.commons.ui.console.AbstractConsole
UBL4JConsoleOptions
for commandline options.
The following example shows how to convert an order to an invoice and render the output to PDF format
$ java -jar ubl4j-0.3.jar -c order.xml -o invoice.pdf -f PDF
The following example shows how to render an invoice to TeX format by using template.tex template
$ java -jar ubl4j-0.3.jar -r invoice.xml -f TEX -t template.tex -o invoice.tex
UBL4JConsoleOptions
Constructor and Description |
---|
UBL4JConsole()
Sets-up the consoleLogger to print its status in case of consoleLogger configuration errors
|
Modifier and Type | Method and Description |
---|---|
void |
end() |
void |
executeCreateInvoiceBasedOnOrderTask()
Converts an UBL order to an UBL invoice and renders the invoice to the desired output format.
|
void |
executeInvoiceRenderingTask()
Renders an UBL invoice to the desired output format.
|
org.slf4j.Logger |
getConsoleLogger() |
org.slf4j.Logger |
getFileLogger() |
boolean |
isDisplayExecutionDurationTime() |
void |
logExceptionAndExit(UBL4JConsoleOptions options,
Exception e) |
com.plainsource.commons.text.template.Template |
parseCommandLineOptionTemplate() |
File |
parseCommandLineOutputFile() |
OutputFormat |
parseCommandlineOutputFormat() |
void |
setConsoleLogger(org.slf4j.Logger consoleLogger) |
void |
setDisplayExecutionDurationTime(boolean displayExecutionDurationTime) |
void |
setFileLogger(org.slf4j.Logger fileLogger) |
void |
setOptions(UBL4JConsoleOptions options) |
calculateExecutionDuration, calculateExecutionDuration, getExecutionDuration, getExecutionEndTime, getExecutionStartTime, getName, getProgressBar, setExecutionDuration, setExecutionEndTime, setExecutionStartTime, setName, setProgressBar, start
public UBL4JConsole()
public void executeCreateInvoiceBasedOnOrderTask() throws UBL4JException, IOException
UBL4JException
- in case issues while converting the order fileIOException
- in case issues while reading the order filepublic void executeInvoiceRenderingTask() throws IOException, UBL4JException
UBL4JException
- in case issues while reading and rendering the invoiceIOException
- in case issues reading and rendering the invoicepublic com.plainsource.commons.text.template.Template parseCommandLineOptionTemplate() throws IOException, UBL4JException
IOException
UBL4JException
public File parseCommandLineOutputFile()
public OutputFormat parseCommandlineOutputFormat() throws UBL4JException
UBL4JException
public void logExceptionAndExit(UBL4JConsoleOptions options, Exception e)
public void setOptions(UBL4JConsoleOptions options)
public org.slf4j.Logger getConsoleLogger()
public void setConsoleLogger(org.slf4j.Logger consoleLogger)
public org.slf4j.Logger getFileLogger()
public void setFileLogger(org.slf4j.Logger fileLogger)
public boolean isDisplayExecutionDurationTime()
public void setDisplayExecutionDurationTime(boolean displayExecutionDurationTime)
public void end()
end
in class com.plainsource.commons.ui.console.AbstractConsole
Copyright © 2011-2013 Plain Source. All Rights Reserved.