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

boli
01.27.2007 455897cc245b67d929f409a93cfa7106e835cc1f
opends/src/server/org/opends/server/core/SynchronizationProviderConfigManager.java
@@ -48,7 +48,9 @@
import org.opends.server.types.SearchFilter;
import static org.opends.server.config.ConfigConstants.*;
import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.debug.DebugLogger.debugCought;
import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -66,11 +68,6 @@
public class SynchronizationProviderConfigManager
       implements ConfigChangeListener, ConfigAddListener, ConfigDeleteListener
{
  /**
   * The fully-qualified name of this class for debugging purposes.
   */
  private static final String CLASS_NAME =
       "org.opends.server.core.SynchronizationProviderConfigManager";
@@ -88,7 +85,6 @@
   */
  public SynchronizationProviderConfigManager()
  {
    assert debugConstructor(CLASS_NAME);
    // No implementation is required.
  }
@@ -112,7 +108,6 @@
  public void initializeSynchronizationProviders()
         throws ConfigException, InitializationException
  {
    assert debugEnter(CLASS_NAME, "initializeSynchronizationProviders");
    registeredProviders = new ConcurrentHashMap<DN,SynchronizationProvider>();
@@ -128,8 +123,10 @@
    }
    catch (Exception e)
    {
      assert debugException(CLASS_NAME, "initializeSynchronizationProviders",
                            e);
      if (debugEnabled())
      {
        debugCought(DebugLogLevel.ERROR, e);
      }
      int    msgID   = MSGID_CONFIG_SYNCH_CANNOT_GET_CONFIG_BASE;
      String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -185,8 +182,10 @@
      }
      catch (Exception e)
      {
        assert debugException(CLASS_NAME, "initializeSynchronizationProviders",
                              e);
        if (debugEnabled())
        {
          debugCought(DebugLogLevel.ERROR, e);
        }
        int    msgID   = MSGID_CONFIG_SYNCH_CANNOT_CHECK_FOR_PROVIDER_CONFIG_OC;
        String message = getMessage(msgID, String.valueOf(providerDN),
@@ -224,8 +223,10 @@
      }
      catch (Exception e)
      {
        assert debugException(CLASS_NAME, "initializeSynchronizationProviders",
                              e);
        if (debugEnabled())
        {
          debugCought(DebugLogLevel.ERROR, e);
        }
        msgID = MSGID_CONFIG_SYNCH_UNABLE_TO_DETERMINE_ENABLED_STATE;
        String message = getMessage(msgID, String.valueOf(providerDN),
@@ -260,8 +261,10 @@
      }
      catch (Exception e)
      {
        assert debugException(CLASS_NAME, "initializeSynchronizationProviders",
                              e);
        if (debugEnabled())
        {
          debugCought(DebugLogLevel.ERROR, e);
        }
        msgID = MSGID_CONFIG_SYNCH_UNABLE_TO_DETERMINE_CLASS;
        String message = getMessage(msgID, String.valueOf(providerDN),
@@ -279,8 +282,10 @@
      }
      catch (Exception e)
      {
        assert debugException(CLASS_NAME, "initializeSynchronizationProviders",
                              e);
        if (debugEnabled())
        {
          debugCought(DebugLogLevel.ERROR, e);
        }
        msgID = MSGID_CONFIG_SYNCH_UNABLE_TO_LOAD_PROVIDER_CLASS;
        String message = getMessage(msgID, String.valueOf(providerClassName),
@@ -299,8 +304,10 @@
      }
      catch (Exception e)
      {
        assert debugException(CLASS_NAME, "initializeSynchronizationProviders",
                              e);
        if (debugEnabled())
        {
          debugCought(DebugLogLevel.ERROR, e);
        }
        msgID = MSGID_CONFIG_SYNCH_UNABLE_TO_INSTANTIATE_PROVIDER;
        String message = getMessage(msgID, String.valueOf(providerClassName),
@@ -367,8 +374,6 @@
  public boolean configChangeIsAcceptable(ConfigEntry configEntry,
                                          StringBuilder unacceptableReason)
  {
    assert debugEnter(CLASS_NAME, "configChangeIsAcceptable",
                      String.valueOf(configEntry), "java.lang.StringBuilder");
    DN providerDN = configEntry.getDN();
@@ -393,7 +398,10 @@
    }
    catch (Exception e)
    {
      assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
      if (debugEnabled())
      {
        debugCought(DebugLogLevel.ERROR, e);
      }
      int msgID = MSGID_CONFIG_SYNCH_CANNOT_CHECK_FOR_PROVIDER_CONFIG_OC;
      unacceptableReason.append(getMessage(msgID, String.valueOf(providerDN),
@@ -422,7 +430,10 @@
    }
    catch (Exception e)
    {
      assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
      if (debugEnabled())
      {
        debugCought(DebugLogLevel.ERROR, e);
      }
      msgID = MSGID_CONFIG_SYNCH_UNABLE_TO_DETERMINE_ENABLED_STATE;
      unacceptableReason.append(getMessage(msgID,
@@ -457,7 +468,10 @@
    }
    catch (Exception e)
    {
      assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
      if (debugEnabled())
      {
        debugCought(DebugLogLevel.ERROR, e);
      }
      msgID = MSGID_CONFIG_SYNCH_UNABLE_TO_DETERMINE_CLASS;
      unacceptableReason.append(getMessage(msgID,
@@ -481,7 +495,10 @@
      }
      catch (Exception e)
      {
        assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
        if (debugEnabled())
        {
          debugCought(DebugLogLevel.ERROR, e);
        }
        msgID = MSGID_CONFIG_SYNCH_UNABLE_TO_LOAD_PROVIDER_CLASS;
        unacceptableReason.append(getMessage(msgID, String.valueOf(className),
@@ -497,7 +514,10 @@
      }
      catch (Exception e)
      {
        assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
        if (debugEnabled())
        {
          debugCought(DebugLogLevel.ERROR, e);
        }
        msgID = MSGID_CONFIG_SYNCH_UNABLE_TO_INSTANTIATE_PROVIDER;
        unacceptableReason.append(getMessage(msgID, String.valueOf(className),
@@ -529,8 +549,6 @@
   */
  public ConfigChangeResult applyConfigurationChange(ConfigEntry configEntry)
  {
    assert debugEnter(CLASS_NAME, "applyConfigurationChange",
                      String.valueOf(configEntry));
    DN providerDN = configEntry.getDN();
@@ -561,7 +579,10 @@
    }
    catch (Exception e)
    {
      assert debugException(CLASS_NAME, "applyConfigurationChange", e);
      if (debugEnabled())
      {
        debugCought(DebugLogLevel.ERROR, e);
      }
      int msgID = MSGID_CONFIG_SYNCH_CANNOT_CHECK_FOR_PROVIDER_CONFIG_OC;
      messages.add(getMessage(msgID, String.valueOf(providerDN),
@@ -602,7 +623,10 @@
    }
    catch (Exception e)
    {
      assert debugException(CLASS_NAME, "applyConfigurationChange", e);
      if (debugEnabled())
      {
        debugCought(DebugLogLevel.ERROR, e);
      }
      msgID = MSGID_CONFIG_SYNCH_UNABLE_TO_DETERMINE_ENABLED_STATE;
      messages.add(getMessage(msgID, String.valueOf(providerDN),
@@ -643,7 +667,10 @@
    }
    catch (Exception e)
    {
      assert debugException(CLASS_NAME, "applyConfigurationChange", e);
      if (debugEnabled())
      {
        debugCought(DebugLogLevel.ERROR, e);
      }
      msgID = MSGID_CONFIG_SYNCH_UNABLE_TO_DETERMINE_CLASS;
      messages.add(getMessage(msgID, String.valueOf(providerDN),
@@ -672,7 +699,10 @@
      }
      catch (Exception e)
      {
        assert debugException(CLASS_NAME, "applyConfigurationChange", e);
        if (debugEnabled())
        {
          debugCought(DebugLogLevel.ERROR, e);
        }
        msgID = MSGID_CONFIG_SYNCH_UNABLE_TO_LOAD_PROVIDER_CLASS;
        messages.add(getMessage(msgID, String.valueOf(className),
@@ -694,7 +724,10 @@
      }
      catch (Exception e)
      {
        assert debugException(CLASS_NAME, "applyConfigurationChange", e);
        if (debugEnabled())
        {
          debugCought(DebugLogLevel.ERROR, e);
        }
        msgID = MSGID_CONFIG_SYNCH_UNABLE_TO_INSTANTIATE_PROVIDER;
        messages.add(getMessage(msgID, String.valueOf(className),
@@ -725,7 +758,10 @@
          }
          catch (Exception e)
          {
            assert debugException(CLASS_NAME, "applyConfigurationChange", e);
            if (debugEnabled())
            {
              debugCought(DebugLogLevel.ERROR, e);
            }
            msgID = MSGID_CONFIG_SYNCH_ERROR_INITIALIZING_PROVIDER;
            messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -783,8 +819,6 @@
  public boolean configAddIsAcceptable(ConfigEntry configEntry,
                                       StringBuilder unacceptableReason)
  {
    assert debugEnter(CLASS_NAME, "configAddIsAcceptable",
                      String.valueOf(configEntry), "java.lang.StringBuilder");
    // NYI
@@ -804,8 +838,6 @@
   */
  public ConfigChangeResult applyConfigurationAdd(ConfigEntry configEntry)
  {
    assert debugEnter(CLASS_NAME, "applyConfigurationAdd",
                      String.valueOf(configEntry));
    // NYI
@@ -830,8 +862,6 @@
  public boolean configDeleteIsAcceptable(ConfigEntry configEntry,
                                          StringBuilder unacceptableReason)
  {
    assert debugEnter(CLASS_NAME, "configDeleteIsAcceptable",
                      String.valueOf(configEntry), "java.lang.StringBuilder");
    // NYI
@@ -850,8 +880,6 @@
   */
  public ConfigChangeResult applyConfigurationDelete(ConfigEntry configEntry)
  {
    assert debugEnter(CLASS_NAME, "applyConfigurationDelete",
                      String.valueOf(configEntry));
    // NYI