Package org.apache.cocoon

Examples of org.apache.cocoon.ProcessingException


                list = doXPath(path).nodelist();
            } else {
                list = DOMUtil.getNodeListFromPath(data, pathComponents);
            }
        } catch (javax.xml.transform.TransformerException localException) {
            throw new ProcessingException("Transforming exception during selectSingleNode with path: '"+path+"'. Exception: " + localException, localException);
        }

        if (list != null && list.getLength() > 0) {
            Document doc = DOMUtil.createDocument();
            result = doc.createDocumentFragment();
View Full Code Here


        try {
            result = DOMUtil.getSingleNode(data, path);
            if (result != null) result = result.cloneNode(true);
        } catch (javax.xml.transform.TransformerException localException) {
            throw new ProcessingException("TransformerException: " + localException, localException);
        }

        return result;
    }
View Full Code Here

            // clone list
            if (result != null) {
                result = new NodeListImpl(result);
            }
        } catch (javax.xml.transform.TransformerException localException) {
            throw new ProcessingException("TransformerException: " + localException, localException);
        }

        return result;
    }
View Full Code Here

     * Set the value of a node. The node is copied before insertion.
     */
    public synchronized void setNode(String path, Node node)
    throws ProcessingException {
        if (path != null && path.equals("/") == true) {
            throw new ProcessingException("Not a valid path for setNode(): " + path);
        }

        path = this.createPath(path);
        Node removeNode = DOMUtil.selectSingleNode(data, path);
        removeNode.getParentNode().replaceChild(data.importNode(node, true), removeNode);
View Full Code Here

                list = doXPath(path).nodelist();
            } else {
                list = DOMUtil.getNodeListFromPath(data, pathComponents);
            }
        } catch (javax.xml.transform.TransformerException local) {
            throw new ProcessingException("TransformerException: " + local, local);
        }
        if (list != null && list.getLength() > 0) {
            streamed = true;
            for(int i = 0; i < list.getLength(); i++) {
View Full Code Here

                        Map                objectModel,
                        SourceResolver     resolver,
                        ComponentManager   manager)
    throws SAXException, ProcessingException, IOException {
        if (this.loadResource == null) {
            throw new ProcessingException("The context " + this.name + " does not support loading.");
        }
        Source source = null;
        try {
            source = SourceUtil.getSource(this.loadResource, null, parameters, resolver);
            Document doc = SourceUtil.toDOM(source);
View Full Code Here

                        Map                objectModel,
                        SourceResolver     resolver,
                        ComponentManager   manager)
    throws SAXException, ProcessingException, IOException {
        if (this.saveResource == null) {
            throw new ProcessingException("The context " + this.name + " does not support saving.");
        }
        DocumentFragment frag = this.getXML(path);
        if (frag == null) {
            // create empty fake document
            frag = DOMUtil.createDocument().createDocumentFragment();
View Full Code Here

                resolver = (SourceResolver) this.manager.lookup( SourceResolver.ROLE );
                configs = DefaultHandlerManager.prepareHandlerConfiguration(resolver,
                                                                            CocoonComponentManager.getCurrentEnvironment().getObjectModel(),
                                                                            this.holder);
            } catch (ServiceException se) {
                throw new ProcessingException("Unable to lookup source resolver.", se);
            } catch (ConfigurationException ce) {
                throw new ProcessingException("Configuration error.", ce);
            } finally {
                this.manager.release( resolver );
            }
        }
        return configs;
View Full Code Here

                           String applicationName,
                           SourceParameters parameters)
    throws ProcessingException {
        HandlerConfiguration config = this.getHandlerConfiguration( handlerName );
        if ( config == null ) {
            throw new ProcessingException("Unknown handler to authenticate: " + handlerName);
        }
        // are we already logged in?
        UserHandler handler = this.getUserHandler( handlerName );
        if ( handler != null ) {
            throw new ProcessingException("User is already authenticated using handler: " + handlerName);
        }
       
        // This could be made pluggable, if required
        handler = this.authenticator.authenticate( config, parameters );
       
View Full Code Here

        } else if ( modeString.equalsIgnoreCase("if-unused") ) {
            mode = AuthenticationConstants.LOGOUT_MODE_IF_UNUSED;
        } else if ( modeString.equalsIgnoreCase("immediately") ) {
            mode = AuthenticationConstants.LOGOUT_MODE_IMMEDIATELY;
        } else {
           throw new ProcessingException("Unknown mode " + modeString);
        }

        // logout
        AuthenticationManager authManager = null;
        try {
            authManager = (AuthenticationManager) this.manager.lookup(AuthenticationManager.ROLE);
            final String handlerName = par.getParameter("handler",
                                                         authManager.getHandlerName());
            if ( null == handlerName )
                throw new ProcessingException("LogoutAction requires at least the handler parameter.");
            authManager.logout( handlerName , mode );
        } finally {
            this.manager.release( authManager );
        }
View Full Code Here

TOP

Related Classes of org.apache.cocoon.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.