Package com.sforce.soap.metadata

Examples of com.sforce.soap.metadata.DescribeMetadataResult


        // Prepare Salesforce metadata metadata for repository scan
        RepositoryScanResult repositoryScanResult = new RepositoryScanResult();
        RepositoryItem repositoryContainer = new RepositoryItem();
        repositoryContainer.repositoryItems = new ArrayList<RepositoryItem>();
        repositoryScanResult.metadataFolderBySuffix = new HashMap<String, DescribeMetadataObject>();
        DescribeMetadataResult metadataDescribeResult = forceConnector.getMetadataConnection().describeMetadata(29.0); // TODO: Make version configurable / auto
        for(DescribeMetadataObject describeObject : metadataDescribeResult.getMetadataObjects())
        {
          repositoryScanResult.metadataFolderBySuffix.put(describeObject.getSuffix(), describeObject);
          if(describeObject.getMetaFile())
            repositoryScanResult.metadataFolderBySuffix.put(describeObject.getSuffix() + "-meta.xml", describeObject);
        }
View Full Code Here


    public String getNamespace() throws ConnectionException {
        if (metadataConnection == null) {
            initMetadataConnection();
        }
        if (!config.isNamespaceInitialized()) {
            DescribeMetadataResult result = metadataConnection.describeMetadata(DESCRIBE_METADATA_VERSION);
            String organizationNamespace = result.getOrganizationNamespace();
            config.setNamespace(organizationNamespace != null && organizationNamespace.length() > 0
                    ? organizationNamespace : null);
        }
        return config.getNamespace();
    }
View Full Code Here

        assertEquals(userInfoResult.getUserId(), userInfo.getUserId());
        assertEquals(userInfoResult.getUserName(), userInfo.getUserName());
    }
   
    protected void verifyConnection(MetadataConnection conn) throws ConnectionException {
        DescribeMetadataResult descMetadataResult = conn.describeMetadata(DESCRIBE_METADATA_VERSION);
        assertNotNull(descMetadataResult);
       
        // Mimic namespace processing in ForceServiceConnector.getNamespace
        String namespace = descMetadataResult.getOrganizationNamespace();
        verifyNamespace(namespace != null && namespace.length() > 0 ? namespace : null);
    }
View Full Code Here

        if (logger.isDebugEnabled()) {
            logger.debug("Timeout set to " + getReadTimeout() + " milliseconds");
        }
       
        DescribeMetadataResult describeMetadataResult = null;
        try {
            describeMetadataResult = metadataConnection.describeMetadata(version);
        } catch (ConnectionException e) {
            ForceExceptionUtils.throwTranslatedException(e, connection);
        }
View Full Code Here

            throws ForceRemoteException, InvalidLoginException, ForceConnectionException, InterruptedException {
        if (metadataStubExt == null) {
            throw new IllegalArgumentException("MetadataStubExt cannot be null");
        }
        monitorCheck(monitor);
        DescribeMetadataResult describeMetadataResult = metadataStubExt.describeMetadata();
        if (describeMetadataResult == null) {
            logger.warn("Returned DescribeMetadataResult is null");
            return null;
        }
        DescribeMetadataResultExt describeMetadataResultExt = new DescribeMetadataResultExt(describeMetadataResult);
View Full Code Here

TOP

Related Classes of com.sforce.soap.metadata.DescribeMetadataResult

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.