com.ca.directory.jxplorer.broker
Class JNDIBroker

java.lang.Object
  |
  +--com.ca.directory.jxplorer.broker.Broker
        |
        +--com.ca.directory.jxplorer.broker.JNDIBroker
All Implemented Interfaces:
DataSource, java.lang.Runnable

public class JNDIBroker
extends Broker

This utility class handles all the JNDIBroker LDAP calls, returning objects to calling classes and managing the connection.

Before examining this class make sure to examing the base Broker class thoroughly. The base Broker class takes user requests, and creates DataQuery objects. A separate thread takes these DataQuery objects and uses the methods of derived classes (such as this one) to do the actual grunt work.


Nested Class Summary
 class JNDIBroker.DataConnectionQuery
          Helper class for Broker, this encapsulates an ldap-like connection request that is placed on the Broker queue for eventual resolution.
 
Field Summary
static int SEARCH_BASE_OBJECT
          Used as a parameter to unthreadedSearch, this specifies to only search the base object.
static int SEARCH_ONE_LEVEL
          Used as a parameter to unthreadedSearch, this specifies to only search the next level from the current DN.
static int SEARCH_SUB_TREE
          Used as a parameter to unthreadedSearch, this specifies to search the entire subtree from the current DN.
 
Fields inherited from class com.ca.directory.jxplorer.broker.Broker
current, id, listeners, requestQueue
 
Constructor Summary
JNDIBroker()
          Constructor does nothing except create an env object ( 'connect()' is used to open a connection)
JNDIBroker(JNDIBroker cloneMe)
          Clones a JNDIBroker, using the same underlying directory connection, but clearing the data listener list, and having its own debug flags.
 
Method Summary
 boolean addEntry(DXEntry newEntry)
          Add the new entry to the directory.
 void clearException()
          Utility method for extended queries - allows a 'masked' exception to be cleared.
 DataQuery connect(ConnectionData cData)
          Queues a request to open a connection to an LDAP (only) server.
 DataQuery connect(java.lang.String baseDN, int version, java.lang.String host, int port, java.lang.String userDN, char[] pwd, java.lang.String referralType, java.lang.String aliasType, boolean useSSL, java.lang.String cacerts, java.lang.String clientcerts, char[] caKeystorePwd, char[] clientKeystorePwd)
          Deprecated. use connect(ConnectionData) instead.
 boolean deleteTree(DN nodeDN)
          Deletes a subtree by recursively deleting sub-sub trees from the given DN.
 void disconnect()
          Disconnects from the current context, freeing both context and context environment parameters list.
 void error(java.lang.String msg, java.lang.Exception e)
          Usually shells to CBUtility.error, but will log instead if quiet mode is set.
protected  DataQuery finish(DataQuery request)
          Sets the finish flag of a request and returns the query.
 java.lang.String getActualDN(java.lang.String dn)
          This is a bit of a hack to verify the base DN.
 java.lang.String getAttributeDescription(java.lang.String attributeoid)
           
 java.lang.String getAttributeSyntax(java.lang.String attID)
          Returns the syntax of the attribute value that is supplied
 javax.naming.directory.DirContext getDirContext()
          As a way to directly access the raw jndi directory context, a DataSource MAY choose to publish the directory connection.
 CBGraphicsOps getDirOp()
           
 java.lang.Exception getException()
          Utility method for extended queries - returns whether a 'masked' exception has occured.
 java.lang.String getNewBinaryAttributes()
          Acquires a list of binary attributes, and adds them to the context environment so that they get returned as byte[] arrays.
 boolean getQuietError()
          This returns whether one or more errors occured while the program was in 'quiet gui' (i.e. no error dialogs) mode.
protected  javax.naming.NamingEnumeration getRawSchemaChildren(DN nodeDN)
          Does the raw directory call to get a schema list
 javax.naming.directory.DirContext getSchema()
          Displays whether schema access is enabled.
 DXNamingEnumeration getSchemaChildren(DN nodeDN)
          JNDI represents schema as a dit tree.
 javax.naming.directory.DirContext getSchemaContext()
           
 javax.naming.directory.Attributes getSchemaData(DN nodeDN, java.lang.String[] returnAttributes)
          JNDI represents schema as a dit tree.
 java.lang.String getSchemaRoot()
          returns the root DN of the schema subentry as a string.
 int getVersion()
          This returns the version of ldap currently in use.
 boolean hasConnectionError()
          whether the data source is currently on-line.
protected  boolean hasVerboseObjectClass(javax.naming.directory.Attributes atts)
          Checks if any of the objectClasses of this object are on the list of special objects that require all attributes to be sent in a 'replace' list, whether or not they have been modified by the user.
protected  void initAttributeNamesHash()
          The attributeNames hash provides a quick look up mapping between numericoids and attribute names.
protected  void initSpecialObjectClasses()
          Mitch/OS390 hack
 boolean isActive()
          whether the data source is currently on-line.
 boolean isModifiable()
          Checks whether the current data source is modifiable.
protected  int loadMods(javax.naming.directory.ModificationItem[] mods, javax.naming.NamingEnumeration atts, int TYPE, int index)
          Utility ftn for updateNode - takes a list of attributes to modify, and the type of modification, and adds them to an array of modifications (starting at a particular index).
 void modifyAttributes(DN dn, javax.naming.directory.ModificationItem[] mods)
          Modifies the attributes associated with a named object using an an ordered list of modifications.
 boolean moveTree(DN oldNodeDN, DN newNodeDN)
          Moves a DN to a new DN, including all subordinate entries.
 java.util.Vector objectClasses()
          Gets a list of all known schema object classes.
protected  DataQuery openConnection(JNDIBroker.DataConnectionQuery request)
          Does the actual grunt work of opening a new connection.
 void printContextList(javax.naming.Context C, DN dn, java.lang.String message)
          Used for debugging; prints out the first level of a dn from a particular context, headlined with with the supplied message.
 boolean processQueue()
          process all queue requests
protected  void processRequest(DataQuery request)
          Extends the base class processRequest method to handle DataConnectionRequest objects.
 javax.naming.directory.Attributes read(DN dn)
          Reads all the attribute type and values for the given entry.
 DN[] readFallbackRoot()
          If the rootDN doesn't exist, we try to read the the root DN from the server.
 void registerDirectoryConnection(JNDIBroker cloneMe)
          Resets a JNDIBroker, using the same underlying directory connection as the passed broker, but clearing the data listener list, and resetting debug flags.
 void SetContextToBrowsingAliases()
          This sets the context to use either jndi 'browsing' or 'never' alias resolution, depending on the value of the jxplorer property option.ldap.browseAliasBehaviour.
 void SetContextToSearchingAliases()
          This sets the context to use either jndi 'searching' or 'never' alias resolution, depending on the value of the jxplorer property option.ldap.searchAliasBehaviour.
 void setGUIQuiet(boolean status)
          Suppresses user notification of errors via GUI dialogs, and logs them instead.
 void setLimit(int maxResponses)
          Sets the maximum number of objects returned by a search
 void setQuietError(boolean status)
          Sets the quiet error flag status.
 void setTimeout(int maxTime)
          Sets the timeout period before the connection gives up trying to fetch a given data request.
 void setTracing(boolean traceStatus)
          Sets ber tracing status.
 boolean unthreadedCopy(DN oldNodeDN, DN newNodeDN)
          Copies a DN representing a subtree to a new subtree, including copying all subordinate entries.
 boolean unthreadedExists(DN checkMe)
          Checks the existance of a given entry.
 java.util.Vector unthreadedGetAllOCs()
          Returns a complete list of all known object classes.
 java.util.Vector unthreadedGetRecOCs(DN dn)
          Gets a list of the object classes most likely to be used for the next Level of the DN...
 DXNamingEnumeration unthreadedList(DN searchbase)
          returns the next level of a directory tree, returning a Enumeration of the results
 boolean unthreadedModify(DXEntry oldEntry, DXEntry newEntry)
          Update an entry with the designated DN.
 DXEntry unthreadedReadEntry(DN entryDN, java.lang.String[] returnAttributes)
          Reads an entry with all its attributes from the directory.
 DXNamingEnumeration unthreadedSearch(DN dn, java.lang.String filter, int search_level, java.lang.String[] returnAttributes)
          Performs a directory search.
protected  boolean useSpecialWriteAllAttsMode()
          Optional debug code.
 
Methods inherited from class com.ca.directory.jxplorer.broker.Broker
addDataListener, copyTree, doCopyQuery, doEntryQuery, doExistsQuery, doExtendedQuery, doGetAllOCsQuery, doGetRecOCsQuery, doListQuery, doModifyQuery, doSearchQuery, exists, extendedRequest, getBroker, getChildren, getCurrent, getEntry, getObjectClasses, getRecommendedObjectClasses, getRequestQueue, hasRequests, modifyEntry, pop, push, registerStopMonitor, removeDataListener, removeQuery, run, search
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SEARCH_BASE_OBJECT

public static final int SEARCH_BASE_OBJECT
Used as a parameter to unthreadedSearch, this specifies to only search the base object.

See Also:
Constant Field Values

SEARCH_ONE_LEVEL

public static final int SEARCH_ONE_LEVEL
Used as a parameter to unthreadedSearch, this specifies to only search the next level from the current DN.

See Also:
Constant Field Values

SEARCH_SUB_TREE

public static final int SEARCH_SUB_TREE
Used as a parameter to unthreadedSearch, this specifies to search the entire subtree from the current DN.

See Also:
Constant Field Values
Constructor Detail

JNDIBroker

public JNDIBroker()
Constructor does nothing except create an env object ( 'connect()' is used to open a connection)


JNDIBroker

public JNDIBroker(JNDIBroker cloneMe)
Clones a JNDIBroker, using the same underlying directory connection, but clearing the data listener list, and having its own debug flags. Any StopMonitors however will need to be re-registered with the new Broker.

Parameters:
cloneMe -
Method Detail

registerDirectoryConnection

public void registerDirectoryConnection(JNDIBroker cloneMe)
Resets a JNDIBroker, using the same underlying directory connection as the passed broker, but clearing the data listener list, and resetting debug flags. Any StopMonitors however will need to be re-registered.

Parameters:
cloneMe -

initSpecialObjectClasses

protected void initSpecialObjectClasses()
Mitch/OS390 hack


setGUIQuiet

public void setGUIQuiet(boolean status)
Suppresses user notification of errors via GUI dialogs, and logs them instead. Necessary for large batch ops. like importing an ldif file.

Parameters:
status -

setQuietError

public void setQuietError(boolean status)
Sets the quiet error flag status.

Parameters:
status -

getQuietError

public boolean getQuietError()
This returns whether one or more errors occured while the program was in 'quiet gui' (i.e. no error dialogs) mode. It does not return the actual error, since frequently there were many: the user should consult the log file.

Returns:

getSchema

public javax.naming.directory.DirContext getSchema()
Displays whether schema access is enabled.

Specified by:
getSchema in interface DataSource
Specified by:
getSchema in class Broker
Returns:
schema context, or null if no context.

setTracing

public void setTracing(boolean traceStatus)
Sets ber tracing status. Set to true this generates a huge amount of comms. tracing info, when the next connection is opened. It doesn't seem possible to set it for an already open connection, so we no longer even try.

Parameters:
traceStatus -

connect

public DataQuery connect(java.lang.String baseDN,
                         int version,
                         java.lang.String host,
                         int port,
                         java.lang.String userDN,
                         char[] pwd,
                         java.lang.String referralType,
                         java.lang.String aliasType,
                         boolean useSSL,
                         java.lang.String cacerts,
                         java.lang.String clientcerts,
                         char[] caKeystorePwd,
                         char[] clientKeystorePwd)
Deprecated. use connect(ConnectionData) instead.

Queues a request to open a connection to an LDAP (only) server.

Note that some rarely modified connection status variables are set externally - e.g. BER tracing status (derived from the log level, set by setTracing() ), and the security keystore type and external security provider (if any) which are set in the config file).

Parameters:
baseDN - the base DN from which to browse.
version - the LDAP Version (2 or 3) being used.
host - the LDAP server url.
port - the LDAP server port (default 389) being used.
userDN - the Manager User's DN - (is null if user is not manager)
pwd - the Manager User's password - (is null if user is not manager)
referralType - the jndi ldap referral type: [follow:ignore:throw]
aliasType - how aliases are handled: 'always'|'never'|'finding'|'searching'
useSSL - whether to use SSL for encryption and/or authentication (dependant on other parameters)
cacerts - path to a store of trusted server certificates or CA certificates - required for Server-auth ssl
clientcerts - path to client certificates - if available, will use for client authentication
caKeystorePwd - the password to the client's keystore (may be null for non-client authenticated ssl).
clientKeystorePwd - the password to the client certificates - required to use client certs for authentication
Returns:
returns the thread that is used to make the connection

connect

public DataQuery connect(ConnectionData cData)

Queues a request to open a connection to an LDAP (only) server.

Note that some rarely modified connection status variables are set externally - e.g. BER tracing status (derived from the log level, set by setTracing() ), and the security keystore type and external security provider (if any) which are set in the config file).

Parameters:
cData - data object containing all the connection information.
Returns:
returns the thread that is used to make the connection

processRequest

protected void processRequest(DataQuery request)
Extends the base class processRequest method to handle DataConnectionRequest objects.

Overrides:
processRequest in class Broker
Parameters:
request - the connection data query.

openConnection

protected DataQuery openConnection(JNDIBroker.DataConnectionQuery request)
Does the actual grunt work of opening a new connection.

Parameters:
request - a DataQuery object that contains the connection details.
Returns:
the data query object.

getActualDN

public java.lang.String getActualDN(java.lang.String dn)
This is a bit of a hack to verify the base DN. It basically takes a DN and does a base object search and returns the DN of the results. This method is needed as a bit of a hack for when the the user puts in a base DN that is of a different case to what is stored in the dsa. If this happens the tree remembers the wrong DN and throws some errors when the user tries to modify the base DN entry (bug 2363). However, currently (20 June 02) the dsa gives the DN back the way it was put in. I've assigned the bug to them to fix...

Parameters:
dn - the DN to verify (or do the base object search on).
Returns:
the DN that the search returns (one day this will be what is actually stored in the dsa). If there is an exception thrown, the DN will be returned unchanged.

initAttributeNamesHash

protected void initAttributeNamesHash()
The attributeNames hash provides a quick look up mapping between numericoids and attribute names. This initialises that hashtable.


getAttributeDescription

public java.lang.String getAttributeDescription(java.lang.String attributeoid)
Parameters:
attributeoid - the attributes OID.
Returns:
the attribute description. If attributeNames is null "(schema not correctly read)" is returned, if attributeNames are still null after trying to get the description "(attribute not listed in schema)" is returned.

getNewBinaryAttributes

public java.lang.String getNewBinaryAttributes()
Acquires a list of binary attributes, and adds them to the context environment so that they get returned as byte[] arrays.

Returns:
a space separated list of attribute names.

getVersion

public int getVersion()
This returns the version of ldap currently in use.

Returns:
current ldap version ('2' or '3')

printContextList

public void printContextList(javax.naming.Context C,
                             DN dn,
                             java.lang.String message)
Used for debugging; prints out the first level of a dn from a particular context, headlined with with the supplied message.

Parameters:
C - the context to print out info for.
dn - the DN to print the children of.
message - text to print out along with the context data.

disconnect

public void disconnect()
Disconnects from the current context, freeing both context and context environment parameters list.


setLimit

public void setLimit(int maxResponses)
Sets the maximum number of objects returned by a search

Parameters:
maxResponses - the maximum returned objects

setTimeout

public void setTimeout(int maxTime)
Sets the timeout period before the connection gives up trying to fetch a given data request.

Parameters:
maxTime - the maximum time allowed for a query.

unthreadedList

public DXNamingEnumeration unthreadedList(DN searchbase)
returns the next level of a directory tree, returning a Enumeration of the results

Specified by:
unthreadedList in class Broker
Returns:
list of results (NameClassPair); the next layer of the tree...

unthreadedSearch

public DXNamingEnumeration unthreadedSearch(DN dn,
                                            java.lang.String filter,
                                            int search_level,
                                            java.lang.String[] returnAttributes)
Performs a directory search.

Specified by:
unthreadedSearch in class Broker
Parameters:
dn - the DN (relative to initial context in ldap) to seach from.
filter - the non-null filter to use for the search
search_level - whether to search the base object, the next level or the whole subtree.
returnAttributes - - a list of attributes to return. If set to null, only the objectClass is returned.
Returns:
list of results ('SearchResult's); the next layer of the tree...

read

public javax.naming.directory.Attributes read(DN dn)
Reads all the attribute type and values for the given entry. Converts utf-8 to unicode if necessary.

Parameters:
dn - the ldap string distinguished name of entry to be read
Returns:
an 'Attributes' object containing a list of all Attribute objects.

deleteTree

public boolean deleteTree(DN nodeDN)
Deletes a subtree by recursively deleting sub-sub trees from the given DN.

Parameters:
nodeDN - the DN of the node where to do the recursive delete.
Returns:
the status of the delete.

moveTree

public boolean moveTree(DN oldNodeDN,
                        DN newNodeDN)
Moves a DN to a new DN, including all subordinate entries. (nb it is up to the implementer how this is done; e.g. if it is an ldap broker, it may choose rename, or copy-and-delete, as appropriate)

Parameters:
newNodeDN - the target DN for the tree to be moved to.
Returns:
the operation's success status

unthreadedCopy

public boolean unthreadedCopy(DN oldNodeDN,
                              DN newNodeDN)
Copies a DN representing a subtree to a new subtree, including copying all subordinate entries.

Specified by:
unthreadedCopy in class Broker
Parameters:
oldNodeDN - the original DN of the sub tree root to be copied (may be a single entry).
newNodeDN - the target DN for the tree to be moved to.
Returns:
the operation's success status

unthreadedExists

public boolean unthreadedExists(DN checkMe)
Checks the existance of a given entry.

Specified by:
unthreadedExists in class Broker
Parameters:
checkMe - the DN of the entry to check for existance.
Returns:
whether the entry could be found in the directory.

processQueue

public boolean processQueue()
Description copied from class: Broker
process all queue requests

Overrides:
processQueue in class Broker
Returns:

getException

public java.lang.Exception getException()
Utility method for extended queries - returns whether a 'masked' exception has occured.

Overrides:
getException in class Broker
Returns:
the exception, or null if there is none.

clearException

public void clearException()
Utility method for extended queries - allows a 'masked' exception to be cleared.

Overrides:
clearException in class Broker

finish

protected DataQuery finish(DataQuery request)
Description copied from class: Broker
Sets the finish flag of a request and returns the query. Often overloaded by derived broker classes.

Overrides:
finish in class Broker
Parameters:
request -
Returns:
the query.

unthreadedGetAllOCs

public java.util.Vector unthreadedGetAllOCs()
Returns a complete list of all known object classes.

Specified by:
unthreadedGetAllOCs in class Broker
Returns:
a complete list of all known object classes.

isActive

public boolean isActive()
whether the data source is currently on-line.

Specified by:
isActive in interface DataSource
Specified by:
isActive in class Broker
Returns:
on-line status

hasConnectionError

public boolean hasConnectionError()
whether the data source is currently on-line.

Returns:
on-line status

unthreadedReadEntry

public DXEntry unthreadedReadEntry(DN entryDN,
                                   java.lang.String[] returnAttributes)
Reads an entry with all its attributes from the directory.

Specified by:
unthreadedReadEntry in class Broker
Parameters:
entryDN - the DN of the entry.
returnAttributes - a list of string names of attributes to return in the search. (null means 'return all entries', a zero length array means 'return no attributes'.)
Returns:
the entry.

addEntry

public boolean addEntry(DXEntry newEntry)
Add the new entry to the directory.

Parameters:
newEntry - the new entry containing the replacement set of attributes.
Returns:
the operation's success status

loadMods

protected int loadMods(javax.naming.directory.ModificationItem[] mods,
                       javax.naming.NamingEnumeration atts,
                       int TYPE,
                       int index)
                throws javax.naming.NamingException
Utility ftn for updateNode - takes a list of attributes to modify, and the type of modification, and adds them to an array of modifications (starting at a particular index).

Parameters:
mods - the array of modification items
atts - an enumeration of attributes to add to the mod array
TYPE - the type of modification (DELETE,REPLACE,ADD)
index - the position in the modification array to start filling entries in
javax.naming.NamingException

unthreadedModify

public boolean unthreadedModify(DXEntry oldEntry,
                                DXEntry newEntry)
Update an entry with the designated DN.

Specified by:
unthreadedModify in class Broker
Parameters:
oldEntry - the old entry containing teh old set of attributes.
newEntry - the new entry containing the replacement set of attributes.
Returns:
the operation's success status.

useSpecialWriteAllAttsMode

protected boolean useSpecialWriteAllAttsMode()
Optional debug code. Very useful. NEVER REMOVE!!!


hasVerboseObjectClass

protected boolean hasVerboseObjectClass(javax.naming.directory.Attributes atts)
Checks if any of the objectClasses of this object are on the list of special objects that require all attributes to be sent in a 'replace' list, whether or not they have been modified by the user. (by request of Mitch Rozonkiewiecz and the OS390 security people...)

Parameters:
atts - the list of attributes.

isModifiable

public boolean isModifiable()
Checks whether the current data source is modifiable. (Nb., a directory may have different access controls defined on different parts of the directory: if this is the case, the directory may return true to isModifiable(), however a particular modify attempt may still fail.

Specified by:
isModifiable in interface DataSource
Specified by:
isModifiable in class Broker
Returns:
whether the directory is modifiable

getSchemaRoot

public java.lang.String getSchemaRoot()
returns the root DN of the schema subentry as a string.

Returns:
the schema subentry (i.e. something like 'cn=schema')

getAttributeSyntax

public java.lang.String getAttributeSyntax(java.lang.String attID)
Returns the syntax of the attribute value that is supplied

Parameters:
attID - the attribute value for example 'Fred' from 'cn=Fred'.
Returns:
the syntax of the attribute for example for postalAddress the return string would be: 'SYNTAX: 1.3.6.1.4.1.1466.115.121.1.41'.

getSchemaChildren

public DXNamingEnumeration getSchemaChildren(DN nodeDN)
JNDI represents schema as a dit tree. This allows that tree to be traversed in the same way as getChildren.

Parameters:
nodeDN - the DN from where to do the list.
Returns:
an enumeration of NameClassPairs representing available schema
See Also:
Broker.getChildren(com.ca.commons.naming.DN)

getRawSchemaChildren

protected javax.naming.NamingEnumeration getRawSchemaChildren(DN nodeDN)
Does the raw directory call to get a schema list. - massages the data to get user friendly names...

Parameters:
nodeDN - the DN from where to do the list.
Returns:
an enumeration of NameClassPairs representing available schema

getSchemaContext

public javax.naming.directory.DirContext getSchemaContext()
Returns:
the schema context.

getSchemaData

public javax.naming.directory.Attributes getSchemaData(DN nodeDN,
                                                       java.lang.String[] returnAttributes)
JNDI represents schema as a dit tree. This allows that tree to be read in the same way as unthreadedGetEntry.

Parameters:
nodeDN - the DN to read from.
returnAttributes - a vector of string names of attributes to return in the search. (null means 'return all entries', a zero length array means 'return no attributes'.)
Returns:
an Attributes object containing known data about this schema DN.
See Also:
com.ca.directory.jxplorer.broker.JNDIBroker#unthreadedGetEntry.

objectClasses

public java.util.Vector objectClasses()
Gets a list of all known schema object classes.

Returns:
all known object classes, as . This will be null if this data source does not support this feature.

unthreadedGetRecOCs

public java.util.Vector unthreadedGetRecOCs(DN dn)
Gets a list of the object classes most likely to be used for the next Level of the DN...

Specified by:
unthreadedGetRecOCs in class Broker
Parameters:
dn - the dn of the parent to determine likely child object classes for
Returns:
list of recommended object classes...

modifyAttributes

public void modifyAttributes(DN dn,
                             javax.naming.directory.ModificationItem[] mods)
                      throws javax.naming.directory.AttributeModificationException,
                             javax.naming.NamingException
Modifies the attributes associated with a named object using an an ordered list of modifications.

Parameters:
dn - distinguished name of object to modify
mods - an ordered sequence of modifications to be performed; may not be null
javax.naming.directory.AttributeModificationException
javax.naming.NamingException

error

public void error(java.lang.String msg,
                  java.lang.Exception e)
Usually shells to CBUtility.error, but will log instead if quiet mode is set.

Parameters:
msg - the error message to display.
e - the exception caused.

getDirOp

public CBGraphicsOps getDirOp()
Returns:
the directory operations object.

getDirContext

public javax.naming.directory.DirContext getDirContext()
Description copied from interface: DataSource
As a way to directly access the raw jndi directory context, a DataSource MAY choose to publish the directory connection.

Specified by:
getDirContext in interface DataSource
Specified by:
getDirContext in class Broker
Returns:
the directory operations context.

readFallbackRoot

public DN[] readFallbackRoot()
If the rootDN doesn't exist, we try to read the the root DN from the server. Not all servers support this functionality, but some include a namingcontexts attribute for their empty entry...

Returns:
the rootDN, or null if none was found.

SetContextToSearchingAliases

public void SetContextToSearchingAliases()
This sets the context to use either jndi 'searching' or 'never' alias resolution, depending on the value of the jxplorer property option.ldap.searchAliasBehaviour.


SetContextToBrowsingAliases

public void SetContextToBrowsingAliases()
This sets the context to use either jndi 'browsing' or 'never' alias resolution, depending on the value of the jxplorer property option.ldap.browseAliasBehaviour.