Class JndiUtils
- java.lang.Object
-
- org.apache.directory.api.ldap.util.JndiUtils
-
public final class JndiUtils extends Object
An utility class to convert back and forth JNDI classes to ADS classes.- Author:
- Apache Directory Project
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static ControlfromJndiRequestControl(LdapApiService codec, Control jndiControl)Deprecated.We don't use JNDI anymorestatic Control[]fromJndiRequestControls(LdapApiService codec, Control... jndiControls)Deprecated.We don't use JNDI anymorestatic ControlfromJndiResponseControl(LdapApiService codec, Control jndiControl)Deprecated.We don't use JNDI anymorestatic DnfromName(Name name)Convert aNameto a Dnstatic ControltoJndiControl(LdapApiService codec, Control control)Deprecated.We don't use JNDI anymorestatic Control[]toJndiControls(LdapApiService codec, Control... controls)Deprecated.We don't use JNDI anymorestatic NametoName(Dn dn)Convert a Dn to aNamestatic voidwrap(Throwable t)Wraps a LDAP exception into a NaingException
-
-
-
Method Detail
-
toJndiControl
@Deprecated public static Control toJndiControl(LdapApiService codec, Control control) throws EncoderException
Deprecated.We don't use JNDI anymoreConvert a LDAP API control to a JNDI control- Parameters:
codec- The LDAP API service to usecontrol- The control to convert- Returns:
- A JNDI control
- Throws:
EncoderException- If the conversion failed
-
toJndiControls
@Deprecated public static Control[] toJndiControls(LdapApiService codec, Control... controls) throws EncoderException
Deprecated.We don't use JNDI anymoreConvert some LDAP API controls to JNDI controls- Parameters:
codec- The LDAP API service to usecontrols- The controls to convert- Returns:
- Array of JNDI control
- Throws:
EncoderException- If the conversion failed
-
fromJndiRequestControl
@Deprecated public static Control fromJndiRequestControl(LdapApiService codec, Control jndiControl) throws DecoderException
Deprecated.We don't use JNDI anymoreConvert a JNDI request control to a LDAP API control- Parameters:
codec- The LDAP API service to usejndiControl- The control to convert- Returns:
- A LDAP API request control
- Throws:
DecoderException- If the conversion failed
-
fromJndiResponseControl
@Deprecated public static Control fromJndiResponseControl(LdapApiService codec, Control jndiControl) throws DecoderException
Deprecated.We don't use JNDI anymoreConvert a JNDI response control to a LDAP API control- Parameters:
codec- The LDAP API service to usejndiControl- The control to convert- Returns:
- A LDAP API response control
- Throws:
DecoderException- If the conversion failed
-
fromJndiRequestControls
@Deprecated public static Control[] fromJndiRequestControls(LdapApiService codec, Control... jndiControls) throws DecoderException
Deprecated.We don't use JNDI anymoreConvert some JNDI controls to LDAP API controls- Parameters:
codec- The LDAP API service to usejndiControls- The controls to convert- Returns:
- An array of LDAP API control
- Throws:
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(Dn dn)
Convert a Dn to aName- Parameters:
dn- The Dn to convert- Returns:
- A Name
-
-