From 81d36161ce5367fa7aa9a5d99dc8b80eacfa7cdf Mon Sep 17 00:00:00 2001
From: Nicolas Capponi <nicolas.capponi@forgerock.com>
Date: Fri, 24 Jan 2014 14:43:46 +0000
Subject: [PATCH] Checkpoint commit for OPENDJ-1288 :    Migrate I18n and logging support to i18n framework and SLF4J

---
 opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/ui/StandardObjectClassPanel.java |   31 ++++++++++++++++---------------
 1 files changed, 16 insertions(+), 15 deletions(-)

diff --git a/opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/ui/StandardObjectClassPanel.java b/opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/ui/StandardObjectClassPanel.java
index bf3d7bf..4f1a7e5 100644
--- a/opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/ui/StandardObjectClassPanel.java
+++ b/opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/ui/StandardObjectClassPanel.java
@@ -22,6 +22,7 @@
  *
  *
  *      Copyright 2008-2010 Sun Microsystems, Inc.
+ *      Portions Copyright 2014 ForgeRock AS
  */
 
 package org.opends.guitools.controlpanel.ui;
@@ -52,8 +53,8 @@
 import org.opends.guitools.controlpanel.ui.components.TitlePanel;
 import org.opends.guitools.controlpanel.util.LowerCaseComparator;
 import org.opends.guitools.controlpanel.util.Utilities;
-import org.opends.messages.Message;
-import org.opends.messages.MessageBuilder;
+import org.forgerock.i18n.LocalizableMessage;
+import org.forgerock.i18n.LocalizableMessageBuilder;
 import org.opends.server.types.AttributeType;
 import org.opends.server.types.CommonSchemaElements;
 import org.opends.server.types.ObjectClass;
@@ -66,7 +67,7 @@
 public class StandardObjectClassPanel extends SchemaElementPanel
 {
   private static final long serialVersionUID = 5561268287795223026L;
-  private TitlePanel titlePanel = new TitlePanel(Message.EMPTY, Message.EMPTY);
+  private TitlePanel titlePanel = new TitlePanel(LocalizableMessage.EMPTY, LocalizableMessage.EMPTY);
 
   private JLabel lParent;
 
@@ -80,13 +81,13 @@
   private JList requiredAttributes = new JList(new DefaultListModel());
   private JList optionalAttributes = new JList(new DefaultListModel());
 
-  private static Message ABSTRACT_VALUE =
+  private static LocalizableMessage ABSTRACT_VALUE =
     INFO_CTRL_PANEL_OBJECTCLASS_ABSTRACT_LABEL.get();
-  private static Message STRUCTURAL_VALUE =
+  private static LocalizableMessage STRUCTURAL_VALUE =
     INFO_CTRL_PANEL_OBJECTCLASS_STRUCTURAL_LABEL.get();
-  private static Message AUXILIARY_VALUE =
+  private static LocalizableMessage AUXILIARY_VALUE =
     INFO_CTRL_PANEL_OBJECTCLASS_AUXILIARY_LABEL.get();
-  private static Message OBSOLETE_VALUE =
+  private static LocalizableMessage OBSOLETE_VALUE =
     INFO_CTRL_PANEL_OBJECTCLASS_OBSOLETE_LABEL.get();
 
   private Map<String, AttributeType> hmAttrs =
@@ -105,7 +106,7 @@
   /**
    * {@inheritDoc}
    */
-  public Message getTitle()
+  public LocalizableMessage getTitle()
   {
     return INFO_CTRL_PANEL_STANDARD_OBJECTCLASS_TITLE.get();
   }
@@ -152,7 +153,7 @@
     requiredAttributes.setVisibleRowCount(5);
     optionalAttributes.setVisibleRowCount(9);
 
-    Message[] labels = {
+    LocalizableMessage[] labels = {
         INFO_CTRL_PANEL_OBJECTCLASS_NAME_LABEL.get(),
         INFO_CTRL_PANEL_OBJECTCLASS_PARENT_LABEL.get(),
         INFO_CTRL_PANEL_OBJECTCLASS_OID_LABEL.get(),
@@ -194,7 +195,7 @@
       c.add(values[i], gbc);
       gbc.gridy ++;
     }
-    labels = new Message[] {
+    labels = new LocalizableMessage[] {
         INFO_CTRL_PANEL_REQUIRED_ATTRIBUTES_LABEL.get(),
         INFO_CTRL_PANEL_OPTIONAL_ATTRIBUTES_LABEL.get()
         };
@@ -269,9 +270,9 @@
    * @param element the schema element.
    * @return the message describing the schema element origin (file, RFC, etc.).
    */
-  static Message getOrigin(CommonSchemaElements element)
+  static LocalizableMessage getOrigin(CommonSchemaElements element)
   {
-    MessageBuilder returnValue = new MessageBuilder();
+    LocalizableMessageBuilder returnValue = new LocalizableMessageBuilder();
     String fileName = element.getSchemaFile();
     String xOrigin = Utilities.getOrigin(element);
     if (xOrigin != null)
@@ -313,7 +314,7 @@
     {
       n = NOT_APPLICABLE.toString();
     }
-    titlePanel.setDetails(Message.raw(n));
+    titlePanel.setDetails(LocalizableMessage.raw(n));
     name.setText(n);
     parent.setText(getSuperiorText(oc));
     oid.setText(oc.getOID());
@@ -477,9 +478,9 @@
    * @return the message describing the object class type (structural, obsolete,
    * etc.) of the provided object class.
    */
-  static Message getTypeValue(ObjectClass oc)
+  static LocalizableMessage getTypeValue(ObjectClass oc)
   {
-    MessageBuilder mb = new MessageBuilder();
+    LocalizableMessageBuilder mb = new LocalizableMessageBuilder();
     switch (oc.getObjectClassType())
     {
     case ABSTRACT:

--
Gitblit v1.10.0