Examples of validate()


Examples of org.apache.geronimo.deployment.xbeans.ConfigurationDocument.validate()

                configurationDoc = (ConfigurationDocument) xmlObject;
            } else {
                configurationDoc = (ConfigurationDocument) xmlObject.changeType(ConfigurationDocument.type);
            }
            Collection errors = new ArrayList();
            if (!configurationDoc.validate(XmlBeansUtil.createXmlOptions(errors))) {
                throw new DeploymentException("Invalid deployment descriptor: " + errors + "\nDescriptor: " + configurationDoc.toString());
            }
            return configurationDoc.getConfiguration();
        } catch (XmlException e) {
            throw new DeploymentException("Could not parse xml in plan", e);
View Full Code Here

Examples of org.apache.geronimo.deployment.xbeans.EnvironmentType.validate()

        try {
            XmlOptions xmlOptions = new XmlOptions();
            xmlOptions.setLoadLineNumbers();
            Collection errors = new ArrayList();
            xmlOptions.setErrorListener(errors);
            if (!environmentType.validate(xmlOptions)) {
                throw new XmlException("Invalid deployment descriptor: " + errors + "\nDescriptor: " + environmentType.toString(), null, errors);
            }
        } catch (XmlException e) {
            throw new DeploymentException(e);
        }
View Full Code Here

Examples of org.apache.geronimo.deployment.xbeans.ModuleDocument.validate()

                moduleDoc = (ModuleDocument) xmlObject;
            } else {
                moduleDoc = (ModuleDocument) xmlObject.changeType(ModuleDocument.type);
            }
            Collection errors = new ArrayList();
            if (!moduleDoc.validate(XmlBeansUtil.createXmlOptions(errors))) {
                throw new DeploymentException("Invalid deployment descriptor: " + errors + "\nDescriptor: " + moduleDoc.toString());
            }
            // If there's no artifact ID and we won't be able to figure one out later, use the plan file name.  Bit of a hack.
            if(jarFile == null && (moduleDoc.getModule().getEnvironment() == null ||
                        moduleDoc.getModule().getEnvironment().getModuleId() == null ||
View Full Code Here

Examples of org.apache.geronimo.validator.Validator.validate()

            InputStream in = loader.getResourceAsStream("META-INF/ejb-jar.xml");

            EjbJarDocument jar = EjbJarDocument.Factory.parse(in);
            Validator v =new EjbValidator();
            v.initialize(new PrintWriter(new OutputStreamWriter(System.out), true), args[0], loader, ModuleType.EJB, new XmlObject[]{jar}, null);
            System.out.println("Validation Result: "+v.validate());
        } catch(Exception e) {
            e.printStackTrace();
        }
    }
}
View Full Code Here

Examples of org.apache.geronimo.xbeans.geronimo.GerConnectorDocument.validate()

    public void testLoadGeronimoDeploymentDescriptor() throws Exception {
        InputStream geronimoInputStream = geronimoDD.openStream();
        GerConnectorDocument connectorDocument = GerConnectorDocument.Factory.parse(geronimoInputStream);
        assertEquals(1, connectorDocument.getConnector().getResourceadapterArray().length);
        if (!connectorDocument.validate(xmlOptions)) {
            fail(errors.toString());
        }

    }
View Full Code Here

Examples of org.apache.geronimo.xbeans.geronimo.loginconfig.GerLoginConfigType.validate()

        GerLoginConfigType loginConfig = (GerLoginConfigType) xmlObject.copy().changeType(GerLoginConfigType.type);
        XmlOptions xmlOptions = new XmlOptions();
        xmlOptions.setLoadLineNumbers();
        Collection errors = new ArrayList();
        xmlOptions.setErrorListener(errors);
        if (!loginConfig.validate(xmlOptions)) {
            throw new DeploymentException("Invalid login configuration:\n" + errors + "\nDescriptor: " + loginConfig.toString());
        }
        XmlCursor xmlCursor = loginConfig.newCursor();
        ObjectName nextName = null;
        try {
View Full Code Here

Examples of org.apache.geronimo.xbeans.j2ee.ConnectorDocument.validate()

    public void testLoadJ2eeDeploymentDescriptor() throws Exception {
        InputStream j2eeInputStream = j2eeDD.openStream();
        ConnectorDocument connectorDocument = ConnectorDocument.Factory.parse(j2eeInputStream);
        assertNotNull(connectorDocument.getConnector().getResourceadapter());
        if (!connectorDocument.validate(xmlOptions)) {
            fail(errors.toString());
        }
    }

    public void testLoadGeronimoDeploymentDescriptor() throws Exception {
View Full Code Here

Examples of org.apache.geronimo.xbeans.j2ee.connector_1_0.ConnectorDocument.validate()

        ConnectorDocument connectorDocument = ConnectorDocument.Factory.parse(new UnclosableInputStream(jarInputStream));
        XmlOptions xmlOptions = new XmlOptions();
        xmlOptions.setLoadLineNumbers();
        Collection errors = new ArrayList();
        xmlOptions.setErrorListener(errors);
        if (!connectorDocument.validate(xmlOptions)) {
            throw new DeploymentException("Invalid deployment descriptor: errors: " + errors);
        }
        return connectorDocument;
    }
View Full Code Here

Examples of org.apache.geronimo.xbeans.j2ee.connector_1_0.ConnectorDocument10.validate()

    public void testLoadJ2eeDeploymentDescriptor() throws Exception {
        InputStream j2eeInputStream = j2eeDD.openStream();
        ConnectorDocument10 connectorDocument = ConnectorDocument10.Factory.parse(j2eeInputStream);
        assertNotNull(connectorDocument.getConnector().getResourceadapter());
        if (!connectorDocument.validate(xmlOptions)) {
            fail(errors.toString());
        }
    }

    public void testLoadGeronimoDeploymentDescriptor() throws Exception {
View Full Code Here

Examples of org.apache.hadoop.hbase.hbql.mapping.TableMapping.validate()

                                                             this.getMappingContext().getMappingName(),
                                                             this.getTableName(),
                                                             this.getKeyInfo(),
                                                             this.getFamilyMappingList());
        this.getMappingContext().setMapping(tableMapping);
        tableMapping.validate(tableMapping.getMappingName());
        return new ExecutionResults("Mapping " + tableMapping.getMappingName() + " defined.");
    }

    public static String usage() {
        return "CREATE [TEMP] MAPPING mapping_name [FOR TABLE table_name] [(key_name KEY [WIDTH int_expr], family_mapping_list)] [IF bool_expr]";
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.