Package org.springframework.ldap.core
Class LdapRdn
- java.lang.Object
-
- org.springframework.ldap.core.LdapRdn
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable
public class LdapRdn extends java.lang.Object implements java.io.Serializable, java.lang.Comparable
Deprecated.DistinguishedName
and associated classes are deprecated as of 2.0.Datatype for a LDAP name, a part of a path. The name: uid=adam.skogman Key: uid Value: adam.skogman- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description LdapRdn()
Deprecated.Default constructor.LdapRdn(java.lang.String string)
Deprecated.Parse the supplied string and construct this instance accordingly.LdapRdn(java.lang.String key, java.lang.String value)
Deprecated.Construct an LdapRdn using the supplied key and value.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addComponent(LdapRdnComponent rdnComponent)
Deprecated.Add an LdapRdnComponent to this LdapRdn.int
compareTo(java.lang.Object obj)
Deprecated.Compare this LdapRdn to another object.java.lang.String
encodeUrl()
Deprecated.Get a String representation of this LdapRdn for use in urls.boolean
equals(java.lang.Object obj)
Deprecated.LdapRdnComponent
getComponent()
Deprecated.Gets the first LdapRdnComponent of this LdapRdn.LdapRdnComponent
getComponent(int idx)
Deprecated.Get the LdapRdnComponent at indexidx
.java.util.List
getComponents()
Deprecated.Gets all components in this LdapRdn.java.lang.String
getKey()
Deprecated.Get the key of this LdapRdn.java.lang.String
getLdapEncoded()
Deprecated.Get a properly rfc2253-encoded String representation of this LdapRdn.java.lang.String
getValue()
Deprecated.Get the value of this LdapRdn.java.lang.String
getValue(java.lang.String key)
Deprecated.Get the value of the LdapComponent with the specified key (Attribute name).int
hashCode()
Deprecated.LdapRdn
immutableLdapRdn()
Deprecated.Create an immutable copy of this instance.java.lang.String
toString()
Deprecated.
-
-
-
Constructor Detail
-
LdapRdn
public LdapRdn()
Deprecated.Default constructor. Create an empty, uninitialized LdapRdn.
-
LdapRdn
public LdapRdn(java.lang.String string)
Deprecated.Parse the supplied string and construct this instance accordingly.- Parameters:
string
- the string to parse.
-
LdapRdn
public LdapRdn(java.lang.String key, java.lang.String value)
Deprecated.Construct an LdapRdn using the supplied key and value.- Parameters:
key
- the attribute name.value
- the attribute value.
-
-
Method Detail
-
addComponent
public void addComponent(LdapRdnComponent rdnComponent)
Deprecated.Add an LdapRdnComponent to this LdapRdn.- Parameters:
rdnComponent
- the LdapRdnComponent to add.s
-
getComponents
public java.util.List getComponents()
Deprecated.Gets all components in this LdapRdn.- Returns:
- the List of all LdapRdnComponents composing this LdapRdn.
-
getComponent
public LdapRdnComponent getComponent()
Deprecated.Gets the first LdapRdnComponent of this LdapRdn.- Returns:
- The first LdapRdnComponent of this LdapRdn.
- Throws:
java.lang.IndexOutOfBoundsException
- if there are no components in this Rdn.
-
getComponent
public LdapRdnComponent getComponent(int idx)
Deprecated.Get the LdapRdnComponent at indexidx
.- Parameters:
idx
- the 0-based index of the component to get.- Returns:
- the LdapRdnComponent at index
idx
. - Throws:
java.lang.IndexOutOfBoundsException
- if there are no components in this Rdn.
-
getLdapEncoded
public java.lang.String getLdapEncoded()
Deprecated.Get a properly rfc2253-encoded String representation of this LdapRdn.- Returns:
- an escaped String corresponding to this LdapRdn.
- Throws:
java.lang.IndexOutOfBoundsException
- if there are no components in this Rdn.
-
encodeUrl
public java.lang.String 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
public int compareTo(java.lang.Object obj)
Deprecated.Compare this LdapRdn to another object.- Specified by:
compareTo
in interfacejava.lang.Comparable
- Parameters:
obj
- the object to compare to.- Throws:
java.lang.ClassCastException
- if the supplied object is not an LdapRdn instance.
-
equals
public boolean equals(java.lang.Object obj)
Deprecated.- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
Deprecated.- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
Deprecated.- Overrides:
toString
in classjava.lang.Object
-
getValue
public java.lang.String 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:
java.lang.IndexOutOfBoundsException
- if there are no components in this Rdn.
-
getKey
public java.lang.String 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:
java.lang.IndexOutOfBoundsException
- if there are no components in this Rdn.
-
getValue
public java.lang.String getValue(java.lang.String key)
Deprecated.Get the value of the LdapComponent with the specified key (Attribute name).- Parameters:
key
- the key- Returns:
- the value.
- Throws:
java.lang.IllegalArgumentException
- if there is no component with the specified key.
-
immutableLdapRdn
public LdapRdn 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
-
-