Package com.salesforce.ide.deployment.internal

Examples of com.salesforce.ide.deployment.internal.DeploymentResult


            }
        });
    }

    private void generateResultsView(DeploymentController deploymentWizardController) {
        DeploymentResult deploymentResult = deploymentWizardController.getDeploymentResult();
        if (deploymentResult == null) {
            logger.warn("Unable to generate results view.  Deployment result is null");
            return;
        }

        try {
            ResultsViewShell resultsView =
                    new ResultsViewShell(getShell(), deploymentResult.getDeployLog(), deploymentResult
                        .getRemoteDeployLog(), deploymentWizardController.getDeploymentWizardModel()
                        .getProjectName());

            prepareResultsViewComposite(resultsView.getResultsComposite(), deploymentWizardController);
View Full Code Here


        } catch (Exception e) {
            logger.warn("Unable to change deploy manifest", e);
        }

        // prepare result and record datetime
        DeploymentResult result = new DeploymentResult();
        result.setDeployTime(new GregorianCalendar());
        result.setDeploymentPayload(deploymentPayload);
        result.setDestinationOrg(connection.getConnectionInfo());
        result.setSourceProjectName(deploymentPayload.getProject().getName());
        result.setSourceEndpoint(serviceLocator.getProjectService().getSoapEndPoint(deploymentPayload.getProject()));
        result.setSourceUsername(serviceLocator.getProjectService().getUsername(deploymentPayload.getProject()));

        DeployOptions deployOptions = makeDefaultDeployOptions(checkOnly, serviceLocator.getPackageDeployService());

        LogInfo[] runTestLogSettings =
                serviceLocator.getLoggingService().getAllLogInfo(getProject(), LoggingInfo.SupportedFeatureEnum.RunTest);

        DeployResultExt deployResultHandler = null;
        try {
            deployResultHandler =
                    serviceLocator.getPackageDeployService().deploy(connection, projectPackageList, deployOptions, runTestLogSettings,
                        false, new SubProgressMonitor(monitor, 6));
        } catch (ServiceTimeoutException ex) {
            deployResultHandler = serviceLocator.getPackageDeployService().handleDeployServiceTimeoutException(ex, "deploy", monitor);
        }

        result.setDeployResultHandler(deployResultHandler);

        if (deployResultHandler != null && !deployResultHandler.isSuccess()) {
            StringBuffer strBuff = new StringBuffer("Deployment FAILED.  ");
            DeployMessageExt messageHandler = deployResultHandler.getMessageHandler();
            if (messageHandler != null) {
View Full Code Here

    }

    protected void prepareResultsViewComposite(DeploymentResultsComposite resultsComposite,
            DeploymentController deploymentWizardController) {

        DeploymentResult deploymentResult = deploymentWizardController.getDeploymentResult();
        if (deploymentResult == null) {
            logger.warn(DeploymentMessages.getString("DeploymentWizard.BaseDeploymentPage.NoResults.message"));
            Utils.openQuestion(DeploymentMessages.getString("DeploymentWizard.BaseDeploymentPage.NoResults.title"),
                DeploymentMessages.getString("DeploymentWizard.BaseDeploymentPage.NoResults.message"));
            return;
        }

        // set page description
        resultsComposite.setLblResult(deploymentResult.isSuccess());
        DeployResultExt result = deploymentResult.getDeployResultHandler();
        if (!deploymentResult.isSuccess()) {
            if (result != null && result.getMessageCount() == 0) {
                resultsComposite.setLblReason(result.getMessageHandler().getDisplayMessages()[0]);
            } else if (result != null && result.getMessageCount() > 1) {
                resultsComposite.setLblReason(DeploymentMessages
                        .getString("DeploymentWizard.Results.MultipleProblems.message"));
            }
        } else {
            resultsComposite.setLblReason(DeploymentMessages.getString("DeploymentWizard.Results.Success.message"));
        }

        // create results tree
        DeployResultsViewAssembler assembler =
                new DeployResultsViewAssembler(result == null ? new EmptyDeployResultExt() : result, resultsComposite
                        .getTreeResults(), deploymentWizardController.getProject(), ContainerDelegate.getInstance().getServiceLocator().getProjectService());
        assembler.assembleDeployResultsTree();

        LogViewShell logView =
                new LogViewShell(getShell(), deploymentResult.getDeployLog(), deploymentResult.getRemoteDeployLog(),
                        deploymentWizardController.getDeploymentWizardModel().getProjectName());
        resultsComposite.setLogShellView(logView);

    }
View Full Code Here

TOP

Related Classes of com.salesforce.ide.deployment.internal.DeploymentResult

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.