| | |
| | | import org.opends.server.core.DirectoryServer; |
| | | |
| | | import org.opends.quicksetup.CurrentInstallStatus; |
| | | import org.opends.quicksetup.Installation; |
| | | import org.opends.quicksetup.ui.UIFactory; |
| | | import org.opends.quicksetup.util.BackgroundTask; |
| | | import org.opends.quicksetup.util.HtmlProgressMessageFormatter; |
| | |
| | | getFormattedProgress(getMsg("progress-starting")) + getLineBreak()); |
| | | |
| | | ArrayList<String> argList = new ArrayList<String>(); |
| | | |
| | | if (Utils.isWindows()) |
| | | { |
| | | argList.add(Utils.getPath(getBinariesPath(), "start-ds.bat")); |
| | | } else |
| | | { |
| | | argList.add(Utils.getPath(getBinariesPath(), "start-ds")); |
| | | } |
| | | Installation installation = |
| | | new Installation(Utils.getInstallPathFromClasspath()); |
| | | argList.add(Utils.getPath(installation.getServerStartCommandFile())); |
| | | |
| | | String[] args = new String[argList.size()]; |
| | | argList.toArray(args); |
| | |
| | | getFormattedProgress(getMsg("progress-stopping")) + getLineBreak()); |
| | | |
| | | ArrayList<String> argList = new ArrayList<String>(); |
| | | |
| | | if (Utils.isWindows()) |
| | | { |
| | | argList.add(Utils.getPath(getBinariesPath(), |
| | | Utils.getWindowsStopFileName())); |
| | | } else |
| | | { |
| | | argList.add(Utils.getPath(getBinariesPath(), |
| | | Utils.getUnixStopFileName())); |
| | | } |
| | | Installation installation = |
| | | new Installation(Utils.getInstallPathFromClasspath()); |
| | | argList.add(Utils.getPath(installation.getServerStopCommandFile())); |
| | | String[] args = new String[argList.size()]; |
| | | argList.toArray(args); |
| | | ProcessBuilder pb = new ProcessBuilder(args); |
| | |
| | | * have something of type: |
| | | * key=value |
| | | * |
| | | * @see ResourceProvider.getMsg(String key) |
| | | * @see ResourceProvider#getMsg(String) |
| | | * @param key the key in the properties file. |
| | | * @return the value associated to the key in the properties file. |
| | | * properties file. |
| | |
| | | * mykey=value with argument {0}. |
| | | * |
| | | * This method will return "value with argument value1". |
| | | * @see ResourceProvider.getMsg(String key, String[] args) |
| | | * @see ResourceProvider#getMsg(String, String[]) |
| | | * @param key the key in the properties file. |
| | | * @param args the arguments to be passed to generate the resulting value. |
| | | * @return the value associated to the key in the properties file. |
| | |
| | | } |
| | | |
| | | /** |
| | | * Returns the path to the binaries. |
| | | * @return the path to the binaries. |
| | | */ |
| | | private String getBinariesPath() |
| | | { |
| | | return Utils.getPath(Utils.getInstallPathFromClasspath(), |
| | | Utils.getBinariesRelativePath()); |
| | | } |
| | | |
| | | /** |
| | | * Returns the formatted representation of the text that is the summary of the |
| | | * installation process (the one that goes in the UI next to the progress |
| | | * bar). |