org.apache.directory.shared.ldap.name
Enum FastLdapDnParser

java.lang.Object
  extended by java.lang.Enum<FastLdapDnParser>
      extended by org.apache.directory.shared.ldap.name.FastLdapDnParser
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<FastLdapDnParser>, javax.naming.NameParser

public enum FastLdapDnParser
extends java.lang.Enum<FastLdapDnParser>
implements javax.naming.NameParser

A fast LDAP DN parser that handles only simple DNs. If the DN contains any special character an TooComplexException is thrown.

Version:
$Rev: 664290 $, $Date: 2008-06-07 08:28:06 +0200 (Sa, 07 Jun 2008) $
Author:
Apache Directory Project

Enum Constant Summary
INSTANCE
           
 
Method Summary
static javax.naming.NameParser getNameParser()
          Gets the name parser singleton instance.
 javax.naming.Name parse(java.lang.String name)
           
 void parseDn(java.lang.String name, LdapDN dn)
          Parses the given name string and fills the given LdapDN object.
 void parseRdn(java.lang.String name, Rdn rdn)
          Parses the given name string and fills the given Rdn object.
static FastLdapDnParser valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static FastLdapDnParser[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

INSTANCE

public static final FastLdapDnParser INSTANCE
Method Detail

values

public static FastLdapDnParser[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (FastLdapDnParser c : FastLdapDnParser.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static FastLdapDnParser valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getNameParser

public static javax.naming.NameParser getNameParser()
Gets the name parser singleton instance.

Returns:
the name parser

parse

public javax.naming.Name parse(java.lang.String name)
                        throws javax.naming.NamingException
Specified by:
parse in interface javax.naming.NameParser
Throws:
javax.naming.NamingException

parseDn

public void parseDn(java.lang.String name,
                    LdapDN dn)
             throws javax.naming.InvalidNameException
Parses the given name string and fills the given LdapDN object.

Parameters:
name - the name to parse
dn - the LdapDN to fill
Throws:
javax.naming.InvalidNameException - the invalid name exception

parseRdn

public void parseRdn(java.lang.String name,
                     Rdn rdn)
              throws javax.naming.InvalidNameException
Parses the given name string and fills the given Rdn object.

Parameters:
name - the name to parse
rdn - the RDN to fill
Throws:
javax.naming.InvalidNameException - the invalid name exception


Copyright © 2004-2009 The Apache Software Foundation. All Rights Reserved.