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

matthew_swift
27.22.2007 40626e819af3e53a2c20de54cbd25aa9f0328222
Add a method for retrieving the current default values of a property. This can be useful in client applications wishing to indicate to a user what will happen if they reset a property back to its defaults.
2 files modified
29 ■■■■■ changed files
opends/src/server/org/opends/server/admin/client/ManagedObject.java 18 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/admin/client/ldap/LDAPManagedObject.java 11 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/admin/client/ManagedObject.java
@@ -382,6 +382,24 @@
  /**
   * Get the default values of the specified property.
   *
   * @param <P>
   *          The type of the property to be retrieved.
   * @param pd
   *          The property to be retrieved.
   * @return Returns the property's default values, or an empty set
   *         if there are no default values defined.
   * @throws IllegalArgumentException
   *           If the property definition is not associated with this
   *           managed object's definition.
   */
  <P> SortedSet<P> getPropertyDefaultValues(PropertyDefinition<P> pd)
      throws IllegalArgumentException;
  /**
   * Get the effective value of the specified property.
   * <p>
   * See the class description for more information about how the
opends/src/server/org/opends/server/admin/client/ldap/LDAPManagedObject.java
@@ -644,6 +644,17 @@
  /**
   * {@inheritDoc}
   */
  public <P> SortedSet<P> getPropertyDefaultValues(PropertyDefinition<P> pd)
      throws IllegalArgumentException {
    Property<P> p = properties.getProperty(pd);
    return p.getDefaultValues();
  }
  /**
   * {@inheritDoc}
   */
  public <P> P getPropertyValue(PropertyDefinition<P> pd)
      throws IllegalArgumentException {
    return properties.getPropertyValue(pd);