Package org.rhq.enterprise.server.sync.validators

Examples of org.rhq.enterprise.server.sync.validators.ConsistencyValidator


            while (rdr.hasNext()) {
                switch (rdr.next()) {
                case XMLStreamConstants.START_ELEMENT:
                    String tagName = rdr.getName().getLocalPart();
                    if (SynchronizationConstants.VALIDATOR_ELEMENT.equals(tagName)) {
                        ConsistencyValidator validator = null;
                        String validatorClass = rdr.getAttributeValue(null, SynchronizationConstants.CLASS_ATTRIBUTE);
                        if (!isConsistencyValidatorClass(validatorClass)) {
                            LOG.info("The export file contains an unknown consistency validator: " + validatorClass + ". Ignoring.");
                            continue;
                        }
View Full Code Here


    }

    private ConsistencyValidator validateSingle(XMLStreamReader rdr, Subject subject) throws InstantiationException,
        IllegalAccessException, ClassNotFoundException, XMLStreamException, InconsistentStateException {
        String validatorClassName = rdr.getAttributeValue(null, SynchronizationConstants.CLASS_ATTRIBUTE);
        ConsistencyValidator validator = instantiate(
            validatorClassName,
            ConsistencyValidator.class,
            "The validator class denoted in the export file ('%s') does not implement the ConsistencyValidator interface. This should not happen.");

        //init the validator
        validator.initialize(subject, entityManager);

        //perform the validation
        validator.initializeExportedStateValidation(new ExportReader(rdr));
        validator.validateExportedState();

        return validator;
    }
View Full Code Here

TOP

Related Classes of org.rhq.enterprise.server.sync.validators.ConsistencyValidator

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.