Package org.mapfish.print.config

Examples of org.mapfish.print.config.ConfigurationException


    }

    @Override
    protected void extraValidation(final List<Throwable> validationErrors, final Configuration configuration) {
        if (this.processorGraph == null || this.processorGraph.getAllProcessors().isEmpty()) {
            validationErrors.add(new ConfigurationException("There are child processors for this processor"));
        }

        if (this.reportTemplate != null && this.reportKey == null || this.reportTemplate == null && this.reportKey != null) {
            validationErrors.add(new ConfigurationException("'reportKey' and 'reportTemplate' must either both be null or both" +
                                                            " be non-null.  reportKey: " + this.reportKey +
                                                            " reportTemplate: " + this.reportTemplate));
        }
        for (Attribute attribute : this.attributes.values()) {
            attribute.validate(validationErrors, configuration);
View Full Code Here


    }

    @Override
    public void validate(final List<Throwable> validationErrors, final Configuration configuration) {
        if (this.urlExtractor == null) {
            validationErrors.add(new ConfigurationException("No urlExtractor defined"));
        }
    }
View Full Code Here

    }

    @Override
    protected void extraValidation(final List<Throwable> validationErrors, final Configuration config) {
        if (this.sources == null || this.sources.isEmpty()) {
            validationErrors.add(new ConfigurationException(getClass().getSimpleName() + " needs to have at minimum a single source. " +
                                                            "Although logically it should have more"));
            return;
        }

        for (int i = 0; i < this.sources.size(); i++) {
            Source source = this.sources.get(i);

            if (source.type == null) {
                validationErrors.add(new ConfigurationException(
                        "The " + indexString(i) + " source in " + getClass().getSimpleName() + " needs to " +
                        "have a 'type' parameter defined."));
            } else {
                source.type.validate(i, validationErrors, source);
            }
View Full Code Here

        return Optional.of(false);
    }
    @Override
    public final void validate(final List<Throwable> validationErrors, final Configuration configuration) {
        if (this.host == null) {
            validationErrors.add(new ConfigurationException("No host defined: " + getClass().getName()));
        }
    }
View Full Code Here

    }

    @Override
    public final void validate(final List<Throwable> validationErrors, final Configuration configuration) {
        if (this.ip == null) {
            validationErrors.add(new ConfigurationException("No IP address defined " + getClass().getName()));
        }
    }
View Full Code Here


    @Override
    public void validate(final List<Throwable> validationErrors, final Configuration configuration) {
        if (scales == null || scales.length == 0) {
            validationErrors.add(new ConfigurationException("There are no scales defined in " + getClass().getName()));
        }
    }
View Full Code Here

    //CSOFF: DesignForExtension
    @Override
    public void validate(final List<Throwable> validationErrors, final Configuration configuration) {
    //CSON: DesignForExtension
        if (this.width == null || this.width < 1) {
            validationErrors.add(new ConfigurationException("width field is not legal: " + this.width + " in " + getClass().getName()));
        }

        if (this.height == null || this.height < 1) {
            validationErrors.add(new ConfigurationException("height field is not legal: " + this.height + " in " + getClass().getName()));
        }

        if (this.getMaxDpi() == null || this.getMaxDpi() < 1) {
            validationErrors.add(
                    new ConfigurationException("maxDpi field is not legal: " + this.getMaxDpi() + " in " + getClass().getName()));
        }

        if (this.getMaxDpi() != null && this.getDpiSuggestions() != null) {
            for (double dpi : this.getDpiSuggestions()) {
                if (dpi < 1 || dpi > this.getMaxDpi()) {
                    validationErrors.add(new ConfigurationException(
                            "dpiSuggestions contains an invalid value: " + dpi + " in " + getClass().getName()));

                }
            }
        }
View Full Code Here

TOP

Related Classes of org.mapfish.print.config.ConfigurationException

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.