Package org.apache.cocoon.pipeline

Examples of org.apache.cocoon.pipeline.SetupException


        }

        try {
            this.templates = transformerFactory.newTemplates(urlSource);
        } catch (TransformerConfigurationException e) {
            throw new SetupException("Impossible to read XSLT from '" + this.source.toExternalForm()
                    + "', see nested exception", e);
        }
    }
View Full Code Here


    @SuppressWarnings("unchecked")
    public void setConfiguration(final Map<String, ? extends Object> configuration) {
        try {
            this.source = (URL) configuration.get("source");
        } catch (ClassCastException cce) {
            throw new SetupException("The configuration value of 'source' can't be cast to java.net.URL.", cce);
        }

        if (this.source != null) {
            Object attributesObj = configuration.get("attributes");
            if (attributesObj != null && attributesObj instanceof Map) {
View Full Code Here

    protected void setSAXConsumer(final SAXConsumer consumer) {
        TransformerHandler transformerHandler;
        try {
            transformerHandler = TRAX_FACTORY.newTransformerHandler(this.templates);
        } catch (Exception ex) {
            throw new SetupException("Could not initialize transformer handler.", ex);
        }

        if (this.parameters != null) {
            final Transformer transformer = transformerHandler.getTransformer();
View Full Code Here

    public XMLSerializer(Properties format) {
        super();

        if (format == null) {
            throw new SetupException("No format properites passed as argument.");
        }

        this.format = format;
    }
View Full Code Here

        return parameterCacheKey;
    }

    public XMLSerializer setCDataSectionElements(String cdataSectionElements) {
        if (cdataSectionElements == null || "".equals(cdataSectionElements)) {
            throw new SetupException("A ... has to be passed as argument.");
        }

        this.format.put(OutputKeys.CDATA_SECTION_ELEMENTS, cdataSectionElements);
        return this;
    }
View Full Code Here

        return this;
    }

    public XMLSerializer setDoctypePublic(String doctypePublic) {
        if (doctypePublic == null || "".equals(doctypePublic)) {
            throw new SetupException("A doctype-public has to be passed as argument.");
        }

        this.format.put(OutputKeys.DOCTYPE_PUBLIC, doctypePublic);
        return this;
    }
View Full Code Here

        return this;
    }

    public XMLSerializer setDoctypeSystem(String doctypeSystem) {
        if (doctypeSystem == null || "".equals(doctypeSystem)) {
            throw new SetupException("A doctype-system has to be passed as argument.");
        }

        this.format.put(OutputKeys.DOCTYPE_SYSTEM, doctypeSystem);
        return this;
    }
View Full Code Here

        return this;
    }

    public XMLSerializer setEncoding(String encoding) {
        if (encoding == null || "".equals(encoding)) {
            throw new SetupException("A encoding has to be passed as argument.");
        }

        this.format.put(OutputKeys.ENCODING, encoding);
        return this;
    }
View Full Code Here

        return this;
    }

    public XMLSerializer setMediaType(String mediaType) {
        if (mediaType == null || "".equals(mediaType)) {
            throw new SetupException("A media-type has to be passed as argument.");
        }

        this.format.put(OutputKeys.MEDIA_TYPE, mediaType);
        return this;
    }
View Full Code Here

        return this;
    }

    public XMLSerializer setMethod(String method) {
        if (method == null || "".equals(method)) {
            throw new SetupException("A method has to be passed as argument.");
        }

        this.format.put(OutputKeys.METHOD, method);
        return this;
    }
View Full Code Here

TOP

Related Classes of org.apache.cocoon.pipeline.SetupException

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.