org.openinvoice.ubl4j.ui.console
Class UBL4JConsole

java.lang.Object
  extended by org.openinvoice.ubl4j.ui.console.UBL4JConsole

public class UBL4JConsole
extends Object

Implements the commandline interface for UBL4J. See 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
 

Since:
0.3
Version:
\$Revision: 269823a876f3 $
Author:
Javad K. Heshmati
See Also:
UBL4JConsoleOptions

Constructor Summary
UBL4JConsole()
          Sets-up the consoleLogger to print its status in case of consoleLogger configuration errors
 
Method Summary
 void convertOrderToInvoice()
          Converts an UBL order to an UBL invoice and renders the invoice to the desired output format.
 org.slf4j.Logger getConsoleLogger()
           
 org.slf4j.Logger getFileLogger()
           
 UBL4JConsoleOptions getOptions()
           
 void logExceptionAndExit(UBL4JConsoleOptions options, Exception e)
           
 void printCommandLineOptions()
           
 void printExecutionStatus()
           
 void renderInvoiceToOutput()
          Renders an UBL invoice to the desired output format.
 void setConsoleLogger(org.slf4j.Logger consoleLogger)
           
 void setFileLogger(org.slf4j.Logger fileLogger)
           
 void setOptions(UBL4JConsoleOptions options)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UBL4JConsole

public UBL4JConsole()
Sets-up the consoleLogger to print its status in case of consoleLogger configuration errors

Method Detail

convertOrderToInvoice

public void convertOrderToInvoice()
                           throws UBL4JException,
                                  IOException
Converts an UBL order to an UBL invoice and renders the invoice to the desired output format.

Throws:
UBL4JException - in case issues while converting the order file
IOException - in case issues while reading the order file

renderInvoiceToOutput

public void renderInvoiceToOutput()
                           throws IOException,
                                  UBL4JException
Renders an UBL invoice to the desired output format.

Throws:
UBL4JException - in case issues while reading and rendering the invoice
IOException - in case issues reading and rendering the invoice

logExceptionAndExit

public void logExceptionAndExit(UBL4JConsoleOptions options,
                                Exception e)

printCommandLineOptions

public void printCommandLineOptions()

printExecutionStatus

public void printExecutionStatus()

getOptions

public UBL4JConsoleOptions getOptions()

setOptions

public void setOptions(UBL4JConsoleOptions options)

getConsoleLogger

public org.slf4j.Logger getConsoleLogger()

setConsoleLogger

public void setConsoleLogger(org.slf4j.Logger consoleLogger)

getFileLogger

public org.slf4j.Logger getFileLogger()

setFileLogger

public void setFileLogger(org.slf4j.Logger fileLogger)


Copyright © 2011-2012 Plain Source. All Rights Reserved.