Examples of MetadataExt


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

        if (logger.isDebugEnabled()) {
            logger.debug("Parsing and creating MetadataExt instance '"
                    + componentFile.getProjectRelativePath().toPortableString() + "'");
        }

        MetadataExt metadataExt = component.getDefaultMetadataExtInstance();
        Unmarshaller unmarshaller = JAXBContext.newInstance(metadataExt.getClass()).createUnmarshaller();
        JAXBElement<? extends MetadataExt> root =
                unmarshaller.unmarshal(new StreamSource(componentFile.getRawLocation().toFile()), metadataExt
                        .getClass());
        return root.getValue();
    }
View Full Code Here

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

        this.packageName = packageName;
    }

    // lookup method injection by container
    public MetadataExt getDefaultMetadataExtInstance() throws InstantiationException, IllegalAccessException {
        return new MetadataExt();
    }
View Full Code Here

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

    public void setBuiltInSubFolders(List<String> builtInSubFolders) {
        this.builtInSubFolders = builtInSubFolders;
    }

    public MetadataExt getMetadataExtFromBody() throws InstantiationException, IllegalAccessException, JAXBException {
        MetadataExt metadataExt = getDefaultMetadataExtInstance();
        return metadataExt.getComponentFromXML(body);
    }
View Full Code Here

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

        return metadataExt.getComponentFromXML(body);
    }

    public MetadataExt getMetadataExtFromBody(boolean validate, ValidationEventHandler validationEventHandler)
            throws InstantiationException, IllegalAccessException, JAXBException {
        MetadataExt metadataExt = getDefaultMetadataExtInstance();
        return metadataExt.getComponentFromXML(body, validate, validationEventHandler);
    }
View Full Code Here

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

            logger.warn("Component body and/or to-be-retrieved component type are null or empty");
            return null;
        }

        Object value = null;
        MetadataExt metadataExt = getMetadataExtFromBody();
        Method getterMethod = Utils.getGetterMethod(metadataExt.getClass(), componentType + "s");

        if (getterMethod == null) {
            logger.warn("No getter method found for property with name '" + componentType + "' on class '"
                    + metadataExt.getClass() + "' - trying plural");
            return value;
        }

        if (logger.isDebugEnabled()) {
            logger.debug("Invoking method '" + getterMethod.getName() + "' on instance of '" + metadataExt.getClass()
                    + "'");
        }

        Object[] args = null;
        return getterMethod.invoke(metadataExt, args);
View Full Code Here

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

            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

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

    }

    @Override
    public void saveUserInput() throws InstantiationException, IllegalAccessException {
        // create metadata instance and save metadata input values
        MetadataExt metadataExt =
                componentWizard.getComponentWizardModel().getComponent().getDefaultMetadataExtInstance();
        metadataExt.setFullName(componentWizardComposite.getNameString());
    }
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.