Fix issue OPENDJ-207, to avoid triggering X11 server when using setup --cli mode.
| | |
| | | * @param hmSummary the Map containing the messages. |
| | | */ |
| | | protected void updateSummaryWithServerState( |
| | | Map<InstallProgressStep, Message> hmSummary) |
| | | Map<InstallProgressStep, Message> hmSummary, Boolean isCli) |
| | | { |
| | | Installation installation = getInstallation(); |
| | | String cmd = getPath(installation.getControlPanelCommandFile()); |
| | | cmd = Utils.addWordBreaks( |
| | | if (! isCli) |
| | | { |
| | | cmd = Utils.addWordBreaks( |
| | | UIFactory.applyFontToHtml(cmd, UIFactory.INSTRUCTIONS_MONOSPACE_FONT), |
| | | 60, 5); |
| | | } |
| | | Message status; |
| | | if (installation.getStatus().isServerRunning()) |
| | | { |
| | |
| | | } |
| | | |
| | | checkAbort(); |
| | | updateSummaryWithServerState(hmSummary); |
| | | updateSummaryWithServerState(hmSummary, true); |
| | | setCurrentProgressStep(InstallProgressStep.FINISHED_SUCCESSFULLY); |
| | | notifyListeners(null); |
| | | |
| | |
| | | } |
| | | } |
| | | notifyListeners(getLineBreak()); |
| | | updateSummaryWithServerState(hmSummary); |
| | | updateSummaryWithServerState(hmSummary, true); |
| | | setCurrentProgressStep(InstallProgressStep.FINISHED_WITH_ERROR); |
| | | Message html = getFormattedError(ex, true); |
| | | notifyListeners(html); |
| | |
| | | } |
| | | } |
| | | notifyListeners(getLineBreak()); |
| | | updateSummaryWithServerState(hmSummary); |
| | | updateSummaryWithServerState(hmSummary, true); |
| | | setCurrentProgressStep(InstallProgressStep.FINISHED_WITH_ERROR); |
| | | ApplicationException ex = new ApplicationException( |
| | | ReturnCode.BUG, |
| | |
| | | } |
| | | |
| | | checkAbort(); |
| | | updateSummaryWithServerState(hmSummary); |
| | | updateSummaryWithServerState(hmSummary, false); |
| | | setCurrentProgressStep(InstallProgressStep.FINISHED_SUCCESSFULLY); |
| | | notifyListeners(null); |
| | | |
| | |
| | | } |
| | | } |
| | | notifyListeners(getLineBreak()); |
| | | updateSummaryWithServerState(hmSummary); |
| | | updateSummaryWithServerState(hmSummary, false); |
| | | setCurrentProgressStep(InstallProgressStep.FINISHED_WITH_ERROR); |
| | | Message html = getFormattedError(ex, true); |
| | | notifyListeners(html); |
| | |
| | | } |
| | | } |
| | | notifyListeners(getLineBreak()); |
| | | updateSummaryWithServerState(hmSummary); |
| | | updateSummaryWithServerState(hmSummary, false); |
| | | setCurrentProgressStep(InstallProgressStep.FINISHED_WITH_ERROR); |
| | | ApplicationException ex = new ApplicationException( |
| | | ReturnCode.BUG, |