mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

kenneth_suter
15.34.2007 80c58327faaa4873369f6bb949e62792c2f708e0
opends/src/quicksetup/org/opends/quicksetup/util/InProcessServerController.java
@@ -27,8 +27,12 @@
package org.opends.quicksetup.util;
import org.opends.messages.Message;
import org.opends.messages.MessageBuilder;
import static org.opends.messages.QuickSetupMessages.*;
import org.opends.quicksetup.*;
import org.opends.quicksetup.i18n.ResourceProvider;
import org.opends.server.loggers.debug.TextDebugLogPublisher;
import org.opends.server.loggers.debug.DebugLogger;
import org.opends.server.loggers.TextErrorLogPublisher;
@@ -137,7 +141,7 @@
                     OperationOutput output) {
      LOG.log(Level.INFO, "server start (debug log): " +
              record);
      output.addDebugMessage(record);
      output.addDebugMessage(Message.raw(record));
    }};
  static private ServerControllerTextWriter errorWriter =
@@ -146,7 +150,7 @@
                     OperationOutput output) {
      LOG.log(Level.INFO, "server start (error log): " +
              record);
      output.addErrorMessage(record);
      output.addErrorMessage(Message.raw(record));
    }
  };
@@ -156,7 +160,7 @@
                     OperationOutput output) {
      LOG.log(Level.INFO, "server start (access log): " +
              record);
      output.addAccessMessage(record);
      output.addAccessMessage(Message.raw(record));
    }
  };
@@ -255,7 +259,7 @@
    StandardOutputSuppressor.suppress();
    try {
      DirectoryServer.shutDown(getClass().getName(),
              "quicksetup requests shutdown");
              Message.raw("quicksetup requests shutdown")); // TODO: i18n
      // Note:  this should not be necessary in the future when a
      // the shutdown method will not return until everything is
@@ -399,10 +403,10 @@
                  modListToString(op.getModifications()));
        } else {
          // report the error to the user
          StringBuilder error = op.getErrorMessage();
          MessageBuilder error = op.getErrorMessage();
          throw new ApplicationException(
              ApplicationReturnCode.ReturnCode.IMPORT_ERROR,
                  getMsg("error-apply-ldif-modify", dnByteString.toString(),
                  INFO_ERROR_APPLY_LDIF_MODIFY.get(dnByteString.toString(),
                          error != null ? error.toString() : ""),
                  null);
        }
@@ -422,10 +426,10 @@
          LOG.log(Level.INFO, "processed server add " + addOp.getEntryDN());
        } else {
          // report the error to the user
          StringBuilder error = addOp.getErrorMessage();
          MessageBuilder error = addOp.getErrorMessage();
          throw new ApplicationException(
              ApplicationReturnCode.ReturnCode.IMPORT_ERROR,
                  getMsg("error-apply-ldif-add", dnByteString.toString(),
                  INFO_ERROR_APPLY_LDIF_ADD.get(dnByteString.toString(),
                          error != null ? error.toString() : ""),
                  null);
        }
@@ -439,10 +443,10 @@
                  delOp.getEntryDN());
        } else {
          // report the error to the user
          StringBuilder error = delOp.getErrorMessage();
          MessageBuilder error = delOp.getErrorMessage();
          throw new ApplicationException(
              ApplicationReturnCode.ReturnCode.IMPORT_ERROR,
                  getMsg("error-apply-ldif-delete", dnByteString.toString(),
                  INFO_ERROR_APPLY_LDIF_DELETE.get(dnByteString.toString(),
                          error != null ? error.toString() : ""),
                  null);
        }
@@ -450,7 +454,7 @@
      default:
        LOG.log(Level.SEVERE, "Unexpected record type " + cre.getClass());
        throw new ApplicationException(ApplicationReturnCode.ReturnCode.BUG,
                getMsg("bug-msg"),
                INFO_BUG_MSG.get(),
                null);
    }
  }
@@ -500,8 +504,4 @@
    AccessLogger.removeAccessLogPublisher(startupAccessPublisher);
  }
  static private String getMsg(String key, String... args) {
    return ResourceProvider.getInstance().getMsg(key, args);
  }
}