Examples of PDFInvoiceRendererBeanException


Examples of org.openinvoice.ubl4j.core.common.text.PDFInvoiceRendererBeanException

    public static PDFBaseColorWrapper getBaseColor(String key) {
        String colorValueStr = pdfInvoiceProperties.getProperty(key);
        if (!colorValueStr.isEmpty()) {
            String[] colors = colorValueStr.split(VALUE_DELIMITER);
            if (colors.length != 3) {
                PDFInvoiceRendererBeanException e = new PDFInvoiceRendererBeanException(key);
                e.setHint(" Use RGB color model to define your desired color. For example: 117,87,79");
                throw e;
            }
            return new PDFBaseColorWrapper(Integer.parseInt(colors[0]), Integer.parseInt(colors[1]), Integer.parseInt(colors[2]));
        } else {
            throw new PDFInvoiceRendererBeanException(key);
        }
    }
View Full Code Here

Examples of org.openinvoice.ubl4j.core.common.text.PDFInvoiceRendererBeanException

    }

    private static String getPropertyValue(String key) {
        String value = pdfInvoiceProperties.getProperty(key);
        if (value == null || value.isEmpty()) {
            throw new PDFInvoiceRendererBeanException(key);
        } else {
            return value.trim();
        }
    }
View Full Code Here

Examples of org.openinvoice.ubl4j.core.common.text.PDFInvoiceRendererBeanException

                float f = Float.parseFloat(strValues[i]);
                floatArray[i] = f;
            }
            return floatArray;
        } else {
            PDFInvoiceRendererBeanException e = new PDFInvoiceRendererBeanException(key);
            e.setHint(" Use comma separated float values; for example: 100,50,20,45");
            throw e;

        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.