Package org.springframework.ldap.core
Class LdapRdnComponent
- java.lang.Object
-
- org.springframework.ldap.core.LdapRdnComponent
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable
public class LdapRdnComponent extends java.lang.Object implements java.lang.Comparable, java.io.SerializableDeprecated.DistinguishedNameand associated classes are deprecated as of 2.0.Represents part of an LdapRdn. As specified in RFC2253 an LdapRdn may be composed of several attributes, separated by "+". An LdapRdnComponent represents one of these attributes.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static booleanDONT_DECODE_VALUEDeprecated.
-
Constructor Summary
Constructors Constructor Description LdapRdnComponent(java.lang.String key, java.lang.String value)Deprecated.Constructs an LdapRdnComponent without decoding the value.LdapRdnComponent(java.lang.String key, java.lang.String value, boolean decodeValue)Deprecated.Constructs an LdapRdnComponent, optionally decoding the value.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description intcompareTo(java.lang.Object obj)Deprecated.Compare this instance to the supplied object.protected java.lang.StringencodeLdap()Deprecated.Encode key and value to ldap.java.lang.StringencodeUrl()Deprecated.Get a String representation of this instance for use in URLs.booleanequals(java.lang.Object obj)Deprecated.java.lang.StringgetKey()Deprecated.Get the key (Attribute name) of this component.java.lang.StringgetLdapEncoded()Deprecated.java.lang.StringgetValue()Deprecated.Get the (Attribute) value of this component.inthashCode()Deprecated.LdapRdnComponentimmutableLdapRdnComponent()Deprecated.Create an immutable copy of this instance.voidsetKey(java.lang.String key)Deprecated.Using this method changes the internal state of surrounding DistinguishedName instance.voidsetValue(java.lang.String value)Deprecated.Using this method changes the internal state of surrounding DistinguishedName instance.java.lang.StringtoString()Deprecated.
-
-
-
Field Detail
-
DONT_DECODE_VALUE
public static final boolean DONT_DECODE_VALUE
Deprecated.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
LdapRdnComponent
public LdapRdnComponent(java.lang.String key, java.lang.String value)Deprecated.Constructs an LdapRdnComponent without decoding the value.- Parameters:
key- the Attribute name.value- the Attribute value.
-
LdapRdnComponent
public LdapRdnComponent(java.lang.String key, java.lang.String value, boolean decodeValue)Deprecated.Constructs an LdapRdnComponent, optionally decoding the value.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.
- Parameters:
key- the Attribute name.value- the Attribute value.decodeValue- iftruethe value is decoded (typically used when a DN is parsed from a String), otherwise the value is used as specified.- See Also:
DistinguishedName.KEY_CASE_FOLD_PROPERTY
-
-
Method Detail
-
getKey
public java.lang.String getKey()
Deprecated.Get the key (Attribute name) of this component.- Returns:
- the key.
-
setKey
public void setKey(java.lang.String key)
Deprecated.Using this method changes the internal state of surrounding DistinguishedName instance. This should be avoided.Set the key (Attribute name) of this component.- Parameters:
key- the key.
-
getValue
public java.lang.String getValue()
Deprecated.Get the (Attribute) value of this component.- Returns:
- the value.
-
setValue
public void setValue(java.lang.String value)
Deprecated.Using this method changes the internal state of surrounding DistinguishedName instance. This should be avoided.Set the (Attribute) value of this component.- Parameters:
value- the value.
-
encodeLdap
protected java.lang.String encodeLdap()
Deprecated.Encode key and value to ldap.- Returns:
- Properly ldap escaped rdn.
-
toString
public java.lang.String toString()
Deprecated.- Overrides:
toStringin classjava.lang.Object
-
getLdapEncoded
public java.lang.String getLdapEncoded()
Deprecated.- Returns:
- The LdapRdn as a string where the value is LDAP-encoded.
-
encodeUrl
public java.lang.String encodeUrl()
Deprecated.Get a String representation of this instance for use in URLs.- Returns:
- a properly URL encoded representation of this instancs.
-
hashCode
public int hashCode()
Deprecated.- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
Deprecated.- Overrides:
equalsin classjava.lang.Object
-
compareTo
public int compareTo(java.lang.Object obj)
Deprecated.Compare this instance to the supplied object.- Specified by:
compareToin interfacejava.lang.Comparable- Parameters:
obj- the object to compare to.- Throws:
java.lang.ClassCastException- if the object is not possible to cast to an LdapRdnComponent.
-
immutableLdapRdnComponent
public LdapRdnComponent immutableLdapRdnComponent()
Deprecated.Create an immutable copy of this instance. It will not be possible to modify the key or the value of the returned instance.- Returns:
- an immutable copy of this instance.
- Since:
- 1.3
-
-