From 56159257192f85039e301f0e445e156576bd05be Mon Sep 17 00:00:00 2001
From: Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Sat, 06 Aug 2016 10:25:44 +0000
Subject: [PATCH] control-panel: Replace server's Entry by SDK's Entry
---
opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/ViewEntryPanel.java | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/ViewEntryPanel.java b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/ViewEntryPanel.java
index 5ead6ff..99a6d01 100644
--- a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/ViewEntryPanel.java
+++ b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/ViewEntryPanel.java
@@ -53,7 +53,6 @@
import org.opends.guitools.controlpanel.ui.nodes.BasicNode;
import org.opends.guitools.controlpanel.util.Utilities;
import org.opends.server.schema.SchemaConstants;
-import org.opends.server.types.Attributes;
import org.opends.server.types.OpenDsException;
import org.opends.server.types.Schema;
import org.opends.server.util.Base64;
@@ -93,7 +92,7 @@
* @throws OpenDsException if the entry cannot be generated (in particular if
* the user provided invalid data).
*/
- public abstract org.opends.server.types.Entry getEntry() throws OpenDsException;
+ public abstract Entry getEntry() throws OpenDsException;
/**
* Updates the contents of the panel.
@@ -274,7 +273,7 @@
* Adds the values in the RDN to the entry definition.
* @param entry the entry to be updated.
*/
- protected void addValuesInRDN(org.opends.server.types.Entry entry)
+ protected void addValuesInRDN(Entry entry)
{
// Add the values in the RDN if they are not there
for (AVA ava : entry.getName().rdn())
@@ -282,7 +281,7 @@
String attrName = ava.getAttributeName();
ByteString value = ava.getAttributeValue();
boolean done = false;
- for (org.opends.server.types.Attribute attr : entry.getAttribute(attrName))
+ for (Attribute attr : entry.getAllAttributes(attrName))
{
// TODO JNR use Entry.getAttribute(AttributeDescription) instead?
if (attr.getAttributeDescription().toString().equals(attrName))
@@ -296,12 +295,13 @@
}
if (!done)
{
- entry.addAttribute(Attributes.create(ava.getAttributeType(), value), newArrayList(value));
+ AttributeDescription attrDesc = AttributeDescription.create(ava.getAttributeType());
+ entry.addAttribute(new LinkedAttribute(attrDesc, value), newArrayList(value));
}
}
}
- private List<ByteString> getValues(org.opends.server.types.Attribute attr)
+ private List<ByteString> getValues(Attribute attr)
{
List<ByteString> newValues = new ArrayList<>();
Iterator<ByteString> it = attr.iterator();
--
Gitblit v1.10.0