Package com.salesforce.ide.core.remote.metadata

Examples of com.salesforce.ide.core.remote.metadata.RetrieveResultExt


        monitorCheck(monitor);
        if (Utils.isNotEmpty(getFolder(syncResources, Constants.SOURCE_FOLDER_NAME))) {
            String packageName = ContainerDelegate.getInstance().getServiceLocator().getProjectService().getPackageName(getProject());

            // perform retrieve
            RetrieveResultExt retrieveResultHandler =
                    ContainerDelegate.getInstance().getServiceLocator().getPackageRetrieveService().retrievePackage(getProject(), packageName, monitor);

            if (retrieveResultHandler == null) {
                logger.warn("Unable to sync source root - retrieve result is null");
                return;
            }

            monitorWork(monitor);
            remoteProjectPackageList.generateComponents(retrieveResultHandler.getZipFile(), retrieveResultHandler
                    .getFileMetadataHandler(), new SubProgressMonitor(monitor, 3));
        }
    }
View Full Code Here


        // doesn't prompt with 'unable to write'
        IFolder referencePkgFolder = getProjectService().getReferencedPackagesFolder(project);
        Utils.adjustResourceReadOnly(referencePkgFolder, false, true);

        monitorCheck(monitor);
        RetrieveResultExt retrieveResultHandler = null;
        try {
            retrieveResultHandler =
                getServiceLocator().getPackageRetrieveService().retrieveManagedInstalledPackages(project, monitor);
        } catch (ServiceTimeoutException ex) {
            retrieveResultHandler =
                getServiceLocator().getPackageRetrieveService().handleRetrieveServiceTimeoutException(ex, OPERATION,
                        monitor);
            if (retrieveResultHandler != null) {
                Connection connection = getConnectionFactory().getConnection(project);
                ProjectPackageList projectPackageList =
                        getProjectPackageFactory().getManagedInstalledProjectPackages(connection);
                if (projectPackageList != null) {
                    projectPackageList.setProject(project);
                }
                retrieveResultHandler.setProjectPackageList(projectPackageList);
            }
        }

        if (retrieveResultHandler == null) {
            logger.warn("Unable to refresh installed packages - retrieve result is null");
            return false;
        }

        if (retrieveResultHandler.getZipFileCount() == 0) {
            return true;
        }

        if (Utils.isNotEmpty(retrieveResultHandler.getProjectPackageList())) {
            retrieveResultHandler.getProjectPackageList().setProject(project);
        }

        monitorCheck(monitor);
        return getProjectService().handleRetrieveResult(retrieveResultHandler.getProjectPackageList(),
            retrieveResultHandler, true, null, monitor);
    }
View Full Code Here

                // only save these types
                String[] saveComponentTypes = componentTypes.toArray(new String[componentTypes.size()]);

                // perform retrieve
                RetrieveResultExt retrieveResultHandler =
                        ContainerDelegate.getInstance().getServiceLocator().getPackageRetrieveService().retrieveSelective(localProjectPackageList,
                            saveComponentTypes, monitor);

                remoteProjectPackageList.generateComponents(retrieveResultHandler.getZipFile(), retrieveResultHandler
                        .getFileMetadataHandler(), new SubProgressMonitor(monitor, 3));
            }
        }
    }
View Full Code Here

            ProjectPackageList localProjectPackageList =
                    ContainerDelegate.getInstance().getServiceLocator().getProjectService().getProjectContents(sourceResources, monitor);
            localProjectPackageList.setProject(getProject());
            monitorCheck(monitor);
            RetrieveResultExt retrieveResultHandler =
                    ContainerDelegate.getInstance().getServiceLocator().getPackageRetrieveService()
                            .retrieveSelective(localProjectPackageList, true, monitor);

            remoteProjectPackageList.generateComponents(retrieveResultHandler.getZipFile(), retrieveResultHandler
                    .getFileMetadataHandler(), new SubProgressMonitor(monitor, 3));
        }
    }
View Full Code Here

                // only save these types
                String[] saveComponentTypes = componentTypes.toArray(new String[componentTypes.size()]);

                // perform retrieve
                RetrieveResultExt retrieveResultHandler = null;
                try {
                    retrieveResultHandler =
                        getServiceLocator().getPackageRetrieveService().retrieveSelective(projectPackageList,
                                saveComponentTypes, monitor);
                } catch (ServiceTimeoutException ex) {
View Full Code Here

            }

            ProjectPackageList projectPackageList = getProjectService().getProjectContents(sourceResources, monitor);
            projectPackageList.setProject(project);
            monitorCheck(monitor);
            RetrieveResultExt retrieveResultHandler = null;
            try {
                retrieveResultHandler =
                    getServiceLocator().getPackageRetrieveService().retrieveSelective(projectPackageList, true, monitor);
            } catch (ServiceTimeoutException ex) {
                retrieveResultHandler =
View Full Code Here

        Connection connection = getConnectionFactory().getConnection(project);
        Package defaultMainfest = null;
        if (includeDefaultManifest) {
            defaultMainfest = getPackageManifestFactory().getDefaultPackageManifest(project);
        }
        RetrieveResultExt retrieveResultHandler = retrieveAll(connection, defaultMainfest, monitor);
        retrieveResultHandler.getProjectPackageList().setProject(project);
        return retrieveResultHandler;
    }
View Full Code Here

            getPackageManifestFactory().setDefaultPackageManifest(connection, retrieveRequest);
        } else {
            retrieveRequest.setUnpackaged(getPackageManifestFactory().convert(defaultMainfest));
        }

        RetrieveResultExt retrieveResultHandler = retrieveWork(connection, retrieveRequest, monitor);
        retrieveResultHandler.setProjectPackageList(projectPackageList);

        return retrieveResultHandler;
    }
View Full Code Here

        if (Utils.isEmpty(projectPackageList)) {
            if (logger.isInfoEnabled()) {
                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);

        return resultExt;
    }
View Full Code Here

        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

TOP

Related Classes of com.salesforce.ide.core.remote.metadata.RetrieveResultExt

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.