Class InvoiceGenerator
- java.lang.Object
-
- de.narimo.georepo.server.providers.InvoiceGenerator
-
public class InvoiceGenerator extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classInvoiceGenerator.InvoiceFormat
-
Constructor Summary
Constructors Constructor Description InvoiceGenerator(javax.servlet.ServletContext servletContext)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Map<String,String>createSubstitutionMap(InvoiceGenerator.InvoiceFormat invoiceFormat, String vendorname, String vendorstreet, String vendorhousenumber, String vendorpostcode, String vendorcity, String customername, String customerstreet, String customerhousenumber, String customerpostcode, String customercity, String customercountry)Creates the subsitution map for the invoice parameters with some pre-defined values.static Stringformat(String format, Map<String,String> values)Text placeholder substitution.StringgenerateInvoice(Integer invoiceCounter, InvoiceGenerator.InvoiceFormat invFormat)AppKeygetAppCustomer()AppKeygetAppProvider()StringgetInvoiceName()StringgetInvoicePath()StringgetProductName()Map<String,String>getSubstitutionMap()voidremoveFailedInvoiceFromDisk(String invoiceName)voidsetAltInvoicingBasepath(String altInvoicingBasepath)voidsetAppCustomer(AppKey appCustomer)voidsetAppProvider(AppKey appProvider)voidsetDebugMode(boolean debugMode)voidsetProductName(String productName)voidsetSubstitutionMap(Map<String,String> substitutionMap)voidsetTestMode(boolean testMode)
-
-
-
Method Detail
-
generateInvoice
public String generateInvoice(Integer invoiceCounter, InvoiceGenerator.InvoiceFormat invFormat)
-
removeFailedInvoiceFromDisk
public void removeFailedInvoiceFromDisk(String invoiceName)
-
format
public static String format(String format, Map<String,String> values)
Text placeholder substitution. See https://stackoverflow.com/a/27815924/3271380- Parameters:
format-values-- Returns:
-
createSubstitutionMap
public static Map<String,String> createSubstitutionMap(InvoiceGenerator.InvoiceFormat invoiceFormat, String vendorname, String vendorstreet, String vendorhousenumber, String vendorpostcode, String vendorcity, String customername, String customerstreet, String customerhousenumber, String customerpostcode, String customercity, String customercountry)
Creates the subsitution map for the invoice parameters with some pre-defined values.
-
getInvoiceName
public String getInvoiceName()
-
getInvoicePath
public String getInvoicePath()
-
getAppCustomer
public AppKey getAppCustomer()
-
getAppProvider
public AppKey getAppProvider()
-
getProductName
public String getProductName()
-
setDebugMode
public void setDebugMode(boolean debugMode)
-
setAltInvoicingBasepath
public void setAltInvoicingBasepath(String altInvoicingBasepath)
-
setAppCustomer
public void setAppCustomer(AppKey appCustomer)
-
setAppProvider
public void setAppProvider(AppKey appProvider)
-
setProductName
public void setProductName(String productName)
-
setTestMode
public void setTestMode(boolean testMode)
-
-