public final class InvoiceUtils extends Object
Constructor and Description |
---|
InvoiceUtils() |
Modifier and Type | Method and Description |
---|---|
static InvoiceDTO |
convertToEHFInvoice(Invoice invoice)
Method used to convert EHF invoice to ehandel.no.invoice.Invoice wrapper.
|
static InvoiceDTO |
convertToEHFV2Invoice(Invoice invoice)
Method used to convert EHF invoice to Invoice wrapper.
|
static byte[] |
generateEHFInvoiceXML(InvoiceDTO invoiceDTO)
Marshalling invoice object to byte array.
|
static void |
generateEHFInvoiceXML(InvoiceDTO invoiceDTO,
String filePath)
Marshalling invoice object to XML file.
|
static byte[] |
generateEHFV2InvoiceXML(InvoiceDTO invoiceDTO)
Marshalling invoice object to byte array.
|
static void |
generateEHFV2InvoiceXML(InvoiceDTO invoiceDTO,
String filePath) |
static InvoiceDTO |
getEHFInvoice(File file)
Unmarshalling XML file to invoice object.
|
static InvoiceDTO |
getEHFInvoice(InputStream is) |
static InvoiceDTO |
getEHFInvoice(String filePath)
Method used to convert EHF ehandel.no.invoice.Invoice XML file to EHF
ehandel.no.invoice.Invoice object
|
static InvoiceDTO |
getEHFV2Invoice(File file)
Unmarshalling XML file to invoice object.
|
static InvoiceDTO |
getEHFV2Invoice(InputStream is) |
static InvoiceDTO |
getEHFV2Invoice(String filePath)
Method used to convert EHF Invoice XML file to EHF Invoice object
|
static Invoice |
getInvoice(InputStream is)
Method used to convert EHF ehandel.no.invoice.Invoice XML file stream to EHF
ehandel.no.invoice.Invoice object
|
static String |
getInvoiceVersion(InputStream is)
Gets the invoice version.
|
static JAXBContext |
getJAXBContext() |
static boolean |
isValidInvoiceAmount(InvoiceDTO invoiceDTO) |
public static JAXBContext getJAXBContext() throws Exception
Exception
public static void generateEHFInvoiceXML(InvoiceDTO invoiceDTO, String filePath) throws JAXBException
JAXBException
public static byte[] generateEHFInvoiceXML(InvoiceDTO invoiceDTO) throws JAXBException
JAXBException
public static String getInvoiceVersion(InputStream is) throws JAXBException
is
- the isJAXBException
- the jAXB exceptionpublic static InvoiceDTO getEHFInvoice(File file) throws JAXBException
JAXBException
public static InvoiceDTO getEHFInvoice(String filePath) throws JAXBException
JAXBException
public static Invoice getInvoice(InputStream is) throws JAXBException
JAXBException
public static InvoiceDTO getEHFInvoice(InputStream is) throws JAXBException
JAXBException
public static InvoiceDTO convertToEHFInvoice(Invoice invoice)
public static boolean isValidInvoiceAmount(InvoiceDTO invoiceDTO)
public static void generateEHFV2InvoiceXML(InvoiceDTO invoiceDTO, String filePath) throws JAXBException
JAXBException
public static byte[] generateEHFV2InvoiceXML(InvoiceDTO invoiceDTO) throws JAXBException
JAXBException
public static InvoiceDTO getEHFV2Invoice(InputStream is) throws Exception
Exception
public static InvoiceDTO getEHFV2Invoice(File file) throws JAXBException
JAXBException
public static InvoiceDTO getEHFV2Invoice(String filePath) throws JAXBException
JAXBException
public static InvoiceDTO convertToEHFV2Invoice(Invoice invoice)
Copyright © 2021 Norwegian Agency for Public Management and eGovernment (Difi). All rights reserved.