Package com.sforce.soap.metadata

Examples of com.sforce.soap.metadata.RetrieveRequest


        }
        return getRetrieveRequest(lastSupportedEndpointVersion);
    }

    public RetrieveRequest getRetrieveRequest(String apiVersion) {
        RetrieveRequest retrieveRequest = new RetrieveRequest();
        retrieveRequest.setApiVersion(Double.valueOf(apiVersion));
        retrieveRequest.setSinglePackage(true);
        return retrieveRequest;
    }
View Full Code Here


        if (logger.isDebugEnabled()) {
            logger.debug("Packages for " + connection.getLogDisplay() + " " + projectPackageList.toString());
        }

        RetrieveRequest retrieveRequest = getRetrieveRequest();
        retrieveRequest.setPackageNames(projectPackageList.getNamedPackageNames());
        if (defaultMainfest == null) {
            getPackageManifestFactory().setDefaultPackageManifest(connection, retrieveRequest);
        } else {
            retrieveRequest.setUnpackaged(getPackageManifestFactory().convert(defaultMainfest));
        }

        RetrieveResultExt retrieveResultHandler = retrieveWork(connection, retrieveRequest, monitor);
        retrieveResultHandler.setProjectPackageList(projectPackageList);
View Full Code Here

                logger.info("No installed, managed packages to retrieve");
            }
            return new RetrieveResultExt();
        }

        RetrieveRequest retrieveRequest = getRetrieveRequest();
        // installed, managed packages are saved to the project w/ package level (<package-name>/<comonent-type>/etc)
        retrieveRequest.setSinglePackage(false);

        if (Utils.isNotEmpty(projectPackageList.getNamedPackageNames())) {
            retrieveRequest.setPackageNames(projectPackageList.getNamedPackageNames());
        }

        RetrieveResultExt resultExt = retrieveWork(connection, retrieveRequest, monitor);
        resultExt.setProjectPackageList(projectPackageList);
View Full Code Here

            return null;
        }

        Connection connection = getConnectionFactory().getConnection(project);

        RetrieveRequest retrieveRequest = getRetrieveRequest();
        // installed, managed packages are saved to the project w/ package level (<package-name>/<comonent-type>/etc)
        retrieveRequest.setSinglePackage(false);
        retrieveRequest.setPackageNames(packageNames);

        RetrieveResultExt resultExt = retrieveWork(connection, retrieveRequest, monitor);
        resultExt.setProjectPackageList(getProjectPackageFactory().getManagedInstalledProjectPackages(connection,
            packageNames));
        return resultExt;
View Full Code Here

        if (Utils.isEmpty(filePaths)) {
            logger.warn("Nothing to retrieve - filename list is empty");
            return null;
        }

        RetrieveRequest retrieveRequest = getRetrieveRequest();

        // specific files
        retrieveRequest.setSpecificFiles(filePaths);

        // set unpackaged manifest or package naming; if the former and the project's package.xml refers to a
        // package (name=<something>), adjust on the fly to retrieve unpacakged content using package.xml definitions
        Package packageManifest = null;
        if (Utils.isEmpty(packageName) || Constants.DEFAULT_PACKAGED_NAME.equals(packageName)) {
            if (project != null) {
                packageManifest = getPackageManifestFactory().getPackageManifest(project);
            } else {
                packageManifest = getPackageManifestFactory().createDefaultPackageManifest();
            }

            packageManifest.setFullName(packageName);
            retrieveRequest.setUnpackaged(getPackageManifestFactory().convert(packageManifest));
        } else {
            retrieveRequest.setPackageNames(new String[] { packageName });
        }

        monitorWork(monitor);
        RetrieveResultExt retrieveResultExt = retrieveWork(connection, retrieveRequest, monitor);
        return retrieveResultExt;
View Full Code Here

        if (projectPackageList.isEmpty()) {
            logger.warn("Nothing to retrieve - ProjectPackageList is empty");
            return null;
        }

        RetrieveRequest retrieveRequest = getRetrieveRequest();

        // specific files
        String[] filePaths = projectPackageList.getComponentFilePathArray(true);
        if (selective && Utils.isNotEmpty(filePaths)) {
            retrieveRequest.setSpecificFiles(filePaths);
        }

        // specific packages
        retrieveRequest.setPackageNames(projectPackageList.getNamedPackageNames());

        // default package
        Package defaultPackageManifest = null;
        if (projectPackageList.hasPackage(Constants.DEFAULT_PACKAGED_NAME)) {
            if (logger.isDebugEnabled()) {
                logger.debug("Include retrieval of default package manifest");
            }
            defaultPackageManifest = getPackageManifestFactory().getDefaultPackageManifest(projectPackageList);
            retrieveRequest.setUnpackaged(getPackageManifestFactory().convert(defaultPackageManifest));
        }

        monitorWork(monitor);
        RetrieveResultExt retrieveResultExt = retrieveWork(connection, retrieveRequest, monitor);
        retrieveResultExt.setProjectPackageList(projectPackageList);
View Full Code Here

        if (projectPackageList.isEmpty()) {
            logger.warn("Nothing to retrieve - ProjectPackageList is empty");
            return null;
        }

        RetrieveRequest retrieveRequest = getRetrieveRequest();

        // specific files
        String[] filePaths = projectPackageList.getComponentFilePathArray(true);
        if (selective && Utils.isNotEmpty(filePaths)) {
            retrieveRequest.setSpecificFiles(filePaths);
        }

        // specific packages
        retrieveRequest.setPackageNames(projectPackageList.getNamedPackageNames());

        // default package
        if (packageManifest == null) {
            packageManifest = getPackageManifestFactory().getDefaultPackageManifest(projectPackageList);
        }

        retrieveRequest.setUnpackaged(getPackageManifestFactory().convert(packageManifest));

        monitorWork(monitor);
        RetrieveResultExt retrieveResultExt = retrieveWork(connection, retrieveRequest, monitor);
        retrieveResultExt.setProjectPackageList(projectPackageList);
        return retrieveResultExt;
View Full Code Here

        if (logger.isDebugEnabled()) {
            logger.debug("Retrieving selective component types for given packages from " + connection.getLogDisplay());
        }

        RetrieveRequest retrieveRequest = getRetrieveRequest();
        retrieveRequest.setPackageNames(projectPackageList.getNamedPackageNames());
        IProject project = projectPackageList.getProject();
        Package packageManifest = null;
        // using setSpecificFile machanism to refresh component folder(s) when component type(s) has associated
        // component type. Otherwise, refresh using sub-stanzas of package.xml
        if (projectPackageList.hasPackage(Constants.DEFAULT_PACKAGED_NAME)) {
            if (hasComponentTypeWthAssociatedComponentTypes(componentTypes)) {
                String[] filePaths = getFilePathsByComponentTypes(project, connection, componentTypes);
                if (logger.isDebugEnabled()) {
                    logRefreshFilePaths(filePaths);
                }

                if (Utils.isNotEmpty(filePaths)) {
                    retrieveRequest.setSpecificFiles(filePaths);
                }

                if (projectPackageList.hasPackage(Constants.DEFAULT_PACKAGED_NAME)) {
                    if (logger.isDebugEnabled()) {
                        logger.debug("Include retrieval of default package manifest");
                    }
                    packageManifest = getPackageManifestFactory().getDefaultPackageManifest(projectPackageList);

                }
            } else {
                if (logger.isDebugEnabled()) {
                    logger.debug("Include retrieval of subset of stanzas from default package manifest");
                }
                packageManifest =
                        getPackageManifestFactory().getPackageManifestForComponentTypes(project,
                            Constants.DEFAULT_PACKAGED_NAME, componentTypes, true);
            }
            retrieveRequest.setUnpackaged(getPackageManifestFactory().convert(packageManifest));
        }

        RetrieveResultExt retrieveResultExt = retrieveWork(connection, retrieveRequest, monitor);
        retrieveResultExt.setProjectPackageList(projectPackageList);
        return retrieveResultExt;
View Full Code Here

            InterruptedException {
        if (connection == null) {
            throw new IllegalArgumentException("Connection cannot be null");
        }

        RetrieveRequest retrieveRequest = getRetrieveRequest();

        if (Utils.isNotEmpty(packageNames)) {
            retrieveRequest.setPackageNames(packageNames);
        }

        if (packageManifest != null) {
            retrieveRequest.setUnpackaged(getPackageManifestFactory().convert(packageManifest));
        }

        RetrieveResultExt resultExt = retrieveWork(connection, retrieveRequest, monitor);
        ProjectPackageList projectPackageList = getProjectPackageFactory().getProjectPackageListInstance(packageNames);
View Full Code Here

TOP

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

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.