| | |
| | | public WebStartInstaller() |
| | | { |
| | | initLoader(); |
| | | setStatus(InstallProgressStep.NOT_STARTED); |
| | | setCurrentProgressStep(InstallProgressStep.NOT_STARTED); |
| | | } |
| | | |
| | | /** |
| | |
| | | System.setErr(err); |
| | | System.setOut(out); |
| | | |
| | | setStatus(InstallProgressStep.DOWNLOADING); |
| | | setCurrentProgressStep(InstallProgressStep.DOWNLOADING); |
| | | |
| | | checkAbort(); |
| | | |
| | | InputStream in = |
| | | getZipInputStream(getRatio(InstallProgressStep.EXTRACTING)); |
| | | |
| | | setStatus(InstallProgressStep.EXTRACTING); |
| | | setCurrentProgressStep(InstallProgressStep.EXTRACTING); |
| | | notifyListeners(getTaskSeparator()); |
| | | |
| | | checkAbort(); |
| | |
| | | |
| | | checkAbort(); |
| | | |
| | | setStatus(InstallProgressStep.CONFIGURING_SERVER); |
| | | setCurrentProgressStep(InstallProgressStep.CONFIGURING_SERVER); |
| | | notifyListeners(getTaskSeparator()); |
| | | |
| | | // Write java home before calling Installation class. The installation |
| | |
| | | |
| | | checkAbort(); |
| | | |
| | | setStatus(InstallProgressStep.CONFIGURING_SERVER); |
| | | setCurrentProgressStep(InstallProgressStep.CONFIGURING_SERVER); |
| | | configureServer(); |
| | | |
| | | checkAbort(); |
| | |
| | | if (Utils.isWindows() && getUserData().getEnableWindowsService()) |
| | | { |
| | | notifyListeners(getTaskSeparator()); |
| | | setStatus(InstallProgressStep.ENABLING_WINDOWS_SERVICE); |
| | | setCurrentProgressStep(InstallProgressStep.ENABLING_WINDOWS_SERVICE); |
| | | enableWindowsService(); |
| | | |
| | | checkAbort(); |
| | |
| | | if (mustStart()) |
| | | { |
| | | notifyListeners(getTaskSeparator()); |
| | | setStatus(InstallProgressStep.STARTING_SERVER); |
| | | setCurrentProgressStep(InstallProgressStep.STARTING_SERVER); |
| | | new ServerController(this).startServer(); |
| | | |
| | | checkAbort(); |
| | |
| | | |
| | | if (mustConfigureReplication()) |
| | | { |
| | | setStatus(InstallProgressStep.CONFIGURING_REPLICATION); |
| | | setCurrentProgressStep(InstallProgressStep.CONFIGURING_REPLICATION); |
| | | notifyListeners(getTaskSeparator()); |
| | | |
| | | configureReplication(); |
| | |
| | | if (mustInitializeSuffixes()) |
| | | { |
| | | notifyListeners(getTaskSeparator()); |
| | | setStatus(InstallProgressStep.INITIALIZE_REPLICATED_SUFFIXES); |
| | | setCurrentProgressStep( |
| | | InstallProgressStep.INITIALIZE_REPLICATED_SUFFIXES); |
| | | initializeSuffixes(); |
| | | |
| | | checkAbort(); |
| | |
| | | if (mustCreateAds()) |
| | | { |
| | | notifyListeners(getTaskSeparator()); |
| | | setStatus(InstallProgressStep.CONFIGURING_ADS); |
| | | setCurrentProgressStep(InstallProgressStep.CONFIGURING_ADS); |
| | | updateADS(); |
| | | |
| | | checkAbort(); |
| | |
| | | if (mustStop()) |
| | | { |
| | | notifyListeners(getTaskSeparator()); |
| | | setStatus(InstallProgressStep.STOPPING_SERVER); |
| | | setCurrentProgressStep(InstallProgressStep.STOPPING_SERVER); |
| | | new ServerController(this).stopServer(); |
| | | } |
| | | |
| | | checkAbort(); |
| | | setStatus(InstallProgressStep.FINISHED_SUCCESSFULLY); |
| | | setCurrentProgressStep(InstallProgressStep.FINISHED_SUCCESSFULLY); |
| | | notifyListeners(null); |
| | | |
| | | } catch (ApplicationException ex) |
| | | { |
| | | if (ApplicationException.Type.CANCEL.equals(ex.getType())) { |
| | | uninstall(); |
| | | setStatus(InstallProgressStep.FINISHED_CANCELED); |
| | | setCurrentProgressStep(InstallProgressStep.FINISHED_CANCELED); |
| | | notifyListeners(null); |
| | | } else { |
| | | notifyListeners(getLineBreak()); |
| | | notifyListenersOfLog(); |
| | | setStatus(InstallProgressStep.FINISHED_WITH_ERROR); |
| | | setCurrentProgressStep(InstallProgressStep.FINISHED_WITH_ERROR); |
| | | String html = getFormattedError(ex, true); |
| | | notifyListeners(html); |
| | | LOG.log(Level.SEVERE, "Error installing.", ex); |
| | |
| | | { |
| | | notifyListeners(getLineBreak()); |
| | | notifyListenersOfLog(); |
| | | setStatus(InstallProgressStep.FINISHED_WITH_ERROR); |
| | | setCurrentProgressStep(InstallProgressStep.FINISHED_WITH_ERROR); |
| | | ApplicationException ex = new ApplicationException( |
| | | ApplicationException.Type.BUG, getThrowableMsg("bug-msg", t), t); |
| | | String msg = getFormattedError(ex, true); |
| | |
| | | * Uninstall what has already been installed. |
| | | */ |
| | | private void uninstall() { |
| | | notifyListeners(getTaskSeparator()); |
| | | |
| | | Installation installation = getInstallation(); |
| | | FileManager fm = new FileManager(this); |
| | | |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | protected String getInstallationPath() |
| | | public String getInstallationPath() |
| | | { |
| | | return getUserData().getServerLocation(); |
| | | } |