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

matthew_swift
28.23.2007 d30d857423de7afd4c96919232af420739cede6f
opends/src/server/org/opends/server/admin/AbstractManagedObjectDefinition.java
@@ -43,7 +43,6 @@
import org.opends.messages.Message;
import org.opends.server.admin.DefinitionDecodingException.Reason;
import org.opends.server.util.Validator;
@@ -107,22 +106,11 @@
   * @param parent
   *          The parent definition, or <code>null</code> if there
   *          is no parent (only the {@link TopCfgDefn} should have a
   *          <code>null</code> parent}.
   *          <code>null</code> parent, unless the definition is
   *          being used for testing).
   */
  protected AbstractManagedObjectDefinition(String name,
      AbstractManagedObjectDefinition<? super C, ? super S> parent) {
    // Perform sanity checks.
    if (this.getClass() == TopCfgDefn.class) {
      Validator.ensureTrue(name.equals("top"),
          "TopCfgDefn should have the name 'top'");
      Validator.ensureTrue(parent == null,
          "TopCfgDefn should not have a parent");
    } else {
      Validator.ensureTrue(!name.equals("top"),
          "Only the TopCfgDefn should have the name 'top'");
      Validator.ensureTrue(parent != null, "No parent defined");
    }
    this.name = name;
    this.parent = parent;
    this.constraints = new LinkedList<Constraint>();
@@ -842,20 +830,6 @@
  /**
   * Deregister this managed object definition from its parent.
   * <p>
   * This method <b>must not</b> be called by applications and is
   * only intended for internal testing.
   */
  final void deregisterFromParent() {
    if (parent != null) {
      parent.children.remove(name);
    }
  }
  /**
   * Deregister a relation definition from the managed object
   * definition.
   * <p>