org.apache.directory.shared.ldap.name
Class DnParser

java.lang.Object
  extended byorg.apache.directory.shared.ldap.name.DnParser
All Implemented Interfaces:
javax.naming.NameParser

public class DnParser
extends java.lang.Object
implements javax.naming.NameParser

A distinguished name parser which generates JNDI Ldap exception on error.

See Also:
RFC 2253, RFC 1779

Constructor Summary
DnParser()
          Creates a regular non normalizing name parser.
DnParser(NameComponentNormalizer a_normalizer)
          Creates a normalizing name parser.
 
Method Summary
 boolean isNormizing()
          Tests to see if this parser is normalizing.
 javax.naming.Name parse(java.lang.String name)
          Parses a name as a String into a Name object.
 javax.naming.Name parse(java.lang.String name, LdapName emptyName)
          Parses a name as a String into an existing Name object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DnParser

public DnParser()
         throws javax.naming.NamingException
Creates a regular non normalizing name parser.

Throws:
LdapNamingException - if there is a problem creating the pipe
javax.naming.NamingException

DnParser

public DnParser(NameComponentNormalizer a_normalizer)
         throws javax.naming.NamingException
Creates a normalizing name parser.

Parameters:
a_normalizer - the name component value normaliser used
Throws:
LdapNamingException - if there is a problem creating the pipe
javax.naming.NamingException
Method Detail

isNormizing

public boolean isNormizing()
Tests to see if this parser is normalizing.

Returns:
true if it normalizes false otherwise

parse

public javax.naming.Name parse(java.lang.String name,
                               LdapName emptyName)
                        throws javax.naming.NamingException
Parses a name as a String into an existing Name object.

Parameters:
name - the distinguished name as a string.
emptyName - the empty LdapName to be populated or null.
Returns:
the populated LdapName
Throws:
javax.naming.NamingException - if a_name is invalid or the parsers plumbing breaks

parse

public javax.naming.Name parse(java.lang.String name)
                        throws javax.naming.NamingException
Parses a name as a String into a Name object.

Specified by:
parse in interface javax.naming.NameParser
Throws:
javax.naming.NamingException
See Also:
NameParser.parse(java.lang.String)


Copyright © 2003-2006 . All Rights Reserved.