org.apache.directory.api.ldap.util
Class JndiUtils

java.lang.Object
  extended by 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
static Control fromJndiControl(LdapApiService codec, Control jndiControl)
           
static Control[] fromJndiControls(LdapApiService codec, Control... jndiControls)
           
static Dn fromName(Name name)
          Convert a Name to a Dn
static Control toJndiControl(LdapApiService codec, Control control)
           
static Control[] toJndiControls(LdapApiService codec, Control... controls)
           
static Name toName(Dn dn)
          Convert a Dn to a Name
static void wrap(Throwable t)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

toJndiControl

public static Control toJndiControl(LdapApiService codec,
                                    Control control)
                             throws EncoderException
Throws:
EncoderException

toJndiControls

public static Control[] toJndiControls(LdapApiService codec,
                                       Control... controls)
                                throws EncoderException
Throws:
EncoderException

fromJndiControl

public static Control fromJndiControl(LdapApiService codec,
                                      Control jndiControl)
                               throws DecoderException
Throws:
DecoderException

fromJndiControls

public static Control[] fromJndiControls(LdapApiService codec,
                                         Control... jndiControls)
                                  throws DecoderException
Throws:
DecoderException

wrap

public static void wrap(Throwable t)
                 throws NamingException
Throws:
NamingException

toName

public static Name toName(Dn dn)
Convert a Dn to a Name

Parameters:
name - The Dn to convert
Returns:
A Name

fromName

public static Dn fromName(Name name)
Convert a Name to a Dn

Parameters:
name - The Name to convert
Returns:
A Dn


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.