Package com.salesforce.ide.api.metadata.types

Examples of com.salesforce.ide.api.metadata.types.MetadataValidationEventCollector


            // if exist and has changed, store to be exposed in ui and later saved to project
            Component remoteComponent = remoteProjectPackageList.getComponentByFilePath(localComponent
                    .getMetadataFilePath());

            // phase 1 - validate xml against current schema
            MetadataValidationEventCollector metadataValidationEventCollector = new MetadataValidationEventCollector();
            MetadataExt metadataExt = null;
            try {
                metadataExt = localComponent.getMetadataExtFromBody(true, metadataValidationEventCollector);

                // if validation issues are found, we have a conflict
                if (metadataValidationEventCollector.hasValidationIssues()) {
                    if (metadataExt != null) {
                        metadataValidationEventCollector.logValidationMessages(metadataExt.getFullName());
                    }
                    // store conflict and continue to next bypassing phase two
                    addConflict(upgradeConflicts, localComponent, remoteComponent);

                    if (logger.isDebugEnabled()) {
                        logger.debug("Added " + localComponent.getFullDisplayName()
                                + " as upgrade consideration - schema validation failed");
                    }

                    monitorWork(subMonitor);
                    continue;
                }
            } catch (UnmarshalException e) {
                // sometimes, for some reason, parsing issues will throw an exception despite
                // MetadataValidationEventCollector.failOnValidateError used in
                // MetadataValidationEventCollector.handleEvent to capture parsing issues and enable recovery
                if (metadataExt != null) {
                    metadataValidationEventCollector.logValidationMessages(metadataExt.getFullName());
                }
                // store conflict and continue to next bypassing phase two
                addConflict(upgradeConflicts, localComponent, remoteComponent);

                if (logger.isDebugEnabled()) {
View Full Code Here

TOP

Related Classes of com.salesforce.ide.api.metadata.types.MetadataValidationEventCollector

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.