Spring LDAP

org.springframework.ldap.support
Class LdapNameBuilder

java.lang.Object
  extended by org.springframework.ldap.support.LdapNameBuilder

public final class LdapNameBuilder
extends Object

Helper class for building LdapName instances.

Since:
2.0
Author:
Mattias Hellborg Arthursson

Method Summary
 LdapNameBuilder add(String key, Object value)
          Add a Rdn to the built LdapName.
 LdapName build()
          Build the LdapName instance.
static LdapNameBuilder newInstance()
          Construct a new instance, starting with a blank LdapName.
static LdapNameBuilder newLdapName(Name name)
          Construct a new instance, starting with a copy of the supplied LdapName.
static LdapNameBuilder newLdapName(String name)
          Construct a new instance, starting with an LdapName constructed from the supplied string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newInstance

public static LdapNameBuilder newInstance()
Construct a new instance, starting with a blank LdapName.

Returns:
a new instance.

newLdapName

public static LdapNameBuilder newLdapName(Name name)
Construct a new instance, starting with a copy of the supplied LdapName.

Parameters:
name - the starting point of the LdapName to be built.
Returns:
a new instance.

newLdapName

public static LdapNameBuilder newLdapName(String name)
Construct a new instance, starting with an LdapName constructed from the supplied string.

Parameters:
name - the starting point of the LdapName to be built.
Returns:
a new instance.

add

public LdapNameBuilder add(String key,
                           Object value)
Add a Rdn to the built LdapName.

Parameters:
key - the rdn attribute key.
value - the rdn value.
Returns:
this builder.

build

public LdapName build()
Build the LdapName instance.

Returns:
the LdapName instance that has been built.

Spring LDAP