com.raritantechnologies.utils.tree
Class LDAPTreeBuilder

java.lang.Object
  extended bycom.raritantechnologies.utils.tree.LDAPTreeBuilder
All Implemented Interfaces:
IConfigurable, ITreeBuilder

public class LDAPTreeBuilder
extends java.lang.Object
implements ITreeBuilder

Builds a Tree from a LDAP-compatible Directory Service.

XML Configuration Template:
  <TreeBuilder class="com.raritantechnologies.utils.tree.LDAPTreeBuilder"
                  host="[ host name of LDAP server]"
                  port="[ port of LDAP server ]"
                  baseDN="[ base distinguished name where search should begin]"
                  authUser="[ authorized user name ]"
                  authPassword="[ authorized password ]"
                  authPasswordEnc="[ authorized password encrypted ]"
                  ldapQuery="[ LDAP query to get root node ]" >

    <!-- LDAP attributes that should be retrieved by the search -->
    <LDAPFields>
       <Field ID="[ name of LDAP attribute ]" />
    </LDAPFields>
  </TreeBuilder>
 

Developed by Raritan Technologies Inc..

Author:
Ted Sullivan

Field Summary
 
Fields inherited from interface com.raritantechnologies.utils.tree.ITreeBuilder
TEMPLATE
 
Constructor Summary
LDAPTreeBuilder()
           
 
Method Summary
 TreeRoot buildTree(RaritanPageContext pContext)
           
 java.lang.String getConfigurationXML()
           
 java.lang.String getConfigurationXML(java.lang.String configurationTemplate)
           
 void getConfigurationXML(java.io.Writer writer)
           
 void initialize(org.w3c.dom.Element elem)
          Initializes the object from an XML tag or element.
static java.lang.String parseDistinguishedName(java.lang.String distinguishedName)
           
 TreeRoot refreshTree(TreeRoot theTree, RaritanPageContext pContext)
          Method to enable dynamic or refreshable trees.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LDAPTreeBuilder

public LDAPTreeBuilder()
Method Detail

buildTree

public TreeRoot buildTree(RaritanPageContext pContext)
Specified by:
buildTree in interface ITreeBuilder

refreshTree

public TreeRoot refreshTree(TreeRoot theTree,
                            RaritanPageContext pContext)
Description copied from interface: ITreeBuilder

Method to enable dynamic or refreshable trees. Static tree builders should implement this by returning the passed in tree object. Dynamic tree builders should implement this by returning the output of their buildTree( ) method or by pruning/growing the given tree as appropriate.

ITreeBuilders that support "lazy tree node evaluation" should use this method to determine which nodes in the tree need to be updated (TreeNode.needsUpdate( ) method returns true.

Specified by:
refreshTree in interface ITreeBuilder

parseDistinguishedName

public static java.lang.String parseDistinguishedName(java.lang.String distinguishedName)

initialize

public void initialize(org.w3c.dom.Element elem)
Description copied from interface: IConfigurable
Initializes the object from an XML tag or element. This method is called by the Framework as part of the application initializtion. see ConfigurationManager, XMLConfigurationManager, XMLSearchFieldMapFactory, XMLSearchSourceFactory. Configurable objects that are owned or contained by other configurable objects will be initialized in by the parent object.

Specified by:
initialize in interface IConfigurable

getConfigurationXML

public void getConfigurationXML(java.io.Writer writer)
                         throws java.io.IOException
Throws:
java.io.IOException

getConfigurationXML

public java.lang.String getConfigurationXML()

getConfigurationXML

public java.lang.String getConfigurationXML(java.lang.String configurationTemplate)