Package org.apache.cocoon.pipeline

Examples of org.apache.cocoon.pipeline.ProcessingException


    private MethodDelegator methodDelegator;

    public void invoke(OutputStream outputStream, String controllerName, Map<String, Object> inputParameters,
            Map<String, ? extends Object> configuration) {
        if (!this.applicationContext.isPrototype(controllerName)) {
            throw new ProcessingException("A REST controller bean MUST run within the 'prototype' scope.");
        }

        try {
            // get the prepared controller
            Object controller = this.getController(controllerName, inputParameters, configuration);
View Full Code Here


    private URLConnection getUrlConnection() {
        if (this.servletConnection == null) {
            try {
                this.servletConnection = this.service.openConnection();
            } catch (IOException e) {
                throw new ProcessingException("Can't use connected servlet service: " + this.service, e);
            }
        }

        return this.servletConnection;
    }
View Full Code Here

                IOUtils.closeQuietly(inputStream);
            }
        } catch (PipelineException e) {
            throw e;
        } catch (Exception e) {
            throw new ProcessingException("Can't parse url connection " + this.source, e);
        }
    }
View Full Code Here

                writer.flush();
            } finally {
                IOUtils.closeQuietly(inputStream);
            }
        } catch (IOException e) {
            throw new ProcessingException("Failed to produce result.", e);
        }
    }
View Full Code Here

            Fop fop = FOP_FACTORY.newFop(this.outputFormat, outputStream);
            ContentHandler contentHandler = fop.getDefaultHandler();

            this.setContentHandler(contentHandler);
        } catch (FOPException e) {
            throw new ProcessingException("Impossible to initialize FOPSerializer", e);
        }
    }
View Full Code Here

        this.saxParser.setContentHandler(this.getSAXConsumer());

        try {
            this.saxParser.parse(this.htmlSource.toExternalForm());
        } catch (SAXException e) {
            throw new ProcessingException("Fatal XML error", e);
        } catch (IOException e) {
            throw new ProcessingException("Fatal protocol violation", e);
        }
    }
View Full Code Here

    public void endElement(String uri, String localName, String qName) throws SAXException {
        if ("docs".equals(localName)) {
            try {
                this.solr.commit();
            } catch (Exception e) {
                throw new ProcessingException("Unable to commit the Solr documents.", e);
            }
        } else if ("doc".equals(localName)) {
            try {
                this.solr.add(this.doc);
                this.doc = new SolrInputDocument();
            } catch (Exception e) {
                throw new ProcessingException("Unable to add the Solr document.", e);
            }
        } else if ("field".equals(localName)) {
            if (!this.isNull && this.text.length() > 0) {
                this.doc.addField(this.name, this.text, this.boost);
                this.boost = 1.0f;
View Full Code Here

     *
     * @param recorder
     */
    protected void setRecorder(XMLConsumer recorder) {
        if (this.isRecording) {
            throw new ProcessingException("Only one recorder can be set.");
        }

        this.isRecording = true;
        this.originalXMLConsumer = this.getXMLConsumer();
        this.setXMLConsumer(recorder);
View Full Code Here

    private Map<String, ? extends Object> inputParameters;

    public void execute() {
        HttpServletRequest request = HttpContextHelper.getRequest(this.inputParameters);
        if (!"POST".equals(request.getMethod())) {
            throw new ProcessingException("Cannot create consumer source for request that is not POST.");
        }

        InputStream inputStream = null;
        try {
            inputStream = request.getInputStream();
View Full Code Here

    private URLConnection getUrlConnection() {
        if (this.servletConnection == null) {
            try {
                this.servletConnection = this.service.openConnection();
            } catch (IOException e) {
                throw new ProcessingException("Can't use connected servlet service: " + this.service, e);
            }
        }

        return this.servletConnection;
    }
View Full Code Here

TOP

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

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.