Package com.plainsource.commons.text.template

Examples of com.plainsource.commons.text.template.Template


        task.execute(input);
        print(task);
    }

    public Template parseCommandLineOptionTemplate() throws IOException, UBL4JException {
        Template template = null;
        String templateFilePath = options.templateFilePath;
        if (templateFilePath != null) {
            File templateFile = new File(templateFilePath);
            if (templateFile.exists()) {
                template = TemplateFactory.createDefaultTemplate(parseCommandlineOutputFormat(),
View Full Code Here


    private InvoiceCreationInput initOutputOptions(InvoiceCreationInput input)
            throws UBL4JException, IOException {
        OutputFormat invoiceOutputFormat =  parseCommandlineOutputFormat();
        File invoiceOutputFile = parseCommandLineOutputFile();
        Template invoiceTemplate = parseCommandLineOptionTemplate();
        if (invoiceOutputFormat != null) {
            input.setInvoiceOutputFormat(invoiceOutputFormat);
        }
        if (invoiceOutputFile != null) {
            input.setInvoiceOutputURI(invoiceOutputFile.toURI());
View Full Code Here

            }
            OutputStream os = creationInput.getInvoiceOutputStream();
            if (os != null) {
                setInvoiceOutputStream(os);
            }
            Template template = creationInput.getInvoiceOutputTemplate();
            if (template != null) {
                setInvoiceOutputTemplate(template);
            }
            URI outputURI = creationInput.getInvoiceOutputURI();
            if (outputURI != null) {
View Full Code Here

    void renderInvoice() throws IOException, FailedToRenderException {
        InvoiceRenderingInput input = (InvoiceRenderingInput) getInput();
        InvoiceRenderingOutput output = (InvoiceRenderingOutput) getOutput();
        OutputFormat outputFormat = output.getInvoiceOutputFormat();
        Template outputTemplate = output.getInvoiceOutputTemplate(outputFormat);
        InvoiceRendererFactory invoiceRendererFactory =
                InvoiceRendererManager.createInvoiceRendererFactory(outputFormat);
        InvoiceRenderer invoiceRenderer =
                invoiceRendererFactory.createInvoiceRenderer(input.getInvoiceToBeRendered(), outputTemplate,
                        input.getUbl4jConfigurationBean());
View Full Code Here

TOP

Related Classes of com.plainsource.commons.text.template.Template

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.