public class InvoiceWrapper extends Object
InvoiceWrapper
is a wrapper class exposing the invoice
related operations. It provides the following operations:
Constructor and Description |
---|
InvoiceWrapper() |
Modifier and Type | Method and Description |
---|---|
AbstractDocument |
cloneInvoice(InputStream cloneTypeInputStream,
OutputStream outputStream,
InputStream templateStream)
Clones a new invoice based on an existing invoice.
|
AbstractDocument |
createInvoice(InputStream orderTypeStream,
OutputStream outputStream,
InputStream templateStream)
Created a new invoice based on the UBL order information.
|
void |
deleteInvoice(InputStream deleteInputStream)
Deletes an existing invoice.
|
AbstractDocument |
queryInvoiceRepository(InputStream queryTypeInput,
OutputStream outputStream,
InputStream templateStream) |
AbstractDocument |
renderInvoice(InputStream renderTypeInput,
OutputStream outputStream,
InputStream templateStream)
Renders an existing invoice.
|
public AbstractDocument createInvoice(InputStream orderTypeStream, OutputStream outputStream, InputStream templateStream) throws OpenInvoiceException, SQLException, IOException
orderTypeStream
- contains the UBL OrderType
informationInvoice
PayloadHandler.PayloadParseException
SQLException
OpenInvoiceException
IOException
public AbstractDocument queryInvoiceRepository(InputStream queryTypeInput, OutputStream outputStream, InputStream templateStream) throws OpenInvoiceException, IOException, SQLException
public AbstractDocument renderInvoice(InputStream renderTypeInput, OutputStream outputStream, InputStream templateStream) throws OpenInvoiceException, IOException, SQLException
renderTypeInput
- contains invoiceNumber
of the invoice to be rendered. It may also contain outputFormat
.outputStream
- used to write the output of the rendering.templateStream
- the template text containing place holders to be replaced with invoice information.OpenInvoiceException
IOException
SQLException
public AbstractDocument cloneInvoice(InputStream cloneTypeInputStream, OutputStream outputStream, InputStream templateStream) throws SQLException, OpenInvoiceException, IOException
cloneTypeInputStream
is null, the latest invoice is used to clone a new invoice.cloneTypeInputStream
- contains optional information needed to cloneSQLException
OpenInvoiceException
IOException
public void deleteInvoice(InputStream deleteInputStream) throws OpenInvoiceException, IOException, SQLException
deleteInputStream
- contains invoiceNumber
of the invoice to be deleted.OpenInvoiceException
IOException
SQLException
Copyright © 2011–2019 Plain Source. All rights reserved.