public class LdapRdn extends Object implements Serializable, Comparable
Constructor and Description |
---|
LdapRdn()
Default constructor.
|
LdapRdn(String string)
Parse the supplied string and construct this instance accordingly.
|
LdapRdn(String key,
String value)
Construct an LdapRdn using the supplied key and value.
|
Modifier and Type | Method and Description |
---|---|
void |
addComponent(LdapRdnComponent rdnComponent)
Add an LdapRdnComponent to this LdapRdn.
|
int |
compareTo(Object obj)
Compare this LdapRdn to another object.
|
String |
encodeUrl()
Get a String representation of this LdapRdn for use in urls.
|
boolean |
equals(Object obj) |
LdapRdnComponent |
getComponent()
Gets the first LdapRdnComponent of this LdapRdn.
|
LdapRdnComponent |
getComponent(int idx)
Get the LdapRdnComponent at index
idx . |
List |
getComponents()
Gets all components in this LdapRdn.
|
String |
getKey()
Get the key of this LdapRdn.
|
String |
getLdapEncoded()
Get a properly rfc2253-encoded String representation of this LdapRdn.
|
String |
getValue()
Get the value of this LdapRdn.
|
String |
getValue(String key)
Get the value of the LdapComponent with the specified key (Attribute
name).
|
int |
hashCode() |
LdapRdn |
immutableLdapRdn()
Create an immutable copy of this instance.
|
String |
toString() |
public LdapRdn()
public LdapRdn(String string)
string
- the string to parse.public void addComponent(LdapRdnComponent rdnComponent)
rdnComponent
- the LdapRdnComponent to add.spublic List getComponents()
public LdapRdnComponent getComponent()
IndexOutOfBoundsException
- if there are no components in this Rdn.public LdapRdnComponent getComponent(int idx)
idx
.idx
- the 0-based index of the component to get.idx
.IndexOutOfBoundsException
- if there are no components in this Rdn.public String getLdapEncoded()
IndexOutOfBoundsException
- if there are no components in this Rdn.public String encodeUrl()
public int compareTo(Object obj)
compareTo
in interface Comparable
obj
- the object to compare to.ClassCastException
- if the supplied object is not an LdapRdn
instance.public String getValue()
cn=john doe+sn=doe
, the return value would be
john doe
.IndexOutOfBoundsException
- if there are no components in this Rdn.public String getKey()
cn=john doe+sn=doe
, the return value would be
cn
.IndexOutOfBoundsException
- if there are no components in this Rdn.public String getValue(String key)
key
- the keyIllegalArgumentException
- if there is no component with the
specified key.public LdapRdn immutableLdapRdn()
Copyright © 2005–2015 The Spring LDAP Framework. All rights reserved.