Package com.salesforce.ide.core.remote

Examples of com.salesforce.ide.core.remote.InsufficientPermissionsException


            Throwable cause = e.getTargetException();
            if (cause instanceof InsufficientPermissionsException) {
                // log failure; option enabling occurs downstream
                logger.warn("Insufficient permissions to upgrade project: " + cause.getMessage());

                InsufficientPermissionsException ex = (InsufficientPermissionsException) cause;
                // occurred during project create/update which determines message text
                ex.setShowUpdateCredentialsMessage(true);

                // show dialog
                DialogUtils.getInstance().presentInsufficientPermissionsDialog(ex);

                updateErrorStatus(Messages.getString("InsufficientPermissions.User.OrganizationSettings.message",
                    new String[] { ex.getConnection().getUsername() }));

                return this;
            } else if (cause instanceof InvalidLoginException) {
                // log failure
                logger.warn("Unable to perform upgrade: " + cause.getMessage());

                InvalidLoginException ex = (InvalidLoginException) cause;
                // occurred during project create/update which determines message text
                ex.setShowUpdateCredentialsMessage(true);

                // choose further project create direction
                DialogUtils.getInstance().invalidLoginDialog(ex.getMessage(), null, true);

                updateErrorStatus(UIMessages
                    .getString("ProjectCreateWizard.OrganizationPage.InvalidConnection.message"));

                return this;
View Full Code Here


        } catch (InterruptedException e) {
            logger.warn("Operation cancelled: " + e.getMessage());
        } catch (InvocationTargetException e) {
            Throwable cause = e.getTargetException();
            if (cause instanceof InsufficientPermissionsException) {
                InsufficientPermissionsException insuffPerms = (InsufficientPermissionsException) cause;
                insuffPerms.setShowUpdateCredentialsMessage(false);
                DialogUtils.getInstance().presentInsufficientPermissionsDialog(insuffPerms);
            } else {
                logger.error(DeploymentMessages.getString("DeploymentWizard.PlanPage.GeneratePlan.error"),
                    ForceExceptionUtils.getRootCause(e));
                Utils.openError(ForceExceptionUtils.getRootCause(e), true, DeploymentMessages
View Full Code Here

        } catch (InterruptedException e) {
            logger.warn("Operation cancelled: " + e.getMessage());
        } catch (InvocationTargetException e) {
            Throwable cause = e.getTargetException();
            if (cause instanceof InsufficientPermissionsException) {
                InsufficientPermissionsException insuffPerms = (InsufficientPermissionsException) cause;
                insuffPerms.setShowUpdateCredentialsMessage(false);
                DialogUtils.getInstance().presentInsufficientPermissionsDialog(insuffPerms);
            } else {
                DeploymentWizardModel deploymentWizardModel = deploymentWizardController.getDeploymentWizardModel();
                logger.warn("Exception while validation deployment plan for connection "
                        + deploymentWizardModel.getDestinationOrg().getLogDisplay() + ": "
View Full Code Here

                // log failure; option enabling occurs downstream
                logger
                .warn("Insufficient permissions to create project: "
                        + ForceExceptionUtils.getRootCauseMessage(e));

                InsufficientPermissionsException ex = (InsufficientPermissionsException) e.getTargetException();
                // occurred during project create/update which determines message text
                ex.setShowUpdateCredentialsMessage(true);

                // show dialog
                DialogUtils.getInstance().presentInsufficientPermissionsDialog(ex);

                updateErrorStatus(Messages.getString("InsufficientPermissions.User.OrganizationSettings.message",
                    new String[] { ex.getConnection().getUsername() }));

                return this;
            } else if (cause instanceof InvalidLoginException) {
                // log failure
                logger.warn("Unable to perform sync check: "
                        + ForceExceptionUtils.getRootCauseMessage(e.getTargetException()));

                InvalidLoginException ex = (InvalidLoginException) e.getTargetException();
                // occurred during project create/update which determines message text
                ex.setShowUpdateCredentialsMessage(false);

                // choose further project create direction
                DialogUtils.getInstance().invalidLoginDialog(ex.getMessage(), null, false);

                updateErrorStatus(UIMessages.getString(
                    "ProjectCreateWizard.OrganizationPage.InvalidConnection.WithHost.message",
                    new String[] { getDeploymentWizardModel().getDestinationOrg().getEndpointServer() }));
View Full Code Here

                // log failure; option enabling occurs downstream
                logger
                .warn("Insufficient permissions to create project: "
                        + ForceExceptionUtils.getRootCauseMessage(e));

                InsufficientPermissionsException ex = (InsufficientPermissionsException) e.getTargetException();
                // occurred during project create/update which determines message text
                ex.setShowUpdateCredentialsMessage(false);

                // show dialog
                DialogUtils.getInstance().presentInsufficientPermissionsDialog(ex);

                updateErrorStatus(Messages.getString("InsufficientPermissions.User.OrganizationSettings.message",
                    new String[] { ex.getConnection().getUsername() }));
                return false;
            } else if (e.getTargetException() instanceof InvalidLoginException) {
                // log failure
                logger.warn("Unable to login: " + ForceExceptionUtils.getRootCauseMessage(e.getTargetException()));
View Full Code Here

            if (cause instanceof InsufficientPermissionsException) {
                // log failure; option enabling occurs downstream
                logger.warn("Unable to synchronize resource '" + getSelectedResource().getName() + "' to server: "
                        + cause.getMessage());

                InsufficientPermissionsException ex = (InsufficientPermissionsException) e.getTargetException();
                // occurred during project create/update which determines message text
                ex.setShowUpdateCredentialsMessage(true);

                // show dialog
                DialogUtils.getInstance().presentInsufficientPermissionsDialog(ex);
            } else if (cause instanceof InvalidLoginException) {
                // log failure
                logger.warn("Unable to synchronize resource '" + getSelectedResource().getName() + "' to server: "
                        + cause.getMessage());

                InvalidLoginException ex = (InvalidLoginException) cause;
                // occurred during project create/update which determines message text
                ex.setShowUpdateCredentialsMessage(true);

                // choose further project create direction
                DialogUtils.getInstance().invalidLoginDialog(ex.getMessage(), null, true);
            } else {
                logger.error("Unable to synchronize resource '" + getSelectedResource().getName() + "' to server",
                    ForceExceptionUtils.getRootCause(e));
                Utils.openError(e, true, "Unable to synchronize resource '" + getSelectedResource().getName()
                    + "' to server: " + ForceExceptionUtils.getRootCauseMessage(e));
View Full Code Here

    }

    public static void throwNewInsufficientPermissionsException(Connection connection, Throwable th)
            throws InsufficientPermissionsException {
        if (th instanceof ApiFault && isOrgBasedInsufficientPermissionsException((ApiFault) th)) {
            throw new InsufficientPermissionsException(((ApiFault) th).getExceptionMessage(), connection);
        }

        throw new InsufficientPermissionsException(connection);
    }
View Full Code Here

TOP

Related Classes of com.salesforce.ide.core.remote.InsufficientPermissionsException

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.