Package org.springframework.ldap.core
Class LdapRdn
java.lang.Object
org.springframework.ldap.core.LdapRdn
- All Implemented Interfaces:
Serializable
,Comparable
Deprecated.
Datatype for a LDAP name, a part of a path.
The name: uid=adam.skogman Key: uid Value: adam.skogman
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addComponent
(LdapRdnComponent rdnComponent) Deprecated.Add an LdapRdnComponent to this LdapRdn.int
Deprecated.Compare this LdapRdn to another object.Deprecated.Get a String representation of this LdapRdn for use in urls.boolean
Deprecated.Deprecated.Gets the first LdapRdnComponent of this LdapRdn.getComponent
(int idx) Deprecated.Get the LdapRdnComponent at indexidx
.Deprecated.Gets all components in this LdapRdn.getKey()
Deprecated.Get the key of this LdapRdn.Deprecated.Get a properly rfc2253-encoded String representation of this LdapRdn.getValue()
Deprecated.Get the value of this LdapRdn.Deprecated.Get the value of the LdapComponent with the specified key (Attribute name).int
hashCode()
Deprecated.Deprecated.Create an immutable copy of this instance.toString()
Deprecated.
-
Constructor Details
-
LdapRdn
public LdapRdn()Deprecated.Default constructor. Create an empty, uninitialized LdapRdn. -
LdapRdn
Deprecated.Parse the supplied string and construct this instance accordingly.- Parameters:
string
- the string to parse.
-
LdapRdn
Deprecated.Construct an LdapRdn using the supplied key and value.- Parameters:
key
- the attribute name.value
- the attribute value.
-
-
Method Details
-
addComponent
Deprecated.Add an LdapRdnComponent to this LdapRdn.- Parameters:
rdnComponent
- the LdapRdnComponent to add.s
-
getComponents
Deprecated.Gets all components in this LdapRdn.- Returns:
- the List of all LdapRdnComponents composing this LdapRdn.
-
getComponent
Deprecated.Gets the first LdapRdnComponent of this LdapRdn.- Returns:
- The first LdapRdnComponent of this LdapRdn.
- Throws:
IndexOutOfBoundsException
- if there are no components in this Rdn.
-
getComponent
Deprecated.Get the LdapRdnComponent at indexidx
.- Parameters:
idx
- the 0-based index of the component to get.- Returns:
- the LdapRdnComponent at index
idx
. - Throws:
IndexOutOfBoundsException
- if there are no components in this Rdn.
-
getLdapEncoded
Deprecated.Get a properly rfc2253-encoded String representation of this LdapRdn.- Returns:
- an escaped String corresponding to this LdapRdn.
- Throws:
IndexOutOfBoundsException
- if there are no components in this Rdn.
-
encodeUrl
Deprecated.Get a String representation of this LdapRdn for use in urls.- Returns:
- a String representation of this LdapRdn for use in urls.
-
compareTo
Deprecated.Compare this LdapRdn to another object.- Specified by:
compareTo
in interfaceComparable
- Parameters:
obj
- the object to compare to.- Throws:
ClassCastException
- if the supplied object is not an LdapRdn instance.
-
equals
Deprecated. -
hashCode
public int hashCode()Deprecated. -
toString
Deprecated. -
getValue
Deprecated.Get the value of this LdapRdn. Note that if this Rdn is multi-value the first value will be returned. E.g. for the Rdncn=john doe+sn=doe
, the return value would bejohn doe
.- Returns:
- the (first) value of this LdapRdn.
- Throws:
IndexOutOfBoundsException
- if there are no components in this Rdn.
-
getKey
Deprecated.Get the key of this LdapRdn. Note that if this Rdn is multi-value the first key will be returned. E.g. for the Rdncn=john doe+sn=doe
, the return value would becn
.- Returns:
- the (first) key of this LdapRdn.
- Throws:
IndexOutOfBoundsException
- if there are no components in this Rdn.
-
getValue
Deprecated.Get the value of the LdapComponent with the specified key (Attribute name).- Parameters:
key
- the key- Returns:
- the value.
- Throws:
IllegalArgumentException
- if there is no component with the specified key.
-
immutableLdapRdn
Deprecated.Create an immutable copy of this instance. It will not be possible to add or remove components or modify the keys and values of these components.- Returns:
- an immutable copy of this instance.
- Since:
- 1.3
-
DistinguishedName
and associated classes are deprecated as of 2.0.