From 377b2709c64b32fe93905b466482216c2cc0581c Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Wed, 19 Mar 2014 16:30:32 +0000
Subject: [PATCH] OPENDJ-1368 (CR-3232) Remove AttributeValue

---
 opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/ui/TableViewEntryPanel.java |   18 ++++++------------
 1 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/ui/TableViewEntryPanel.java b/opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/ui/TableViewEntryPanel.java
index ccfb6ad..0ba99cd 100644
--- a/opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/ui/TableViewEntryPanel.java
+++ b/opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/ui/TableViewEntryPanel.java
@@ -24,7 +24,6 @@
  *      Copyright 2008-2010 Sun Microsystems, Inc.
  *      Portions Copyright 2014 ForgeRock AS
  */
-
 package org.opends.guitools.controlpanel.ui;
 
 import static org.opends.messages.AdminToolMessages.*;
@@ -64,15 +63,14 @@
 import org.opends.guitools.controlpanel.ui.renderer.LDAPEntryTableCellRenderer;
 import org.opends.guitools.controlpanel.util.Utilities;
 import org.forgerock.i18n.LocalizableMessage;
+import org.forgerock.opendj.ldap.ByteString;
 import org.opends.server.types.*;
 import org.opends.server.util.LDIFReader;
 import org.opends.server.util.ServerConstants;
 
 /**
  * The panel displaying a table view of an LDAP entry.
- *
  */
-
 public class TableViewEntryPanel extends ViewEntryPanel
 {
   private static final long serialVersionUID = 2135331526526472175L;
@@ -303,16 +301,14 @@
         RDN rdn = oldDN.rdn();
         List<AttributeType> attributeTypes = new ArrayList<AttributeType>();
         List<String> attributeNames = new ArrayList<String>();
-        List<AttributeValue> attributeValues = new ArrayList<AttributeValue>();
+        List<ByteString> attributeValues = new ArrayList<ByteString>();
         for (int i=0; i<rdn.getNumValues(); i++)
         {
           String attrName = rdn.getAttributeName(i);
-          AttributeValue value = rdn.getAttributeValue(i);
-
-          String sValue = value.getValue().toString();
+          ByteString value = rdn.getAttributeValue(i);
 
           Set<String> values = getDisplayedStringValues(attrName);
-          if (!values.contains(sValue))
+          if (!values.contains(value.toString()))
           {
             if (values.size() > 0)
             {
@@ -331,8 +327,7 @@
                 AttributeType attr = rdn.getAttributeType(i);
                 attributeTypes.add(attr);
                 attributeNames.add(rdn.getAttributeName(i));
-                attributeValues.add(AttributeValues.create(
-                    attr, firstNonEmpty));
+                attributeValues.add(ByteString.valueOf(firstNonEmpty));
               }
             }
           }
@@ -371,8 +366,7 @@
                 {
                   attributeTypes.add(attr);
                   attributeNames.add(attrName);
-                  attributeValues.add(AttributeValues.create(
-                      attr, (String)o));
+                  attributeValues.add(ByteString.valueOf((String) o));
                 }
                 break;
               }

--
Gitblit v1.10.0