@Override protected void executeThis() { String currentDeployment = getCurrentDeployment(); DeploymentConfiguration deploymentConfiguration = new OperationHandler<DeploymentConfiguration>() .setOperation(Daemon.getDeploymentConfiguration(currentDeployment, false)) .setFailureMesssage("Failed to get your deployment configuration for edits.") .get(); int hash = deploymentConfiguration.hashCode(); deploymentConfiguration.setTimezone(isSet(timezone) ? timezone : deploymentConfiguration.getTimezone()); if (deploymentConfiguration.hashCode() == hash) { AnsiUi.error("No changes supplied."); return; } new OperationHandler<Void>() .setOperation(Daemon.setDeploymentConfiguration(currentDeployment, !noValidate, deploymentConfiguration)) .setFailureMesssage("Failed to apply edits to your deployment configuration") .setSuccessMessage("Successfully edited your deployment configuration") .get(); } }
@Override protected void executeThis() { String currentDeployment = getCurrentDeployment(); DeploymentConfiguration deploymentConfiguration = new OperationHandler<DeploymentConfiguration>() .setOperation(Daemon.getDeploymentConfiguration(currentDeployment, false)) .setFailureMesssage("Failed to get your deployment configuration for edits.") .get(); int hash = deploymentConfiguration.hashCode(); deploymentConfiguration.setTimezone(isSet(timezone) ? timezone : deploymentConfiguration.getTimezone()); if (deploymentConfiguration.hashCode() == hash) { AnsiUi.error("No changes supplied."); return; } new OperationHandler<Void>() .setOperation(Daemon.setDeploymentConfiguration(currentDeployment, !noValidate, deploymentConfiguration)) .setFailureMesssage("Failed to apply edits to your deployment configuration") .setSuccessMessage("Successfully edited your deployment configuration") .get(); } }