| | |
| | | import java.util.logging.Level; |
| | | import java.util.logging.Logger; |
| | | |
| | | import com.sun.opends.sdk.util.Message; |
| | | import org.opends.sdk.LocalizableMessage; |
| | | |
| | | |
| | | |
| | | |
| | |
| | | */ |
| | | final void pressReturnToContinue() |
| | | { |
| | | Message msg = INFO_MENU_PROMPT_RETURN_TO_CONTINUE.get(); |
| | | LocalizableMessage msg = INFO_MENU_PROMPT_RETURN_TO_CONTINUE.get(); |
| | | try |
| | | { |
| | | readLineOfInput(msg); |
| | |
| | | * @param msg |
| | | * The message. |
| | | */ |
| | | final void println(Message msg) |
| | | final void println(LocalizableMessage msg) |
| | | { |
| | | err.println(wrapText(msg, MAX_LINE_WIDTH)); |
| | | } |
| | |
| | | * @param msg |
| | | * The message. |
| | | */ |
| | | final void print(Message msg) |
| | | final void print(LocalizableMessage msg) |
| | | { |
| | | err.print(wrapText(msg, MAX_LINE_WIDTH)); |
| | | } |
| | |
| | | * @param msg |
| | | * The message. |
| | | */ |
| | | final void printProgress(Message msg) |
| | | final void printProgress(LocalizableMessage msg) |
| | | { |
| | | if (!isQuiet()) |
| | | { |
| | |
| | | * @param indent |
| | | * The number of columns to indent. |
| | | */ |
| | | final void println(Message msg, int indent) |
| | | final void println(LocalizableMessage msg, int indent) |
| | | { |
| | | err.println(wrapText(msg, MAX_LINE_WIDTH, indent)); |
| | | } |
| | |
| | | * @param msg |
| | | * The verbose message. |
| | | */ |
| | | final void printVerboseMessage(Message msg) |
| | | final void printVerboseMessage(LocalizableMessage msg) |
| | | { |
| | | if (isVerbose() || isInteractive()) |
| | | { |
| | |
| | | * If the line of input could not be retrieved for some |
| | | * reason. |
| | | */ |
| | | final String readLineOfInput(Message prompt) throws CLIException |
| | | final String readLineOfInput(LocalizableMessage prompt) throws CLIException |
| | | { |
| | | if (prompt != null) |
| | | { |
| | |
| | | * reason. |
| | | * @return The string value read from the user. |
| | | */ |
| | | final String readInput(Message prompt, String defaultValue) |
| | | final String readInput(LocalizableMessage prompt, String defaultValue) |
| | | throws CLIException |
| | | { |
| | | while (true) |
| | |
| | | * the Logger to be used to log the error message. |
| | | * @return The string value read from the user. |
| | | */ |
| | | final String readInput(Message prompt, String defaultValue, |
| | | final String readInput(LocalizableMessage prompt, String defaultValue, |
| | | Logger logger) |
| | | { |
| | | String s = defaultValue; |