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

matthew_swift
19.48.2007 369b773b44c479a87f71548b03ff264c65477d73
opendj-sdk/opends/src/server/org/opends/server/admin/AliasDefaultBehaviorProvider.java
@@ -26,6 +26,8 @@
 */
package org.opends.server.admin;
import java.util.Locale;
/**
@@ -42,11 +44,30 @@
public final class AliasDefaultBehaviorProvider<T> implements
    DefaultBehaviorProvider<T> {
  // The managed object definition associated with this default
  // behavior.
  private final AbstractManagedObjectDefinition<?, ?> definition;
  // The name of the property definition associated with this default
  // behavior.
  private final String propertyName;
  /**
   * Create an alias default behavior provider.
   *
   * @param d
   *          The managed object definition associated with this
   *          default behavior.
   * @param propertyName
   *          The name of the property definition associated with this
   *          default behavior.
   */
  public AliasDefaultBehaviorProvider() {
    // No implementation required.
  public AliasDefaultBehaviorProvider(
      AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
    this.definition = d;
    this.propertyName = propertyName;
  }
@@ -58,4 +79,36 @@
    return v.visitAlias(this, p);
  }
  /**
   * Gets the synopsis of this alias default behavior in the
   * default locale.
   *
   * @return Returns the synopsis of this alias default behavior in
   *         the default locale.
   */
  public final String getSynopsis() {
    return getSynopsis(Locale.getDefault());
  }
  /**
   * Gets the synopsis of this alias default behavior in the specified
   * locale.
   *
   * @param locale
   *          The locale.
   * @return Returns the synopsis of this alias default behavior in
   *         the specified locale.
   */
  public final String getSynopsis(Locale locale) {
    ManagedObjectDefinitionI18NResource resource =
      ManagedObjectDefinitionI18NResource.getInstance();
    String property = "property." + propertyName
        + ".default-behavior.alias.synopsis";
    return resource.getMessage(definition, property, locale);
  }
}