javax.naming.ldap
Class LdapName

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.naming.ldap.LdapName
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable , Cloneable sample code for java.lang.Cloneable definition code for java.lang.Cloneable , Comparable sample code for java.lang.Comparable definition code for java.lang.Comparable <Object sample code for java.lang.Object definition code for java.lang.Object >, Name sample code for javax.naming.Name definition code for javax.naming.Name

public class LdapName
extends Object sample code for java.lang.Object definition code for java.lang.Object
implements Name sample code for javax.naming.Name definition code for javax.naming.Name

This class represents a distinguished name as specified by RFC 2253. A distinguished name, or DN, is composed of an ordered list of components called relative distinguished names, or RDNs. Details of a DN's syntax are described in RFC 2253.

This class resolves a few ambiguities found in RFC 2253 as follows:

String names passed to LdapName or returned by it use the full Unicode character set. They may also contain characters encoded into UTF-8 with each octet represented by a three-character substring such as "\\B4". They may not, however, contain characters encoded into UTF-8 with each octet represented by a single character in the string: the meaning would be ambiguous.

LdapName will properly parse all valid names, but does not attempt to detect all possible violations when parsing invalid names. It is "generous" in accepting invalid names. The "validity" of a name is determined ultimately when it is supplied to an LDAP server, which may accept or reject the name based on factors such as its schema information and interoperability considerations.

When names are tested for equality, attribute types, both binary and string values, are case-insensitive. String values with different but equivalent usage of quoting, escaping, or UTF8-hex-encoding are considered equal. The order of components in multi-valued RDNs (such as "ou=Sales+cn=Bob") is not significant.

The components of a LDAP name, that is, RDNs, are numbered. The indexes of a LDAP name with n RDNs range from 0 to n-1. This range may be written as [0,n). The right most RDN is at index 0, and the left most RDN is at index n-1. For example, the distinguished name: "CN=Steve Kille, O=Isode Limited, C=GB" is numbered in the following sequence ranging from 0 to 2: {C=GB, O=Isode Limited, CN=Steve Kille}. An empty LDAP name is represented by an empty RDN list.

Concurrent multithreaded read-only access of an instance of LdapName need not be synchronized.

Unless otherwise noted, the behavior of passing a null argument to a constructor or method in this class will cause a NullPointerException to be thrown.

Since:
1.5
See Also:
Serialized Form

Constructor Summary
LdapName sample code for javax.naming.ldap.LdapName.LdapName(java.util.List) definition code for javax.naming.ldap.LdapName.LdapName(java.util.List) (List sample code for java.util.List definition code for java.util.List <Rdn sample code for javax.naming.ldap.Rdn definition code for javax.naming.ldap.Rdn > rdns)
          Constructs an LDAP name given its parsed RDN components.
LdapName sample code for javax.naming.ldap.LdapName.LdapName(java.lang.String) definition code for javax.naming.ldap.LdapName.LdapName(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  name)
          Constructs an LDAP name from the given distinguished name.
 
Method Summary
 Name sample code for javax.naming.Name definition code for javax.naming.Name add sample code for javax.naming.ldap.LdapName.add(int, javax.naming.ldap.Rdn) definition code for javax.naming.ldap.LdapName.add(int, javax.naming.ldap.Rdn) (int posn, Rdn sample code for javax.naming.ldap.Rdn definition code for javax.naming.ldap.Rdn  comp)
          Adds a single RDN at a specified position within this LDAP name.
 Name sample code for javax.naming.Name definition code for javax.naming.Name add sample code for javax.naming.ldap.LdapName.add(int, java.lang.String) definition code for javax.naming.ldap.LdapName.add(int, java.lang.String) (int posn, String sample code for java.lang.String definition code for java.lang.String  comp)
          Adds a single component at a specified position within this LDAP name.
 Name sample code for javax.naming.Name definition code for javax.naming.Name add sample code for javax.naming.ldap.LdapName.add(javax.naming.ldap.Rdn) definition code for javax.naming.ldap.LdapName.add(javax.naming.ldap.Rdn) (Rdn sample code for javax.naming.ldap.Rdn definition code for javax.naming.ldap.Rdn  comp)
          Adds a single RDN to the end of this LDAP name.
 Name sample code for javax.naming.Name definition code for javax.naming.Name add sample code for javax.naming.ldap.LdapName.add(java.lang.String) definition code for javax.naming.ldap.LdapName.add(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  comp)
          Adds a single component to the end of this LDAP name.
 Name sample code for javax.naming.Name definition code for javax.naming.Name addAll sample code for javax.naming.ldap.LdapName.addAll(int, java.util.List) definition code for javax.naming.ldap.LdapName.addAll(int, java.util.List) (int posn, List sample code for java.util.List definition code for java.util.List <Rdn sample code for javax.naming.ldap.Rdn definition code for javax.naming.ldap.Rdn > suffixRdns)
          Adds the RDNs of a name -- in order -- at a specified position within this name.
 Name sample code for javax.naming.Name definition code for javax.naming.Name addAll sample code for javax.naming.ldap.LdapName.addAll(int, javax.naming.Name) definition code for javax.naming.ldap.LdapName.addAll(int, javax.naming.Name) (int posn, Name sample code for javax.naming.Name definition code for javax.naming.Name  suffix)
          Adds the components of a name -- in order -- at a specified position within this name.
 Name sample code for javax.naming.Name definition code for javax.naming.Name addAll sample code for javax.naming.ldap.LdapName.addAll(java.util.List) definition code for javax.naming.ldap.LdapName.addAll(java.util.List) (List sample code for java.util.List definition code for java.util.List <Rdn sample code for javax.naming.ldap.Rdn definition code for javax.naming.ldap.Rdn > suffixRdns)
          Adds the RDNs of a name -- in order -- to the end of this name.
 Name sample code for javax.naming.Name definition code for javax.naming.Name addAll sample code for javax.naming.ldap.LdapName.addAll(javax.naming.Name) definition code for javax.naming.ldap.LdapName.addAll(javax.naming.Name) (Name sample code for javax.naming.Name definition code for javax.naming.Name  suffix)
          Adds the components of a name -- in order -- to the end of this name.
 Object sample code for java.lang.Object definition code for java.lang.Object clone sample code for javax.naming.ldap.LdapName.clone() definition code for javax.naming.ldap.LdapName.clone() ()
          Generates a new copy of this name.
 int compareTo sample code for javax.naming.ldap.LdapName.compareTo(java.lang.Object) definition code for javax.naming.ldap.LdapName.compareTo(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  obj)
          Compares this LdapName with the specified Object for order.
 boolean endsWith sample code for javax.naming.ldap.LdapName.endsWith(java.util.List) definition code for javax.naming.ldap.LdapName.endsWith(java.util.List) (List sample code for java.util.List definition code for java.util.List <Rdn sample code for javax.naming.ldap.Rdn definition code for javax.naming.ldap.Rdn > rdns)
          Determines whether the specified RDN sequence forms a suffix of this LDAP name.
 boolean endsWith sample code for javax.naming.ldap.LdapName.endsWith(javax.naming.Name) definition code for javax.naming.ldap.LdapName.endsWith(javax.naming.Name) (Name sample code for javax.naming.Name definition code for javax.naming.Name  n)
          Determines whether this LDAP name ends with a specified LDAP name suffix.
 boolean equals sample code for javax.naming.ldap.LdapName.equals(java.lang.Object) definition code for javax.naming.ldap.LdapName.equals(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  obj)
          Determines whether two LDAP names are equal.
 String sample code for java.lang.String definition code for java.lang.String get sample code for javax.naming.ldap.LdapName.get(int) definition code for javax.naming.ldap.LdapName.get(int) (int posn)
          Retrieves a component of this LDAP name as a string.
 Enumeration sample code for java.util.Enumeration definition code for java.util.Enumeration <String sample code for java.lang.String definition code for java.lang.String > getAll sample code for javax.naming.ldap.LdapName.getAll() definition code for javax.naming.ldap.LdapName.getAll() ()
          Retrieves the components of this name as an enumeration of strings.
 Name sample code for javax.naming.Name definition code for javax.naming.Name getPrefix sample code for javax.naming.ldap.LdapName.getPrefix(int) definition code for javax.naming.ldap.LdapName.getPrefix(int) (int posn)
          Creates a name whose components consist of a prefix of the components of this LDAP name.
 Rdn sample code for javax.naming.ldap.Rdn definition code for javax.naming.ldap.Rdn getRdn sample code for javax.naming.ldap.LdapName.getRdn(int) definition code for javax.naming.ldap.LdapName.getRdn(int) (int posn)
          Retrieves an RDN of this LDAP name as an Rdn.
 List sample code for java.util.List definition code for java.util.List <Rdn sample code for javax.naming.ldap.Rdn definition code for javax.naming.ldap.Rdn > getRdns sample code for javax.naming.ldap.LdapName.getRdns() definition code for javax.naming.ldap.LdapName.getRdns() ()
          Retrieves the list of relative distinguished names.
 Name sample code for javax.naming.Name definition code for javax.naming.Name getSuffix sample code for javax.naming.ldap.LdapName.getSuffix(int) definition code for javax.naming.ldap.LdapName.getSuffix(int) (int posn)
          Creates a name whose components consist of a suffix of the components in this LDAP name.
 int hashCode sample code for javax.naming.ldap.LdapName.hashCode() definition code for javax.naming.ldap.LdapName.hashCode() ()
          Computes the hash code of this LDAP name.
 boolean isEmpty sample code for javax.naming.ldap.LdapName.isEmpty() definition code for javax.naming.ldap.LdapName.isEmpty() ()
          Determines whether this LDAP name is empty.
 Object sample code for java.lang.Object definition code for java.lang.Object remove sample code for javax.naming.ldap.LdapName.remove(int) definition code for javax.naming.ldap.LdapName.remove(int) (int posn)
          Removes a component from this LDAP name.
 int size sample code for javax.naming.ldap.LdapName.size() definition code for javax.naming.ldap.LdapName.size() ()
          Retrieves the number of components in this LDAP name.
 boolean startsWith sample code for javax.naming.ldap.LdapName.startsWith(java.util.List) definition code for javax.naming.ldap.LdapName.startsWith(java.util.List) (List sample code for java.util.List definition code for java.util.List <Rdn sample code for javax.naming.ldap.Rdn definition code for javax.naming.ldap.Rdn > rdns)
          Determines whether the specified RDN sequence forms a prefix of this LDAP name.
 boolean startsWith sample code for javax.naming.ldap.LdapName.startsWith(javax.naming.Name) definition code for javax.naming.ldap.LdapName.startsWith(javax.naming.Name) (Name sample code for javax.naming.Name definition code for javax.naming.Name  n)
          Determines whether this LDAP name starts with a specified LDAP name prefix.
 String sample code for java.lang.String definition code for java.lang.String toString sample code for javax.naming.ldap.LdapName.toString() definition code for javax.naming.ldap.LdapName.toString() ()
          Returns a string representation of this LDAP name in a format defined by RFC 2253 and described in the class description.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

LdapName sample code for javax.naming.ldap.LdapName(java.lang.String) definition code for javax.naming.ldap.LdapName(java.lang.String)

public LdapName(String sample code for java.lang.String definition code for java.lang.String  name)
         throws InvalidNameException sample code for javax.naming.InvalidNameException definition code for javax.naming.InvalidNameException 
Constructs an LDAP name from the given distinguished name.

Parameters:
name - This is a non-null distinguished name formatted according to the rules defined in RFC 2253.
Throws:
InvalidNameException sample code for javax.naming.InvalidNameException definition code for javax.naming.InvalidNameException - if a syntax violation is detected.
See Also:
Rdn.escapeValue(Object value) sample code for javax.naming.ldap.Rdn.escapeValue(java.lang.Object) definition code for javax.naming.ldap.Rdn.escapeValue(java.lang.Object)

LdapName sample code for javax.naming.ldap.LdapName(java.util.List<javax.naming.ldap.Rdn>) definition code for javax.naming.ldap.LdapName(java.util.List<javax.naming.ldap.Rdn>)

public LdapName(List sample code for java.util.List definition code for java.util.List <Rdn sample code for javax.naming.ldap.Rdn definition code for javax.naming.ldap.Rdn > rdns)
Constructs an LDAP name given its parsed RDN components.

The indexing of RDNs in the list follows the numbering of RDNs described in the class description.

Parameters:
rdns - The non-null list of Rdns forming this LDAP name.
Method Detail

size sample code for javax.naming.ldap.LdapName.size() definition code for javax.naming.ldap.LdapName.size()

public int size()
Retrieves the number of components in this LDAP name.

Specified by:
size sample code for javax.naming.Name.size() definition code for javax.naming.Name.size() in interface Name sample code for javax.naming.Name definition code for javax.naming.Name
Returns:
The non-negative number of components in this LDAP name.

isEmpty sample code for javax.naming.ldap.LdapName.isEmpty() definition code for javax.naming.ldap.LdapName.isEmpty()

public boolean isEmpty()
Determines whether this LDAP name is empty. An empty name is one with zero components.

Specified by:
isEmpty sample code for javax.naming.Name.isEmpty() definition code for javax.naming.Name.isEmpty() in interface Name sample code for javax.naming.Name definition code for javax.naming.Name
Returns:
true if this LDAP name is empty, false otherwise.

getAll sample code for javax.naming.ldap.LdapName.getAll() definition code for javax.naming.ldap.LdapName.getAll()

public Enumeration sample code for java.util.Enumeration definition code for java.util.Enumeration <String sample code for java.lang.String definition code for java.lang.String > getAll()
Retrieves the components of this name as an enumeration of strings. The effect of updates to this name on this enumeration is undefined. If the name has zero components, an empty (non-null) enumeration is returned. The order of the components returned by the enumeration is same as the order in which the components are numbered as described in the class description.

Specified by:
getAll sample code for javax.naming.Name.getAll() definition code for javax.naming.Name.getAll() in interface Name sample code for javax.naming.Name definition code for javax.naming.Name
Returns:
A non-null enumeration of the components of this LDAP name. Each element of the enumeration is of class String.

get sample code for javax.naming.ldap.LdapName.get(int) definition code for javax.naming.ldap.LdapName.get(int)

public String sample code for java.lang.String definition code for java.lang.String  get(int posn)
Retrieves a component of this LDAP name as a string.

Specified by:
get sample code for javax.naming.Name.get(int) definition code for javax.naming.Name.get(int) in interface Name sample code for javax.naming.Name definition code for javax.naming.Name
Parameters:
posn - The 0-based index of the component to retrieve. Must be in the range [0,size()).
Returns:
The non-null component at index posn.
Throws:
IndexOutOfBoundsException sample code for java.lang.IndexOutOfBoundsException definition code for java.lang.IndexOutOfBoundsException - if posn is outside the specified range.

getRdn sample code for javax.naming.ldap.LdapName.getRdn(int) definition code for javax.naming.ldap.LdapName.getRdn(int)

public Rdn sample code for javax.naming.ldap.Rdn definition code for javax.naming.ldap.Rdn  getRdn(int posn)
Retrieves an RDN of this LDAP name as an Rdn.

Parameters:
posn - The 0-based index of the RDN to retrieve. Must be in the range [0,size()).
Returns:
The non-null RDN at index posn.
Throws:
IndexOutOfBoundsException sample code for java.lang.IndexOutOfBoundsException definition code for java.lang.IndexOutOfBoundsException - if posn is outside the specified range.

getPrefix sample code for javax.naming.ldap.LdapName.getPrefix(int) definition code for javax.naming.ldap.LdapName.getPrefix(int)

public Name sample code for javax.naming.Name definition code for javax.naming.Name  getPrefix(int posn)
Creates a name whose components consist of a prefix of the components of this LDAP name. Subsequent changes to this name will not affect the name that is returned and vice versa.

Specified by:
getPrefix sample code for javax.naming.Name.getPrefix(int) definition code for javax.naming.Name.getPrefix(int) in interface Name sample code for javax.naming.Name definition code for javax.naming.Name
Parameters:
posn - The 0-based index of the component at which to stop. Must be in the range [0,size()].
Returns:
An instance of LdapName consisting of the components at indexes in the range [0,posn). If posn is zero, an empty LDAP name is returned.
Throws:
IndexOutOfBoundsException sample code for java.lang.IndexOutOfBoundsException definition code for java.lang.IndexOutOfBoundsException - If posn is outside the specified range.

getSuffix sample code for javax.naming.ldap.LdapName.getSuffix(int) definition code for javax.naming.ldap.LdapName.getSuffix(int)

public Name sample code for javax.naming.Name definition code for javax.naming.Name  getSuffix(int posn)
Creates a name whose components consist of a suffix of the components in this LDAP name. Subsequent changes to this name do not affect the name that is returned and vice versa.

Specified by:
getSuffix sample code for javax.naming.Name.getSuffix(int) definition code for javax.naming.Name.getSuffix(int) in interface Name sample code for javax.naming.Name definition code for javax.naming.Name
Parameters:
posn - The 0-based index of the component at which to start. Must be in the range [0,size()].
Returns:
An instance of LdapName consisting of the components at indexes in the range [posn,size()). If posn is equal to size(), an empty LDAP name is returned.
Throws:
IndexOutOfBoundsException sample code for java.lang.IndexOutOfBoundsException definition code for java.lang.IndexOutOfBoundsException - If posn is outside the specified range.

startsWith sample code for javax.naming.ldap.LdapName.startsWith(javax.naming.Name) definition code for javax.naming.ldap.LdapName.startsWith(javax.naming.Name)

public boolean startsWith(Name sample code for javax.naming.Name definition code for javax.naming.Name  n)
Determines whether this LDAP name starts with a specified LDAP name prefix. A name n is a prefix if it is equal to getPrefix(n.size())--in other words this LDAP name starts with 'n'. If n is null or not a RFC2253 formatted name as described in the class description, false is returned.

Specified by:
startsWith sample code for javax.naming.Name.startsWith(javax.naming.Name) definition code for javax.naming.Name.startsWith(javax.naming.Name) in interface Name sample code for javax.naming.Name definition code for javax.naming.Name
Parameters:
n - The LDAP name to check.
Returns:
true if n is a prefix of this LDAP name, false otherwise.
See Also:
getPrefix(int posn) sample code for javax.naming.ldap.LdapName.getPrefix(int) definition code for javax.naming.ldap.LdapName.getPrefix(int)

startsWith sample code for javax.naming.ldap.LdapName.startsWith(java.util.List<javax.naming.ldap.Rdn>) definition code for javax.naming.ldap.LdapName.startsWith(java.util.List<javax.naming.ldap.Rdn>)

public boolean startsWith(List sample code for java.util.List definition code for java.util.List <Rdn sample code for javax.naming.ldap.Rdn definition code for javax.naming.ldap.Rdn > rdns)
Determines whether the specified RDN sequence forms a prefix of this LDAP name. Returns true if this LdapName is at least as long as rdns, and for every position p in the range [0, rdns.size()) the component getRdn(p) matches rdns.get(p). Returns false otherwise. If rdns is null, false is returned.

Parameters:
rdns - The sequence of Rdns to check.
Returns:
true if rdns form a prefix of this LDAP name, false otherwise.

endsWith sample code for javax.naming.ldap.LdapName.endsWith(javax.naming.Name) definition code for javax.naming.ldap.LdapName.endsWith(javax.naming.Name)

public boolean endsWith(Name sample code for javax.naming.Name definition code for javax.naming.Name  n)
Determines whether this LDAP name ends with a specified LDAP name suffix. A name n is a suffix if it is equal to getSuffix(size()-n.size())--in other words this LDAP name ends with 'n'. If n is null or not a RFC2253 formatted name as described in the class description, false is returned.

Specified by:
endsWith sample code for javax.naming.Name.endsWith(javax.naming.Name) definition code for javax.naming.Name.endsWith(javax.naming.Name) in interface Name sample code for javax.naming.Name definition code for javax.naming.Name
Parameters:
n - The LDAP name to check.
Returns:
true if n is a suffix of this name, false otherwise.
See Also:
getSuffix(int posn) sample code for javax.naming.ldap.LdapName.getSuffix(int) definition code for javax.naming.ldap.LdapName.getSuffix(int)

endsWith sample code for javax.naming.ldap.LdapName.endsWith(java.util.List<javax.naming.ldap.Rdn>) definition code for javax.naming.ldap.LdapName.endsWith(java.util.List<javax.naming.ldap.Rdn>)

public boolean endsWith(List sample code for java.util.List definition code for java.util.List <Rdn sample code for javax.naming.ldap.Rdn definition code for javax.naming.ldap.Rdn > rdns)
Determines whether the specified RDN sequence forms a suffix of this LDAP name. Returns true if this LdapName is at least as long as rdns, and for every position p in the range [size() - rdns.size(), size()) the component getRdn(p) matches rdns.get(p). Returns false otherwise. If rdns is null, false is returned.

Parameters:
rdns - The sequence of Rdns to check.
Returns:
true if rdns form a suffix of this LDAP name, false otherwise.

addAll sample code for javax.naming.ldap.LdapName.addAll(javax.naming.Name) definition code for javax.naming.ldap.LdapName.addAll(javax.naming.Name)

public Name sample code for javax.naming.Name definition code for javax.naming.Name  addAll(Name sample code for javax.naming.Name definition code for javax.naming.Name  suffix)
            throws InvalidNameException sample code for javax.naming.InvalidNameException definition code for javax.naming.InvalidNameException 
Adds the components of a name -- in order -- to the end of this name.

Specified by:
addAll sample code for javax.naming.Name.addAll(javax.naming.Name) definition code for javax.naming.Name.addAll(javax.naming.Name) in interface Name sample code for javax.naming.Name definition code for javax.naming.Name
Parameters:
suffix - The non-null components to add.
Returns:
The updated name (not a new instance).
Throws:
InvalidNameException sample code for javax.naming.InvalidNameException definition code for javax.naming.InvalidNameException - if suffix is not a valid LDAP name, or if the addition of the components would violate the syntax rules of this LDAP name.

addAll sample code for javax.naming.ldap.LdapName.addAll(java.util.List<javax.naming.ldap.Rdn>) definition code for javax.naming.ldap.LdapName.addAll(java.util.List<javax.naming.ldap.Rdn>)

public Name sample code for javax.naming.Name definition code for javax.naming.Name  addAll(List sample code for java.util.List definition code for java.util.List <Rdn sample code for javax.naming.ldap.Rdn definition code for javax.naming.ldap.Rdn > suffixRdns)
Adds the RDNs of a name -- in order -- to the end of this name.

Parameters:
suffixRdns - The non-null suffix Rdns to add.
Returns:
The updated name (not a new instance).

addAll sample code for javax.naming.ldap.LdapName.addAll(int, javax.naming.Name) definition code for javax.naming.ldap.LdapName.addAll(int, javax.naming.Name)

public Name sample code for javax.naming.Name definition code for javax.naming.Name  addAll(int posn,
                   Name sample code for javax.naming.Name definition code for javax.naming.Name  suffix)
            throws InvalidNameException sample code for javax.naming.InvalidNameException definition code for javax.naming.InvalidNameException 
Adds the components of a name -- in order -- at a specified position within this name. Components of this LDAP name at or after the index (if any) of the first new component are shifted up (away from index 0) to accomodate the new components.

Specified by:
addAll sample code for javax.naming.Name.addAll(int, javax.naming.Name) definition code for javax.naming.Name.addAll(int, javax.naming.Name) in interface Name sample code for javax.naming.Name definition code for javax.naming.Name
Parameters:
suffix - The non-null components to add.
posn - The index at which to add the new component. Must be in the range [0,size()].
Returns:
The updated name (not a new instance).
Throws:
InvalidNameException sample code for javax.naming.InvalidNameException definition code for javax.naming.InvalidNameException - if suffix is not a valid LDAP name, or if the addition of the components would violate the syntax rules of this LDAP name.
IndexOutOfBoundsException. - If posn is outside the specified range.

addAll sample code for javax.naming.ldap.LdapName.addAll(int, java.util.List<javax.naming.ldap.Rdn>) definition code for javax.naming.ldap.LdapName.addAll(int, java.util.List<javax.naming.ldap.Rdn>)

public Name sample code for javax.naming.Name definition code for javax.naming.Name  addAll(int posn,
                   List sample code for java.util.List definition code for java.util.List <Rdn sample code for javax.naming.ldap.Rdn definition code for javax.naming.ldap.Rdn > suffixRdns)
Adds the RDNs of a name -- in order -- at a specified position within this name. RDNs of this LDAP name at or after the index (if any) of the first new RDN are shifted up (away from index 0) to accomodate the new RDNs.

Parameters:
suffixRdns - The non-null suffix Rdns to add.
posn - The index at which to add the suffix RDNs. Must be in the range [0,size()].
Returns:
The updated name (not a new instance).
Throws:
IndexOutOfBoundsException. - If posn is outside the specified range.

add sample code for javax.naming.ldap.LdapName.add(java.lang.String) definition code for javax.naming.ldap.LdapName.add(java.lang.String)

public Name sample code for javax.naming.Name definition code for javax.naming.Name  add(String sample code for java.lang.String definition code for java.lang.String  comp)
         throws InvalidNameException sample code for javax.naming.InvalidNameException definition code for javax.naming.InvalidNameException 
Adds a single component to the end of this LDAP name.

Specified by:
add sample code for javax.naming.Name.add(java.lang.String) definition code for javax.naming.Name.add(java.lang.String) in interface Name sample code for javax.naming.Name definition code for javax.naming.Name
Parameters:
comp - The non-null component to add.
Returns:
The updated LdapName, not a new instance. Cannot be null.
Throws:
InvalidNameException sample code for javax.naming.InvalidNameException definition code for javax.naming.InvalidNameException - If adding comp at end of the name would violate the name's syntax.

add sample code for javax.naming.ldap.LdapName.add(javax.naming.ldap.Rdn) definition code for javax.naming.ldap.LdapName.add(javax.naming.ldap.Rdn)

public Name sample code for javax.naming.Name definition code for javax.naming.Name  add(Rdn sample code for javax.naming.ldap.Rdn definition code for javax.naming.ldap.Rdn  comp)
Adds a single RDN to the end of this LDAP name.

Parameters:
comp - The non-null RDN to add.
Returns:
The updated LdapName, not a new instance. Cannot be null.

add