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

Matthew Swift
11.34.2011 33092f68b1dfc3b9dae653b8b0b95cbab5381d5c
opends/src/server/org/opends/server/loggers/TextAuditLogPublisher.java
@@ -23,6 +23,7 @@
 *
 *
 *      Copyright 2006-2008 Sun Microsystems, Inc.
 *      Portions copyright 2011 ForgeRock AS.
 */
package org.opends.server.loggers;
@@ -41,7 +42,7 @@
import org.opends.messages.Message;
import org.opends.server.admin.server.ConfigurationChangeListener;
import org.opends.server.admin.std.server.AccessLogPublisherCfg;
import org.opends.server.admin.std.server.FileBasedAccessLogPublisherCfg;
import org.opends.server.admin.std.server.FileBasedAuditLogPublisherCfg;
import org.opends.server.api.AccessLogPublisher;
import org.opends.server.config.ConfigException;
import org.opends.server.core.AddOperation;
@@ -61,8 +62,8 @@
 * the directory server.
 */
public class TextAuditLogPublisher extends
    AccessLogPublisher<FileBasedAccessLogPublisherCfg> implements
    ConfigurationChangeListener<FileBasedAccessLogPublisherCfg>
    AccessLogPublisher<FileBasedAuditLogPublisherCfg> implements
    ConfigurationChangeListener<FileBasedAuditLogPublisherCfg>
{
  private boolean suppressInternalOperations = true;
@@ -71,7 +72,7 @@
  private TextWriter writer;
  private FileBasedAccessLogPublisherCfg currentConfig;
  private FileBasedAuditLogPublisherCfg currentConfig;
@@ -79,7 +80,7 @@
   * {@inheritDoc}
   */
  public ConfigChangeResult applyConfigurationChange(
      FileBasedAccessLogPublisherCfg config)
      FileBasedAuditLogPublisherCfg config)
  {
    // Default result code.
    ResultCode resultCode = ResultCode.SUCCESS;
@@ -186,7 +187,7 @@
  public void close()
  {
    writer.shutdown();
    currentConfig.removeFileBasedAccessChangeListener(this);
    currentConfig.removeFileBasedAuditChangeListener(this);
  }
@@ -214,7 +215,7 @@
   */
  @Override()
  public void initializeAccessLogPublisher(
      FileBasedAccessLogPublisherCfg config)
      FileBasedAuditLogPublisherCfg config)
      throws ConfigException, InitializationException
  {
    File logFile = getFileForPath(config.getLogFile());
@@ -279,7 +280,7 @@
    currentConfig = config;
    config.addFileBasedAccessChangeListener(this);
    config.addFileBasedAuditChangeListener(this);
  }
@@ -291,8 +292,8 @@
  public boolean isConfigurationAcceptable(AccessLogPublisherCfg configuration,
      List<Message> unacceptableReasons)
  {
    FileBasedAccessLogPublisherCfg config =
      (FileBasedAccessLogPublisherCfg) configuration;
    FileBasedAuditLogPublisherCfg config =
      (FileBasedAuditLogPublisherCfg) configuration;
    return isConfigurationChangeAcceptable(config, unacceptableReasons);
  }
@@ -302,7 +303,7 @@
   * {@inheritDoc}
   */
  public boolean isConfigurationChangeAcceptable(
      FileBasedAccessLogPublisherCfg config, List<Message> unacceptableReasons)
      FileBasedAuditLogPublisherCfg config, List<Message> unacceptableReasons)
  {
    // Make sure the permission is valid.
    try