Class LdapNameParser

java.lang.Object
com.netscape.jndi.ldap.LdapNameParser
All Implemented Interfaces:
NameParser

class LdapNameParser extends Object implements NameParser
  • Field Details

  • Constructor Details

    • LdapNameParser

      private LdapNameParser()
  • Method Details

    • getParser

      public static LdapNameParser getParser()
    • parse

      public Name parse(String name) throws NamingException
      Specified by:
      parse in interface NameParser
      Throws:
      NamingException
    • getRDN

      static String getRDN(String dn) throws NamingException
      A convenience method for extracting RDN
      Parameters:
      dn - Ldap Distinguished name
      Returns:
      RDN for the DN
      Throws:
      NamingException
    • getAttrName

      static String getAttrName(String nameEqVal) throws NamingException
      A convenience method for extracting attribute name from name=val
      Parameters:
      nameEqVal - name=value
      Returns:
      attribute name or null if "=" not found
      Throws:
      NamingException
    • getAttrValue

      static String getAttrValue(String nameEqVal) throws NamingException
      A convenience method for extracting attribute value from name=val
      Parameters:
      nameEqVal - name=value
      Returns:
      attribute value or null if "=" not found
      Throws:
      NamingException
    • getRelativeName

      static String getRelativeName(String ctx, String entry) throws NamingException
      A convenience method for extracting relative name from the ancestor context
      Parameters:
      ctx - ancestor context distinguished name
      entry - distinguished name
      Returns:
      name relative to an ancestor context
      Throws:
      NamingException
    • getRelativeName

      static String getRelativeName(Name contextName, String entry) throws NamingException
      A convenience method for extracting relative name from the ancestor context
      Parameters:
      entry - distinguished name
      ctx - ancestor context distinguished name
      Returns:
      name relative to an ancestor context
      Throws:
      NamingException
    • main0

      public static void main0(String[] args)
      Unit test
    • main

      public static void main(String[] args)