| | |
| | | import java.io.File; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.HashSet; |
| | | import java.util.LinkedList; |
| | | import java.util.Set; |
| | | |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.extensions.ConfigFileHandler; |
| | |
| | | return 0; |
| | | } |
| | | |
| | | try |
| | | { |
| | | Set<Integer> ports = new HashSet<Integer>(); |
| | | if (ldapPort.isPresent()) |
| | | { |
| | | ports.add(ldapPort.getIntValue()); |
| | | } |
| | | if (jmxPort.isPresent()) |
| | | { |
| | | if (ports.contains(jmxPort.getIntValue())) |
| | | { |
| | | int msgID = MSGID_CONFIGDS_PORT_ALREADY_SPECIFIED; |
| | | String message = getMessage(msgID, |
| | | String.valueOf(jmxPort.getIntValue())); |
| | | System.err.println(wrapText(message, MAX_LINE_WIDTH)); |
| | | System.err.println(argParser.getUsage()); |
| | | return 1; |
| | | } |
| | | else |
| | | { |
| | | ports.add(jmxPort.getIntValue()); |
| | | } |
| | | } |
| | | } |
| | | catch (ArgumentException ae) |
| | | { |
| | | int msgID = MSGID_CANNOT_INITIALIZE_ARGS; |
| | | String message = getMessage(msgID, ae.getMessage()); |
| | | System.err.println(wrapText(message, MAX_LINE_WIDTH)); |
| | | return 1; |
| | | } |
| | | |
| | | // Make sure that the user didn't provide conflicting arguments. |
| | | if (addBaseEntry.isPresent()) |