wt.federation.PrincipalManager
Class DirContext

java.lang.Object
  extended bywt.federation.PrincipalManager.DirContext

public class DirContext
extends Object


Nested Class Summary
(package private)  class DirContext.AdapterInfo
           
 
Field Summary
private static Vector adapterNames
           
private static String defaultJNDIAdapter
           
private static String LOCK
           
private static HashMap mapByName
           
private static HashMap mapBySearchBase
           
private static boolean VERBOSE
           
private static WTProperties wtproperties
           
 
Constructor Summary
private DirContext()
           
 
Method Summary
static String getDefaultJNDIAdapter()
           
static String getDisplayName(String adapterName)
           
static String getDn(String adapterName)
           
static String getDomain(String adapterName)
           
static String getJNDIAdapterForDN(String dn)
           
static String getJNDIAdapterForDomain(String domain)
           
static String getJNDIAdapterName(String searchBase)
           
static Enumeration getJNDIAdapterNames()
           
static String getJNDIAdapterOfDN(String dn)
           
static String getJNDIAdapterSearchBase(String adapterName)
           
static String getJNDIAdapterSearchScope(String adapterName)
           
static String getMapping(String adapterName, String key)
          Returns the adapter-specific value for a mapping property key.
static String getMapping(String adapterName, String key, String defaultValue)
          Returns the adapter-specific value for a mapping property key.
static String[] getMappings(String adapterName, String[] keys, String[] defaultValues)
          Returns the adapter-specific values for elements of a specific set of mapping property keys.
static String getPrimaryName(String adapterName)
           
static Enumeration getPrincipalSearchBases()
           
private static void init()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOCK

private static String LOCK

VERBOSE

private static boolean VERBOSE

defaultJNDIAdapter

private static String defaultJNDIAdapter

wtproperties

private static WTProperties wtproperties

adapterNames

private static Vector adapterNames

mapByName

private static HashMap mapByName

mapBySearchBase

private static HashMap mapBySearchBase
Constructor Detail

DirContext

private DirContext()
Method Detail

getPrincipalSearchBases

public static Enumeration getPrincipalSearchBases()
                                           throws IEException
Throws:
IEException

getJNDIAdapterNames

public static Enumeration getJNDIAdapterNames()
                                       throws IEException
Throws:
IEException

init

private static void init()
                  throws IOException,
                         IEException
Throws:
IOException
IEException

getPrimaryName

public static String getPrimaryName(String adapterName)
                             throws IOException,
                                    IEException
Throws:
IOException
IEException

getDn

public static String getDn(String adapterName)
                    throws IOException,
                           IEException
Throws:
IOException
IEException

getDisplayName

public static String getDisplayName(String adapterName)
                             throws IOException,
                                    IEException
Throws:
IOException
IEException

getDomain

public static String getDomain(String adapterName)
                        throws IOException,
                               IEException
Throws:
IOException
IEException

getMapping

public static String getMapping(String adapterName,
                                String key)
                         throws IOException,
                                IEException
Returns the adapter-specific value for a mapping property key.

Parameters:
adapterName - The adapter for which to obtain a mapping property.
key - The property key, usually of the form "user.xxxx", "group.xxxx", or "org.xxxx".
Returns:
The mapping defined for the key. If no mapping is defined, a default is derived from the key itself. For example, if the key is "user.xxxx", then the default mapping for this key is "xxxx".
Throws:
IOException
IEException

getMapping

public static String getMapping(String adapterName,
                                String key,
                                String defaultValue)
                         throws IOException,
                                IEException
Returns the adapter-specific value for a mapping property key.

Parameters:
adapterName - The adapter for which to obtain a mapping property.
key - The property key, usually of the form "user.xxxx", "group.xxxx", or "org.xxxx"
defaultValue - The value to return if no explicit mapping is defined.
Returns:
The mapping defined for the key. If no mapping is defined, the specified default value is returned.
Throws:
IOException
IEException

getMappings

public static String[] getMappings(String adapterName,
                                   String[] keys,
                                   String[] defaultValues)
                            throws IOException,
                                   IEException
Returns the adapter-specific values for elements of a specific set of mapping property keys.

Parameters:
adapterName - The adapter for which to obtain mapping properties.
keys - The property keys, each usually of the form "user.xxxx", "group.xxxx", or "org.xxxx".
defaultValues - The values to return for keys for which no explicit mappings are defined.
Returns:
The mappings defined for the keys.
Throws:
IOException
IEException

getDefaultJNDIAdapter

public static String getDefaultJNDIAdapter()
                                    throws IOException,
                                           IEException
Throws:
IOException
IEException

getJNDIAdapterName

public static String getJNDIAdapterName(String searchBase)
                                 throws IEException,
                                        IOException
Throws:
IEException
IOException

getJNDIAdapterForDN

public static String getJNDIAdapterForDN(String dn)
                                  throws IEException,
                                         IOException
Throws:
IEException
IOException

getJNDIAdapterForDomain

public static String getJNDIAdapterForDomain(String domain)
                                      throws IEException,
                                             IOException
Throws:
IEException
IOException

getJNDIAdapterOfDN

public static String getJNDIAdapterOfDN(String dn)
                                 throws IEException,
                                        IOException
Throws:
IEException
IOException

getJNDIAdapterSearchBase

public static String getJNDIAdapterSearchBase(String adapterName)
                                       throws IEException,
                                              IOException
Throws:
IEException
IOException

getJNDIAdapterSearchScope

public static String getJNDIAdapterSearchScope(String adapterName)
                                        throws IEException,
                                               IOException
Throws:
IEException
IOException