| | |
| | | import static com.forgerock.opendj.cli.Utils.*; |
| | | |
| | | import java.io.ByteArrayOutputStream; |
| | | import java.io.File; |
| | | import java.io.PrintStream; |
| | | import java.util.Map; |
| | | import java.util.Set; |
| | |
| | | private ErrorPrintStream err = new ErrorPrintStream(); |
| | | private OutputPrintStream out = new OutputPrintStream(); |
| | | |
| | | /** Temporary log file where messages will be logged. */ |
| | | protected TempLogFile tempLogFile; |
| | | |
| | | /** |
| | | * Creates an application by instantiating the Application class |
| | | * denoted by the System property |
| | |
| | | } |
| | | |
| | | /** |
| | | * Conditionally notifies listeners of the log file if it |
| | | * has been initialized. |
| | | */ |
| | | protected void notifyListenersOfLog() { |
| | | File logFile = QuickSetupLog.getLogFile(); |
| | | if (logFile != null) { |
| | | notifyListeners(getFormattedProgress( |
| | | INFO_GENERAL_SEE_FOR_DETAILS.get(logFile.getPath()))); |
| | | notifyListeners(getLineBreak()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * Conditionally notifies listeners of the log file if it |
| | | * has been initialized. |
| | | */ |
| | | protected void notifyListenersOfLogAfterError() { |
| | | File logFile = QuickSetupLog.getLogFile(); |
| | | if (logFile != null) { |
| | | notifyListeners(getFormattedProgress( |
| | | INFO_GENERAL_PROVIDE_LOG_IN_ERROR.get(logFile.getPath()))); |
| | | notifyListeners(getLineBreak()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * Returns a localized representation of a TopologyCacheException object. |
| | | * @param e the exception we want to obtain the representation from. |
| | | * @return a localized representation of a TopologyCacheException object. |
| | |
| | | } |
| | | |
| | | /** |
| | | * Sets the temporary log file where messages will be logged. |
| | | * |
| | | * @param tempLogFile |
| | | * temporary log file where messages will be logged. |
| | | */ |
| | | public void setTempLogFile(final TempLogFile tempLogFile) |
| | | { |
| | | this.tempLogFile = tempLogFile; |
| | | } |
| | | |
| | | /** |
| | | * This class is used to notify the ProgressUpdateListeners of events |
| | | * that are written to the standard error. It is used in OfflineInstaller. |
| | | * These classes just create a ErrorPrintStream and |