Examples of DescribeObjectRegistry


Examples of com.salesforce.ide.core.remote.registries.DescribeObjectRegistry

    @Override
    public void loadAdditionalComponentAttributes() throws FactoryException, JAXBException {
        com.salesforce.ide.api.metadata.types.ReportType reportType = null;
        DescribeSObjectResult primaryObject = null;
        DescribeObjectRegistry describeObjectRegistry = null;

        try {
            reportType = (com.salesforce.ide.api.metadata.types.ReportType) component.getDefaultMetadataExtInstance();
            describeObjectRegistry = getComponentFactory().getConnectionFactory().getDescribeObjectRegistry();
            // BaseObject here is plural form save from user inpurt in Ui
            primaryObject =
                    describeObjectRegistry.getCachedDescribeByPluralLabel(getProject(), reportType.getBaseObject());
        } catch (InstantiationException e) {
            logger.warn("Unable to instantiate default metadataExt instance for Report Type", e);
        } catch (IllegalAccessException e) {
            logger.warn("Unable to instantiate default metadataExt instance for Report Type", e);
        } catch (Exception e) {
            logger.warn("Unable to get describeObject for " + reportType.getBaseObject(), e);
        }

        if (Utils.isEmpty(primaryObject)) {
            logger.error("Unable to load additional component attributes for Report Type '" + reportType.getLabel()
                    + "' due to unable to locate primary object '" + reportType.getBaseObject()
                    + "' from DescribeObjectRegistry");
            return;
        }
        // load all fields & sections from primary object
        ReportLayoutSection section = new ReportLayoutSection();
        section.setMasterLabel(primaryObject.getLabelPlural()); // Master label is plural label of describeObject

        // exclude fields that describeSObject returned as extra: default + sobject specific set.
        List<String> excludeFieldList = new ArrayList<String>();
        List<String> defaultExcludeFieldList =
                describeObjectRegistry.getExcludedCrtFields().get(DEFAULT_EXCLUDED_FIELD_KEY);
        excludeFieldList.addAll(defaultExcludeFieldList);
        List<String> sObjectSpecificExcludedList =
                describeObjectRegistry.getExcludedCrtFields().get(primaryObject.getName());
        if (Utils.isNotEmpty(sObjectSpecificExcludedList)) {
            excludeFieldList.addAll(sObjectSpecificExcludedList);
        }

        String tableName = primaryObject.getName(); // Table label is name of describeSObject
View Full Code Here

Examples of com.salesforce.ide.core.remote.registries.DescribeObjectRegistry

        if (project == null) {
            return null;
        }

        Connection connection = ContainerDelegate.getInstance().getFactoryLocator().getConnectionFactory().getConnection(project);
        DescribeObjectRegistry describeObjectRegistry = ContainerDelegate.getInstance().getFactoryLocator().getConnectionFactory().getDescribeObjectRegistry();
        return describeObjectRegistry.getCachedDescribeSObjectNames(connection, project.getName(), refresh);
    }
View Full Code Here

Examples of com.salesforce.ide.core.remote.registries.DescribeObjectRegistry

        String objectAPIName = layout.getName().substring(0, layout.getName().indexOf("-"));
        // need to construct the object label because that's used in the default layout name.
        String objectLabel = null;

        //get the object from the cache based on the object api name
        DescribeObjectRegistry describeObjectRegistry = ContainerDelegate.getInstance().getFactoryLocator().getConnectionFactory().getDescribeObjectRegistry();
        DescribeSObjectResult cachedDescribeSObject = null;
        try {
            cachedDescribeSObject =
                    describeObjectRegistry.getCachedDescribeSObjectByApiName(getComponentWizardModel().getProject()
                            .getName(), objectAPIName);
        } catch (Exception e) {
            logger.error("Unable to get object given the object name: " + e.getMessage());
            throw new InvocationTargetException(e);
        }
View Full Code Here

Examples of com.salesforce.ide.core.remote.registries.DescribeObjectRegistry

        if (project == null) {
            return null;
        }

        String namespaceTobeStrip = ContainerDelegate.getInstance().getServiceLocator().getProjectService().getNamespacePrefix(project);
        DescribeObjectRegistry describeObjectRegistry = ContainerDelegate.getInstance().getFactoryLocator().getConnectionFactory().getDescribeObjectRegistry();

        return describeObjectRegistry.getCachedLayoutableDescribeTypes(project, refresh, namespaceTobeStrip);
    }
View Full Code Here

Examples of com.salesforce.ide.core.remote.registries.DescribeObjectRegistry

        if (project == null) {
            return null;
        }

        String namespace = ContainerDelegate.getInstance().getServiceLocator().getProjectService().getNamespacePrefix(project);
        DescribeObjectRegistry describeObjectRegistry = ContainerDelegate.getInstance().getFactoryLocator().getConnectionFactory().getDescribeObjectRegistry();

        return describeObjectRegistry.getCachedWorkflowableDescribeTypes(project, refresh, namespace);
    }
View Full Code Here

Examples of com.salesforce.ide.core.remote.registries.DescribeObjectRegistry

        if (project == null) {
            return null;
        }

        DescribeObjectRegistry describeObjectRegistry = ContainerDelegate.getInstance().getFactoryLocator().getConnectionFactory().getDescribeObjectRegistry();

        return describeObjectRegistry.getCachedTriggerableDescribeTypes(project, refresh);
    }
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.