OperationResult result = new OperationResult();
result.setErrorMessage(deploymentFile.getName() + " is already started.");
return result;
}
} else if (name.equals("stop")) {
progress = deploymentManager.stop(deploymentName);
} else if (name.equals("restart")) {
progress = deploymentManager.stop(deploymentName);
DeploymentUtils.run(progress);
// Still try to start, even if stop fails (maybe the app wasn't running to begin with).
progress = deploymentManager.start(deploymentName);