| | |
| | | package org.opends.server.admin.client.cli; |
| | | |
| | | import static com.forgerock.opendj.cli.CliMessages.INFO_DESCRIPTION_ADMIN_PORT; |
| | | import static org.opends.server.tools.JavaPropertiesTool.ErrorReturnCode.*; |
| | | import static com.forgerock.opendj.cli.Utils.LINE_SEPARATOR; |
| | | import static org.opends.messages.AdminToolMessages.*; |
| | | import static org.opends.messages.ToolMessages.*; |
| | | import static com.forgerock.opendj.cli.ReturnCode.SUCCESS; |
| | | import static com.forgerock.opendj.cli.ReturnCode.CONFLICTING_ARGS; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | |
| | | private boolean configurationInitialized = false; |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** |
| | | * End Of Line. |
| | | */ |
| | | public static String EOL = System.getProperty("line.separator"); |
| | | |
| | | |
| | | // Defines if the CLI always use the SSL connection type. |
| | | private boolean alwaysSSL = false; |
| | | |
| | |
| | | try |
| | | { |
| | | err.write(wrapText(ex.getMessage(), MAX_LINE_WIDTH).getBytes()); |
| | | err.write(EOL.getBytes()); |
| | | err.write(LINE_SEPARATOR.getBytes()); |
| | | } |
| | | catch (IOException e) |
| | | { |
| | |
| | | try |
| | | { |
| | | err.write(wrapText(ex.getMessage(), MAX_LINE_WIDTH).getBytes()); |
| | | err.write(EOL.getBytes()); |
| | | err.write(LINE_SEPARATOR.getBytes()); |
| | | } |
| | | catch (IOException e) |
| | | { |
| | |
| | | { |
| | | if (buf.length() > 0) |
| | | { |
| | | buf.append(EOL); |
| | | buf.append(LINE_SEPARATOR); |
| | | } |
| | | buf.append(error); |
| | | } |
| | | return CONFLICTING_ARGS.getReturnCode(); |
| | | return CONFLICTING_ARGS.get(); |
| | | } |
| | | |
| | | return SUCCESSFUL_NOP.getReturnCode(); |
| | | return SUCCESS.get(); |
| | | } |
| | | /** |
| | | * Indication if provided global options are validate. |