Package org.openinvoice.ubl4j.util

Examples of org.openinvoice.ubl4j.util.UBL4JException


        InvoiceCreationInput input = new CreateInvoiceBasedOnOrderInput();
        input = initOutputOptions(input);
        input.setUbl4jConfigurationBean(UBL4JConfigurationBeanBuilder.getInstance());
        File orderFile = new File(options.convertOrderToInvoice);
        if (!orderFile.exists()) {
            throw new UBL4JException(String.format("order '%s' doesn't exist", orderFile.getAbsolutePath()));
        }
        ((CreateInvoiceBasedOnOrderInput)input).setOrderURI(URI.create(orderFile.toURI().getPath()));
        CreateInvoiceBasedOnOrderTask task = new
                CreateInvoiceBasedOnOrderTask();
        task.execute(input);
View Full Code Here


            File templateFile = new File(templateFilePath);
            if (templateFile.exists()) {
                template = TemplateFactory.createDefaultTemplate(parseCommandlineOutputFormat(),
                        templateFile);
            } else {
                throw new UBL4JException(String.format("The specified template file doesn't exist '%s'",
                        templateFile.getAbsolutePath()));
            }
        }
        return template;
    }
View Full Code Here

        String outputFormatStr = options.outputFormat;
        if (outputFormatStr != null) {
            try {
                outputFormat = OutputFormat.valueOf(outputFormatStr.toUpperCase());
            } catch (IllegalArgumentException e) {
                throw new UBL4JException(
                        String.format("'%s' is not a supported output format. Supported formats are: %s",
                                outputFormatStr, OutputFormat.getOutputFormatsAsString()));
            }
        }
        return outputFormat;
View Full Code Here

TOP

Related Classes of org.openinvoice.ubl4j.util.UBL4JException

Copyright © 2018 www.massapicom. 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.