com.ca.jcs.util
Class SimpleLdapName

java.lang.Object
  extended by com.ca.jcs.util.SimpleLdapName
All Implemented Interfaces:
Serializable, Cloneable, Comparable<Object>, Name
Direct Known Subclasses:
CachedLdapDN

public class SimpleLdapName
extends Object
implements Name

Implementation of the JNDI Name interface that extends the RFC 2253 standards to allow for connectors making use of connectorMapTo values for naming attributes that have arbitrary characters in them, including '_', ',', '=' etc.

See Also:
Serialized Form

Constructor Summary
SimpleLdapName()
           
SimpleLdapName(List<Rdn> components)
           
SimpleLdapName(Name name)
           
SimpleLdapName(Rdn... components)
           
SimpleLdapName(String name)
           
 
Method Summary
 Name add(int posn, Rdn comp)
           
 Name add(int posn, String comp)
           
 Name add(Rdn rdn)
           
 Name add(String comp)
           
 Name addAll(int posn, Name n)
           
 Name addAll(Name suffix)
           
 SimpleLdapName clone()
           
 int compareTo(Object obj)
           
 boolean endsWith(Name n)
           
 boolean equals(Object obj)
           
 String get(int posn)
           
 Enumeration<String> getAll()
           
 Iterator<Rdn> getAllRdns()
           
 Name getPrefix(int posn)
           
 Rdn getRdn(int posn)
           
 Name getSuffix(int posn)
           
 int hashCode()
           
 boolean isEmpty()
           
static void main(String[] args)
           
static Rdn rdnFromEscapedString(CharSequence component)
           
 String remove(int posn)
           
 int size()
           
 boolean startsWith(Name n)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleLdapName

public SimpleLdapName()

SimpleLdapName

public SimpleLdapName(String name)
               throws InvalidNameException
Throws:
InvalidNameException

SimpleLdapName

public SimpleLdapName(Rdn... components)

SimpleLdapName

public SimpleLdapName(List<Rdn> components)

SimpleLdapName

public SimpleLdapName(Name name)
               throws InvalidNameException
Throws:
InvalidNameException
Method Detail

rdnFromEscapedString

public static Rdn rdnFromEscapedString(CharSequence component)
                                throws InvalidNameException
Throws:
InvalidNameException

add

public Name add(Rdn rdn)

add

public Name add(String comp)
         throws InvalidNameException
Specified by:
add in interface Name
Throws:
InvalidNameException

add

public Name add(int posn,
                Rdn comp)

add

public Name add(int posn,
                String comp)
         throws InvalidNameException
Specified by:
add in interface Name
Throws:
InvalidNameException

addAll

public Name addAll(int posn,
                   Name n)
            throws InvalidNameException
Specified by:
addAll in interface Name
Throws:
InvalidNameException

addAll

public Name addAll(Name suffix)
            throws InvalidNameException
Specified by:
addAll in interface Name
Throws:
InvalidNameException

clone

public SimpleLdapName clone()
Specified by:
clone in interface Name
Overrides:
clone in class Object

compareTo

public int compareTo(Object obj)
Specified by:
compareTo in interface Comparable<Object>
Specified by:
compareTo in interface Name

endsWith

public boolean endsWith(Name n)
Specified by:
endsWith in interface Name

getRdn

public Rdn getRdn(int posn)

get

public String get(int posn)
Specified by:
get in interface Name

getAllRdns

public Iterator<Rdn> getAllRdns()

getAll

public Enumeration<String> getAll()
Specified by:
getAll in interface Name

getPrefix

public Name getPrefix(int posn)
Specified by:
getPrefix in interface Name

getSuffix

public Name getSuffix(int posn)
Specified by:
getSuffix in interface Name

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Name

remove

public String remove(int posn)
Specified by:
remove in interface Name

size

public int size()
Specified by:
size in interface Name

startsWith

public boolean startsWith(Name n)
Specified by:
startsWith in interface Name

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

main

public static void main(String[] args)
                 throws InvalidNameException
Throws:
InvalidNameException


Created 2011-07-14 13:27 EST