Package org.apache.cocoon.pipeline

Examples of org.apache.cocoon.pipeline.SetupException


        return this;
    }

    public XMLSerializer setMethod(String method) {
        if (method == null || EMPTY.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


    @Override
    public void setup(Map<String, Object> inputParameters) {
        try {
            this.transformerHandler = SAX_TRANSFORMER_FACTORY.newTransformerHandler();
        } catch (TransformerConfigurationException e) {
            throw new SetupException("Can't setup transformer handler for the serializer.", e);
        }

        // set a default method because some transformer implementations run
        // into NPEs if it is missing
        if (!this.format.containsKey(METHOD)) {
View Full Code Here

        this.setContentHandler(this.transformerHandler);
    }

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

        this.format.put(OutputKeys.VERSION, version);
        return this;
    }
View Full Code Here

        } else {
            try {
                this.schema = SCHEMA_FACTORY.newSchema(source);
                SCHEMA_LRU_CACHE.put(source, this.schema);
            } catch (SAXException e) {
                throw new SetupException("Could not initialize xschema source", e);
            }
        }

        this.source = source;
    }
View Full Code Here

    }

    public void setConfiguration(Map<String, ? extends Object> configuration) {
        String basePath = (String) configuration.get("base-path");
        if (basePath == null || "".equals(basePath)) {
            throw new SetupException("The parameter 'base-path' has to be set. "
                    + "This is the path where Wicket will be mounted to your URI space.");
        }
        if (basePath.charAt(0) != '/') {
            basePath = "/" + basePath;
        }
View Full Code Here

                public ServletContext getServletContext() {
                    return WicketReader.this.servletContext;
                }
            });
        } catch (ServletException e) {
            throw new SetupException("Can't initialize Wicket.", e);
        }
    }
View Full Code Here

    @Override
    public void setConfiguration(Map<String, ? extends Object> configuration) {
        try {
            this.service = new URL((String) configuration.get("service"));
        } catch (MalformedURLException e) {
            throw new SetupException(("Can't create an URL for " + configuration.get("service") + "."), e);
        }
    }
View Full Code Here

        try {
            cacheKey.addCacheKey(new TimestampCacheKey(this.source, this.source.openConnection().getLastModified()));
            cacheKey.addCacheKey(new ParameterCacheKey("contextParameters", this.parameters));
        } catch (IOException e) {
            throw new SetupException(e);
        }

        return cacheKey;
    }
View Full Code Here

        try {
            cacheKey.addCacheKey(new TimestampCacheKey(this.source, this.source.openConnection().getLastModified()));
            cacheKey.addCacheKey(new ParameterCacheKey("contextParameters", this.parameters));
        } catch (IOException e) {
            throw new SetupException("Could not create cache key.", e);
        }

        return cacheKey;
    }
View Full Code Here

            this.saxParser.setFeature("http://cyberneko.org/html/features/override-namespaces", true);
            this.saxParser.setFeature("http://cyberneko.org/html/features/insert-namespaces", true);
            this.saxParser.setProperty("http://cyberneko.org/html/properties/namespaces-uri",
                    "http://www.w3.org/1999/xhtml");
        } catch (SAXNotRecognizedException e) {
            throw new SetupException("Impossible to set property to HTML Parser", e);
        } catch (SAXNotSupportedException e) {
            throw new SetupException("Property not supported by the HTML Parser", e);
        }
    }
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.