| | |
| | | import org.opends.quicksetup.util.BackgroundTask; |
| | | import org.opends.quicksetup.util.ProgressMessageFormatter; |
| | | import org.opends.quicksetup.util.Utils; |
| | | import org.opends.server.util.SetupUtils; |
| | | |
| | | /** |
| | | * This class is responsible for doing the following: |
| | |
| | | displayFieldInvalid(FieldName.DIRECTORY_MANAGER_PWD_CONFIRM, false); |
| | | } |
| | | |
| | | int defaultJMXPort = getDefaultJMXPort(); |
| | | if (defaultJMXPort != -1) |
| | | { |
| | | getUserInstallData().setServerJMXPort(defaultJMXPort); |
| | | } |
| | | |
| | | if (errorMsgs.size() > 0) |
| | | { |
| | | throw new UserInstallDataException(Step.SERVER_SETTINGS, |
| | |
| | | { |
| | | defaultUserData.setServerPort(defaultPort); |
| | | } |
| | | |
| | | defaultUserData.setDirectoryManagerDn("cn=Directory Manager"); |
| | | |
| | | defaultUserData.setDataOptions(defaultDataOptions); |
| | |
| | | } |
| | | |
| | | /** |
| | | * Provides the port that will be used by default for JMX. |
| | | * |
| | | * @return the port X689 if it is available and we can use and -1 if not. |
| | | */ |
| | | private int getDefaultJMXPort() |
| | | { |
| | | int defaultJMXPort = -1; |
| | | |
| | | for (int i=0;i<65000 && (defaultJMXPort == -1);i+=1000) |
| | | { |
| | | int port = i + SetupUtils.getDefaultJMXPort(); |
| | | if (Utils.canUseAsPort(port)) |
| | | { |
| | | defaultJMXPort = port; |
| | | } |
| | | } |
| | | return defaultJMXPort; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Returns the number of free disk space in bytes required to install Open DS |
| | | * |
| | | * For the moment we just return 15 Megabytes. TODO we might want to have |