public class LdapRdnComponent
extends java.lang.Object
implements java.lang.Comparable, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static boolean |
DONT_DECODE_VALUE |
Constructor and Description |
---|
LdapRdnComponent(java.lang.String key,
java.lang.String value)
Constructs an LdapRdnComponent without decoding the value.
|
LdapRdnComponent(java.lang.String key,
java.lang.String value,
boolean decodeValue)
Constructs an LdapRdnComponent, optionally decoding the value.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(java.lang.Object obj)
Compare this instance to the supplied object.
|
protected java.lang.String |
encodeLdap()
Encode key and value to ldap.
|
java.lang.String |
encodeUrl()
Get a String representation of this instance for use in URLs.
|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getKey()
Get the key (Attribute name) of this component.
|
java.lang.String |
getLdapEncoded() |
java.lang.String |
getValue()
Get the (Attribute) value of this component.
|
int |
hashCode() |
LdapRdnComponent |
immutableLdapRdnComponent()
Create an immutable copy of this instance.
|
void |
setKey(java.lang.String key)
Deprecated.
Using this method changes the internal state of surrounding
DistinguishedName instance. This should be avoided.
|
void |
setValue(java.lang.String value)
Deprecated.
Using this method changes the internal state of surrounding
DistinguishedName instance. This should be avoided.
|
java.lang.String |
toString() |
public static final boolean DONT_DECODE_VALUE
public LdapRdnComponent(java.lang.String key, java.lang.String value)
key
- the Attribute name.value
- the Attribute value.public LdapRdnComponent(java.lang.String key, java.lang.String value, boolean decodeValue)
Depending on the value of the "key case fold" System property, the keys will be lowercased, uppercased, or preserve their original case. Default is to convert them to lowercase.
key
- the Attribute name.value
- the Attribute value.decodeValue
- if true
the value is decoded (typically
used when a DN is parsed from a String), otherwise the value is used as
specified.DistinguishedName.KEY_CASE_FOLD_PROPERTY
public java.lang.String getKey()
public void setKey(java.lang.String key)
key
- the key.public java.lang.String getValue()
public void setValue(java.lang.String value)
value
- the value.protected java.lang.String encodeLdap()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getLdapEncoded()
public java.lang.String encodeUrl()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int compareTo(java.lang.Object obj)
compareTo
in interface java.lang.Comparable
obj
- the object to compare to.java.lang.ClassCastException
- if the object is not possible to cast to an
LdapRdnComponent.public LdapRdnComponent immutableLdapRdnComponent()