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

neil_a_wilson
16.28.2006 a705f763f283d4687d9ae7587b7f4f4e8516e878
opends/src/server/org/opends/server/tools/LDAPToolUtils.java
@@ -35,6 +35,8 @@
import org.opends.server.protocols.ldap.LDAPControl;
import static org.opends.server.loggers.Debug.*;
import static org.opends.server.util.ServerConstants.*;
import static org.opends.server.util.StaticUtils.*;
@@ -71,13 +73,52 @@
    ASN1OctetString controlValue = null;
    int idx = argString.indexOf(":");
    if(idx == -1)
    if(idx < 0)
    {
      control = new LDAPControl(argString);
      return control;
      controlOID = argString;
    }
    else
    {
      controlOID = argString.substring(0, idx);
    }
    controlOID = argString.substring(0, idx);
    String lowerOID = toLowerCase(controlOID);
    if (lowerOID.equals("accountusable") || lowerOID.equals("accountusability"))
    {
      controlOID = OID_ACCOUNT_USABLE_CONTROL;
    }
    else if (lowerOID.equals("authzid") ||
             lowerOID.equals("authorizationidentity"))
    {
      controlOID = OID_AUTHZID_REQUEST;
    }
    else if (lowerOID.equals("noop") || lowerOID.equals("no-op"))
    {
      controlOID = OID_LDAP_NOOP_OPENLDAP_ASSIGNED;
    }
    else if (lowerOID.equals("subentries"))
    {
      controlOID = OID_LDAP_SUBENTRIES;
    }
    else if (lowerOID.equals("managedsait"))
    {
      controlOID = OID_MANAGE_DSAIT_CONTROL;
    }
    else if (lowerOID.equals("pwpolicy") || lowerOID.equals("passwordpolicy"))
    {
      controlOID = OID_PASSWORD_POLICY_CONTROL;
    }
    else if (lowerOID.equals("subtreedelete") || lowerOID.equals("treedelete"))
    {
      controlOID = OID_SUBTREE_DELETE_CONTROL;
    }
    if (idx < 0)
    {
      return new LDAPControl(controlOID);
    }
    String remainder = argString.substring(idx+1, argString.length());
    idx = remainder.indexOf(":");