org.keycloak.storage.ldap.idm.model

## Class LDAPDn.RDN

- java.lang.Object
- - org.keycloak.storage.ldap.idm.model.LDAPDn.RDN

- Enclosing class:
    LDAPDn

      public static class LDAPDn.RDN
      extends Object

  Single RDN inside the DN. RDN usually consists of single item like "uid=john" . In some rare cases, it can have multiple sub-entries like "uid=john+sn=Doe"

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<String>` | `getAllKeys()`
    `String` | `getAttrValue(String attrName)` Assume that RDN is something like "uid=john", then this method will return "john" in case that attrName is "uid" .
    `boolean` | `removeAttrValue(String attrName)`
    `void` | `setAttrValue(String attrName, String newAttrValue)`
    `String` | `toString()`
    `String` | `toString(boolean escaped)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### getAllKeys

          public List<String> getAllKeys()

      Returns:
        Keys in the RDN. Returned list is the copy, which is not linked to the original RDN

    - #### getAttrValue

          public String getAttrValue(String attrName)

      Assume that RDN is something like "uid=john", then this method will return "john" in case that attrName is "uid" . This is useful in case that RDN is multi-key - something like "uid=john+cn=John Doe" and we want to return just "john" as the value of "uid" The returned value will be unescaped
      Parameters:
        `attrName` -
      Returns:

    - #### setAttrValue

          public void setAttrValue(String attrName,
                                   String newAttrValue)

    - #### removeAttrValue

          public boolean removeAttrValue(String attrName)

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### toString

          public String toString(boolean escaped)

      Parameters:
        `escaped` - indicates whether return escaped or unescaped values. EG. "uid=john,comma" VS "uid=john\,comma"
      Returns:

Copyright © 2021 JBoss by Red Hat. All rights reserved.