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

matthew_swift
11.24.2007 3849edbb8f64ee7febecb261cd0c08fbb6a1916f
opendj-sdk/opends/src/server/org/opends/server/admin/AbstractManagedObjectDefinition.java
@@ -521,6 +521,52 @@
  /**
   * Determines whether or not this managed object definition is a
   * sub-type of the provided managed object definition. This managed
   * object definition is a sub-type of the provided managed object
   * definition if they are both the same or if the provided managed
   * object definition can be obtained by recursive invocations of the
   * {@link #getParent()} method.
   *
   * @param d
   *          The managed object definition to be checked.
   * @return Returns <code>true</code> if this managed object
   *         definition is a sub-type of the provided managed object
   *         definition.
   */
  public final boolean isChildOf(AbstractManagedObjectDefinition<?, ?> d) {
    AbstractManagedObjectDefinition<?, ?> i;
    for (i = this; i != null; i = i.parent) {
      if (i == d) {
        return true;
      }
    }
    return false;
  }
  /**
   * Determines whether or not this managed object definition is a
   * super-type of the provided managed object definition. This
   * managed object definition is a super-type of the provided managed
   * object definition if they are both the same or if the provided
   * managed object definition is a member of the set of children
   * returned from {@link #getAllChildren()}.
   *
   * @param d
   *          The managed object definition to be checked.
   * @return Returns <code>true</code> if this managed object
   *         definition is a super-type of the provided managed object
   *         definition.
   */
  public final boolean isParentOf(AbstractManagedObjectDefinition<?, ?> d) {
    return d.isChildOf(this);
  }
  /**
   * Register a property definition with the managed object definition,
   * overriding any existing property definition with the same name.
   * <p>
@@ -529,7 +575,7 @@
   * @param d
   *          The property definition to be registered.
   */
  public final void registerPropertyDefinition(PropertyDefinition d) {
  protected final void registerPropertyDefinition(PropertyDefinition d) {
    String name = d.getName();
    propertyDefinitions.put(name, d);
@@ -546,7 +592,7 @@
   * @param d
   *          The relation definition to be registered.
   */
  public final void registerRelationDefinition(RelationDefinition d) {
  protected final void registerRelationDefinition(RelationDefinition d) {
    String name = d.getName();
    relationDefinitions.put(name, d);