From 2fef5aa0046548cb88034553f522d907195a19f7 Mon Sep 17 00:00:00 2001
From: Nicolas Capponi <nicolas.capponi@forgerock.com>
Date: Mon, 02 Dec 2013 10:47:18 +0000
Subject: [PATCH] OpenDJ 3 : config framework

---
 opendj-admin/src/main/java/org/opends/server/admin/AliasDefaultBehaviorProvider.java |  117 +++++++++++++++++++++++++---------------------------------
 1 files changed, 51 insertions(+), 66 deletions(-)

diff --git a/opendj-admin/src/main/java/org/opends/server/admin/AliasDefaultBehaviorProvider.java b/opendj-admin/src/main/java/org/opends/server/admin/AliasDefaultBehaviorProvider.java
index fc9d3ea..d091dfb 100644
--- a/opendj-admin/src/main/java/org/opends/server/admin/AliasDefaultBehaviorProvider.java
+++ b/opendj-admin/src/main/java/org/opends/server/admin/AliasDefaultBehaviorProvider.java
@@ -25,11 +25,10 @@
  *      Copyright 2008 Sun Microsystems, Inc.
  */
 package org.opends.server.admin;
-import org.opends.messages.Message;
 
 import java.util.Locale;
 
-
+import org.forgerock.i18n.LocalizableMessage;
 
 /**
  * A default behavior provider which indicates special behavior. It should be
@@ -40,76 +39,62 @@
  * values.
  *
  * @param <T>
- *          The type of values represented by this provider.
+ *            The type of values represented by this provider.
  */
-public final class AliasDefaultBehaviorProvider<T> extends
-    DefaultBehaviorProvider<T> {
+public final class AliasDefaultBehaviorProvider<T> extends DefaultBehaviorProvider<T> {
 
-  // The managed object definition associated with this default
-  // behavior.
-  private final AbstractManagedObjectDefinition<?, ?> definition;
+    // 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;
+    // 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(AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
+        this.definition = d;
+        this.propertyName = propertyName;
+    }
 
+    /**
+     * {@inheritDoc}
+     */
+    public <R, P> R accept(DefaultBehaviorProviderVisitor<T, R, P> v, P p) {
+        return v.visitAlias(this, p);
+    }
 
-  /**
-   * 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(
-      AbstractManagedObjectDefinition<?, ?> d, String propertyName) {
-    this.definition = d;
-    this.propertyName = propertyName;
-  }
+    /**
+     * 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 LocalizableMessage getSynopsis() {
+        return getSynopsis(Locale.getDefault());
+    }
 
-
-
-  /**
-   * {@inheritDoc}
-   */
-  public <R, P> R accept(DefaultBehaviorProviderVisitor<T, R, P> v, P p) {
-    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 Message 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 Message getSynopsis(Locale locale) {
-    ManagedObjectDefinitionI18NResource resource =
-      ManagedObjectDefinitionI18NResource.getInstance();
-    String property = "property." + propertyName
-        + ".default-behavior.alias.synopsis";
-    return resource.getMessage(definition, property, locale);
-  }
+    /**
+     * 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 LocalizableMessage getSynopsis(Locale locale) {
+        ManagedObjectDefinitionI18NResource resource = ManagedObjectDefinitionI18NResource.getInstance();
+        String property = "property." + propertyName + ".default-behavior.alias.synopsis";
+        return resource.getLocalizableMessage(definition, property, locale);
+    }
 
 }

--
Gitblit v1.10.0