Package org.apache.lenya.cms.usecase.xml

Examples of org.apache.lenya.cms.usecase.xml.UsecaseErrorHandler


    }

    protected void validate(Document xml) throws Exception {
        ResourceType resourceType = getSourceDocument().getResourceType();
        Schema schema = resourceType.getSchema();
        ValidationUtil.validate(this.manager, xml, schema, new UsecaseErrorHandler(this));
    }
View Full Code Here


            getLogger().info(
                    "No schema declared for resource type [" + resourceType.getName()
                            + "], skipping validation.");
        }
        else {
            ValidationUtil.validate(this.manager, xml, schema, new UsecaseErrorHandler(this));
        }
    }
View Full Code Here

    private void validateDoc(SourceResolver resolver, org.w3c.dom.Document xmlDoc, Document doc)
            throws Exception {
        ResourceType resourceType = doc.getResourceType();
        Schema schema = resourceType.getSchema();
        ValidationUtil.validate(this.manager, xmlDoc, schema, new UsecaseErrorHandler(this));
    }
View Full Code Here

    }

    protected void validate(Document xml) throws Exception {
        ResourceType resourceType = getSourceDocument().getResourceType();
        Schema schema = resourceType.getSchema();
        ValidationUtil.validate(this.manager, xml, schema, new UsecaseErrorHandler(this));
    }
View Full Code Here

    private void validateDoc(SourceResolver resolver, org.w3c.dom.Document xmlDoc, Document doc)
            throws Exception {
        ResourceType resourceType = doc.getResourceType();
        Schema schema = resourceType.getSchema();
        ValidationUtil.validate(this.manager, xmlDoc, schema, new UsecaseErrorHandler(this));
    }
View Full Code Here

        String sourceUri = getParameterAsString(SOURCE_URI);
        org.w3c.dom.Document xmlDoc = SourceUtil.readDOM(sourceUri, this.manager);

        ResourceType resourceType = sourceDoc.getResourceType();
        Schema schema = resourceType.getSchema();
        ValidationUtil.validate(this.manager, xmlDoc, schema, new UsecaseErrorHandler(this));

        if (!hasErrors()) {
            SourceUtil.writeDOM(xmlDoc, sourceDoc.getOutputStream());
            String event = getParameterAsString(EVENT, DEFAULT_EVENT);
            WorkflowUtil
View Full Code Here

    }

    protected void validate(Document xml) throws Exception {
        ResourceType resourceType = getSourceDocument().getResourceType();
        Schema schema = resourceType.getSchema();
        ValidationUtil.validate(this.manager, xml, schema, new UsecaseErrorHandler(this));
    }
View Full Code Here

            ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());
            doc = DocumentHelper.readDocument(in);
           
            ValidationUtil.validate(this.manager, doc, getSourceDocument().getResourceType()
                    .getSchema(), new UsecaseErrorHandler(this));

        } finally {
            if (validationSource != null) {
                resolver.release(validationSource);
            }
View Full Code Here

            if (xmlDoc != null) {
                ResourceType resourceType = getSourceDocument().getResourceType();
                Schema schema = resourceType.getSchema();

                ValidationUtil
                        .validate(this.manager, xmlDoc, schema, new UsecaseErrorHandler(this));

                if (!hasErrors()) {
                    WorkflowUtil.invoke(this.manager, getSession(), getLogger(),
                            getSourceDocument(), getEvent());
                }
View Full Code Here

TOP

Related Classes of org.apache.lenya.cms.usecase.xml.UsecaseErrorHandler

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.