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

neil_a_wilson
25.40.2007 44aad3f84d2a820094f3b5e73722778edc8c23f5
opends/src/server/org/opends/server/protocols/ldap/AddRequestProtocolOp.java
@@ -35,11 +35,13 @@
import org.opends.server.protocols.asn1.ASN1Element;
import org.opends.server.protocols.asn1.ASN1OctetString;
import org.opends.server.protocols.asn1.ASN1Sequence;
import org.opends.server.types.DebugLogLevel;
import org.opends.server.types.LDAPException;
import org.opends.server.types.RawAttribute;
import org.opends.server.util.Base64;
import static org.opends.server.loggers.debug.DebugLogger.debugCaught;
import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.debug.DebugLogger.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.protocols.ldap.LDAPConstants.*;
@@ -48,6 +50,7 @@
import static org.opends.server.util.StaticUtils.*;
/**
 * This class defines the structures and methods for an LDAP add request
 * protocol op, which is used to add a new entry to the Directory Server.
@@ -55,11 +58,8 @@
public class AddRequestProtocolOp
       extends ProtocolOp
{
  // The set of attributes for this add request.
  private List<LDAPAttribute> attributes;
  private List<RawAttribute> attributes;
  // The DN for this add request.
  private ASN1OctetString dn;
@@ -75,7 +75,7 @@
  public AddRequestProtocolOp(ASN1OctetString dn)
  {
    this.dn         = dn;
    this.attributes = new ArrayList<LDAPAttribute>();
    this.attributes = new ArrayList<RawAttribute>();
  }
@@ -88,13 +88,13 @@
   * @param  attributes  The set of attributes for this add request.
   */
  public AddRequestProtocolOp(ASN1OctetString dn,
                              ArrayList<LDAPAttribute> attributes)
                              ArrayList<RawAttribute> attributes)
  {
    this.dn = dn;
    if (attributes == null)
    {
      this.attributes = new ArrayList<LDAPAttribute>();
      this.attributes = new ArrayList<RawAttribute>();
    }
    else
    {
@@ -134,7 +134,7 @@
   *
   * @return  The set of attributes for this add request.
   */
  public List<LDAPAttribute> getAttributes()
  public List<RawAttribute> getAttributes()
  {
    return attributes;
  }
@@ -179,7 +179,7 @@
    ArrayList<ASN1Element> attrElements =
         new ArrayList<ASN1Element>(attributes.size());
    for (LDAPAttribute attr : attributes)
    for (RawAttribute attr : attributes)
    {
      attrElements.add(attr.encode());
    }
@@ -250,12 +250,12 @@
    ArrayList<LDAPAttribute> attributes;
    ArrayList<RawAttribute> attributes;
    try
    {
      ArrayList<ASN1Element> attrElements =
           elements.get(1).decodeAsSequence().elements();
      attributes = new ArrayList<LDAPAttribute>(attrElements.size());
      attributes = new ArrayList<RawAttribute>(attrElements.size());
      for (ASN1Element e : attrElements)
      {
        attributes.add(LDAPAttribute.decode(e));
@@ -293,7 +293,7 @@
    if (! attributes.isEmpty())
    {
      Iterator<LDAPAttribute> iterator = attributes.iterator();
      Iterator<RawAttribute> iterator = attributes.iterator();
      iterator.next().toString(buffer);
      while (iterator.hasNext())
@@ -336,7 +336,7 @@
    buffer.append("  Attributes:");
    buffer.append(EOL);
    for (LDAPAttribute attribute : attributes)
    for (RawAttribute attribute : attributes)
    {
      attribute.toString(buffer, indent+4);
    }
@@ -401,7 +401,7 @@
    // Add the attributes to the buffer.
    for (LDAPAttribute a : attributes)
    for (RawAttribute a : attributes)
    {
      String name       = a.getAttributeType();
      int    nameLength = name.length();