Class JndiUtils


  • public final class JndiUtils
    extends Object
    An utility class to convert back and forth JNDI classes to ADS classes.
    Author:
    Apache Directory Project
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private JndiUtils()
      Private constructor.
    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static org.apache.directory.api.ldap.model.message.Control fromJndiRequestControl​(org.apache.directory.api.ldap.codec.api.LdapApiService codec, Control jndiControl)
      Deprecated.
      We don't use JNDI anymore
      static org.apache.directory.api.ldap.model.message.Control[] fromJndiRequestControls​(org.apache.directory.api.ldap.codec.api.LdapApiService codec, Control... jndiControls)
      Deprecated.
      We don't use JNDI anymore
      static org.apache.directory.api.ldap.model.message.Control fromJndiResponseControl​(org.apache.directory.api.ldap.codec.api.LdapApiService codec, Control jndiControl)
      Deprecated.
      We don't use JNDI anymore
      static org.apache.directory.api.ldap.model.name.Dn fromName​(Name name)
      Convert a Name to a Dn
      static Control toJndiControl​(org.apache.directory.api.ldap.codec.api.LdapApiService codec, org.apache.directory.api.ldap.model.message.Control control)
      Deprecated.
      We don't use JNDI anymore
      static Control[] toJndiControls​(org.apache.directory.api.ldap.codec.api.LdapApiService codec, org.apache.directory.api.ldap.model.message.Control... controls)
      Deprecated.
      We don't use JNDI anymore
      static Name toName​(org.apache.directory.api.ldap.model.name.Dn dn)
      Convert a Dn to a Name
      static void wrap​(Throwable t)
      Wraps a LDAP exception into a NaingException
    • Constructor Detail

      • JndiUtils

        private JndiUtils()
        Private constructor.
    • Method Detail

      • toJndiControl

        @Deprecated
        public static Control toJndiControl​(org.apache.directory.api.ldap.codec.api.LdapApiService codec,
                                            org.apache.directory.api.ldap.model.message.Control control)
                                     throws org.apache.directory.api.asn1.EncoderException
        Deprecated.
        We don't use JNDI anymore
        Convert a LDAP API control to a JNDI control
        Parameters:
        codec - The LDAP API service to use
        control - The control to convert
        Returns:
        A JNDI control
        Throws:
        org.apache.directory.api.asn1.EncoderException - If the conversion failed
      • toJndiControls

        @Deprecated
        public static Control[] toJndiControls​(org.apache.directory.api.ldap.codec.api.LdapApiService codec,
                                               org.apache.directory.api.ldap.model.message.Control... controls)
                                        throws org.apache.directory.api.asn1.EncoderException
        Deprecated.
        We don't use JNDI anymore
        Convert some LDAP API controls to JNDI controls
        Parameters:
        codec - The LDAP API service to use
        controls - The controls to convert
        Returns:
        Array of JNDI control
        Throws:
        org.apache.directory.api.asn1.EncoderException - If the conversion failed
      • fromJndiRequestControl

        @Deprecated
        public static org.apache.directory.api.ldap.model.message.Control fromJndiRequestControl​(org.apache.directory.api.ldap.codec.api.LdapApiService codec,
                                                                                                 Control jndiControl)
                                                                                          throws org.apache.directory.api.asn1.DecoderException
        Deprecated.
        We don't use JNDI anymore
        Convert a JNDI request control to a LDAP API control
        Parameters:
        codec - The LDAP API service to use
        jndiControl - The control to convert
        Returns:
        A LDAP API request control
        Throws:
        org.apache.directory.api.asn1.DecoderException - If the conversion failed
      • fromJndiResponseControl

        @Deprecated
        public static org.apache.directory.api.ldap.model.message.Control fromJndiResponseControl​(org.apache.directory.api.ldap.codec.api.LdapApiService codec,
                                                                                                  Control jndiControl)
                                                                                           throws org.apache.directory.api.asn1.DecoderException
        Deprecated.
        We don't use JNDI anymore
        Convert a JNDI response control to a LDAP API control
        Parameters:
        codec - The LDAP API service to use
        jndiControl - The control to convert
        Returns:
        A LDAP API response control
        Throws:
        org.apache.directory.api.asn1.DecoderException - If the conversion failed
      • fromJndiRequestControls

        @Deprecated
        public static org.apache.directory.api.ldap.model.message.Control[] fromJndiRequestControls​(org.apache.directory.api.ldap.codec.api.LdapApiService codec,
                                                                                                    Control... jndiControls)
                                                                                             throws org.apache.directory.api.asn1.DecoderException
        Deprecated.
        We don't use JNDI anymore
        Convert some JNDI controls to LDAP API controls
        Parameters:
        codec - The LDAP API service to use
        jndiControls - The controls to convert
        Returns:
        An array of LDAP API control
        Throws:
        org.apache.directory.api.asn1.DecoderException - If the conversion failed
      • wrap

        public static void wrap​(Throwable t)
                         throws NamingException
        Wraps a LDAP exception into a NaingException
        Parameters:
        t - The original exception
        Throws:
        NamingException - The wrapping JNDI exception
      • toName

        public static Name toName​(org.apache.directory.api.ldap.model.name.Dn dn)
        Convert a Dn to a Name
        Parameters:
        dn - The Dn to convert
        Returns:
        A Name
      • fromName

        public static org.apache.directory.api.ldap.model.name.Dn fromName​(Name name)
        Convert a Name to a Dn
        Parameters:
        name - The Name to convert
        Returns:
        A Dn