Package com.haulmont.yarg.exception

Examples of com.haulmont.yarg.exception.UnsupportedFormatException


            String htmlContent = new String(htmlOutputStream.toByteArray());
            renderPdfDocument(htmlContent, outputStream);

        } else {
            throw new UnsupportedFormatException();
        }
    }
View Full Code Here


        FormatterCreator docCreator = new FormatterCreator() {
            @Override
            public ReportFormatter create(FormatterFactoryInput factoryInput) {
                if (officeIntegration == null) {
                    throw new UnsupportedFormatException("Could not use doc templates because Open Office connection params not set. Please check, that \"cuba.reporting.openoffice.path\" property is set in properties file.");
                }
                DocFormatter docFormatter = new DocFormatter(factoryInput, officeIntegration);
                docFormatter.setDefaultFormatProvider(defaultFormatProvider);
                return docFormatter;
            }
View Full Code Here

        ReportTemplate reportTemplate = factoryInput.reportTemplate;
        OutputStream outputStream = factoryInput.outputStream;

        FormatterCreator formatterCreator = formattersMap.get(templateExtension);
        if (formatterCreator == null) {
            throw new UnsupportedFormatException(String.format("Unsupported template extension [%s]", templateExtension));
        }

        return formatterCreator.create(factoryInput);
    }
View Full Code Here

                    pdfConverter.convertToPdf(PdfConverter.FileType.SPREADSHEET, stream.toByteArray(), outputStream);
                } catch (IOException e) {
                    throw wrapWithReportingException("An error occurred while converting xls to pdf.", e);
                }
            } else {
                throw new UnsupportedFormatException("Could not convert xls files to pdf because Open Office connection params not set. Please check, that \"cuba.reporting.openoffice.path\" property is set in properties file.");
            }
        }
    }
View Full Code Here

TOP

Related Classes of com.haulmont.yarg.exception.UnsupportedFormatException

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.