com.ibm.dse.services.ldap
Class LDAPUtility

java.lang.Object
  |
  +--com.ibm.dse.services.ldap.LDAPUtility

public final class LDAPUtility
extends java.lang.Object

This class provides useful definitions and functions for use by classes comprising the LDAP Access Service.


Field Summary
static java.lang.String ADD
           
static java.lang.String CREATE
           
static java.lang.String DESTROY
           
static java.lang.String FILTER_ATTRIBUTES
           
static java.lang.String FILTER_EXPRESSION
           
static java.lang.String FILTER_VALUE
           
static java.lang.String GET_ATTRIBUTES
           
static java.lang.String IN_ATTR_FILTER_LIST
           
static java.lang.String IN_ATTR_LIST
           
static java.lang.String IN_DYNAMIC_NAME
           
static java.lang.String IN_FILTER
           
static java.lang.String IN_FILTER_EXPRESSION
           
static java.lang.String IN_FILTER_LIST
           
static java.lang.String IN_FILTER_TYPE
           
static java.lang.String IN_MAX_HITS
           
static java.lang.String IN_MOD_CODES
           
static java.lang.String IN_MOD_LIST
           
static java.lang.String IN_OBJ_FLAG
           
static java.lang.String IN_REF_FLAG
           
static java.lang.String IN_SEARCH_SCOPE
           
static java.lang.String IN_SIMPLE_NAME
           
static java.lang.String IN_TIME_LIMIT
           
static java.lang.String IN_USE_FILTER
           
static java.lang.String LDAP_IN_CTX
           
static java.lang.String LDAP_OUT_CTX
           
static java.lang.String LIST
           
static java.lang.String LIST_BINDINGS
           
static java.lang.String LOOKUP
           
static java.lang.String MODIFY
           
static java.lang.String OUT_GET_ATTRIBUTES_RESULTS
           
static java.lang.String OUT_LDAP_DATA
           
static java.lang.String OUT_LIST_RESULTS
           
static java.lang.String OUT_LOOKUP_RESULTS
           
static java.lang.String OUT_SEARCH_RESULTS
           
static java.lang.String REMOVE
           
static java.lang.String REPLACE
           
static java.lang.String SCOPE_OBJECT
           
static java.lang.String SCOPE_ONE_LEVEL
           
static java.lang.String SCOPE_SUBTREE
           
static java.lang.String SEARCH
           
 
Constructor Summary
LDAPUtility()
          LDAPUtility constructor.
 
Method Summary
static void addQuotedTagAttributeToBuffer(java.lang.StringBuffer buffer, java.lang.String attrName, java.lang.Object attrValue, boolean addNull)
          A utility method for adding tag attributes to a string buffer.
static void addTagAttributeToBuffer(java.lang.StringBuffer buffer, java.lang.String attrName, java.lang.Object attrValue, boolean addNull)
          A utility method for adding tag attributes to a string buffer.
static java.lang.String[] buildAttributeFilterList(Context context)
          This utility method obtains pre-defined values from the supplied context and uses these values to build up a string array containing attribute names.
static javax.naming.directory.Attributes buildAttributeList(Context context)
          This utility method obtains pre-defined values from the supplied context and uses these values to build up an Attributes object.
static java.lang.Object[] buildFilterObjectList(Context context)
          This utility method obtains pre-defined values from the supplied context and uses these values to build up a object array containing objects to be used in building a dynamic filter.
static javax.naming.directory.ModificationItem[] buildModificationList(Context context)
          A utility method used to build a list of modification items from data stored in a context.
static javax.naming.directory.Attribute createAttributeFromColl(KeyedCollection coll)
          Given a keyed collection:
static LDAPRequest getRequestModelFor(java.lang.String requestType)
          Returns an appropriate request model depending on the request type supplied as argument.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LIST

public static final java.lang.String LIST

LIST_BINDINGS

public static final java.lang.String LIST_BINDINGS

LOOKUP

public static final java.lang.String LOOKUP

SEARCH

public static final java.lang.String SEARCH

CREATE

public static final java.lang.String CREATE

DESTROY

public static final java.lang.String DESTROY

MODIFY

public static final java.lang.String MODIFY

GET_ATTRIBUTES

public static final java.lang.String GET_ATTRIBUTES

SCOPE_OBJECT

public static final java.lang.String SCOPE_OBJECT

SCOPE_SUBTREE

public static final java.lang.String SCOPE_SUBTREE

SCOPE_ONE_LEVEL

public static final java.lang.String SCOPE_ONE_LEVEL

FILTER_VALUE

public static final java.lang.String FILTER_VALUE

FILTER_EXPRESSION

public static final java.lang.String FILTER_EXPRESSION

FILTER_ATTRIBUTES

public static final java.lang.String FILTER_ATTRIBUTES

ADD

public static final java.lang.String ADD

REMOVE

public static final java.lang.String REMOVE

REPLACE

public static final java.lang.String REPLACE

LDAP_IN_CTX

public static final java.lang.String LDAP_IN_CTX

LDAP_OUT_CTX

public static final java.lang.String LDAP_OUT_CTX

IN_SIMPLE_NAME

public static final java.lang.String IN_SIMPLE_NAME

IN_DYNAMIC_NAME

public static final java.lang.String IN_DYNAMIC_NAME

IN_FILTER

public static final java.lang.String IN_FILTER

IN_FILTER_EXPRESSION

public static final java.lang.String IN_FILTER_EXPRESSION

IN_FILTER_TYPE

public static final java.lang.String IN_FILTER_TYPE

IN_FILTER_LIST

public static final java.lang.String IN_FILTER_LIST

IN_MAX_HITS

public static final java.lang.String IN_MAX_HITS

IN_REF_FLAG

public static final java.lang.String IN_REF_FLAG

IN_OBJ_FLAG

public static final java.lang.String IN_OBJ_FLAG

IN_ATTR_FILTER_LIST

public static final java.lang.String IN_ATTR_FILTER_LIST

IN_SEARCH_SCOPE

public static final java.lang.String IN_SEARCH_SCOPE

IN_TIME_LIMIT

public static final java.lang.String IN_TIME_LIMIT

IN_ATTR_LIST

public static final java.lang.String IN_ATTR_LIST

IN_MOD_LIST

public static final java.lang.String IN_MOD_LIST

IN_USE_FILTER

public static final java.lang.String IN_USE_FILTER

IN_MOD_CODES

public static final java.lang.String IN_MOD_CODES

OUT_LDAP_DATA

public static final java.lang.String OUT_LDAP_DATA

OUT_LIST_RESULTS

public static final java.lang.String OUT_LIST_RESULTS

OUT_LOOKUP_RESULTS

public static final java.lang.String OUT_LOOKUP_RESULTS

OUT_GET_ATTRIBUTES_RESULTS

public static final java.lang.String OUT_GET_ATTRIBUTES_RESULTS

OUT_SEARCH_RESULTS

public static final java.lang.String OUT_SEARCH_RESULTS
Constructor Detail

LDAPUtility

public LDAPUtility()
LDAPUtility constructor.
Method Detail

addQuotedTagAttributeToBuffer

public static void addQuotedTagAttributeToBuffer(java.lang.StringBuffer buffer,
                                                 java.lang.String attrName,
                                                 java.lang.Object attrValue,
                                                 boolean addNull)
A utility method for adding tag attributes to a string buffer.
Parameters:
buffer - java.lang.StringBuffer
attrName - java.lang.String
attrValue - java.lang.Object
addNull - boolean

addTagAttributeToBuffer

public static void addTagAttributeToBuffer(java.lang.StringBuffer buffer,
                                           java.lang.String attrName,
                                           java.lang.Object attrValue,
                                           boolean addNull)
A utility method for adding tag attributes to a string buffer.
Parameters:
buffer - java.lang.StringBuffer
attrName - java.lang.String
attrValue - java.lang.Object
addNull - boolean

buildAttributeFilterList

public static java.lang.String[] buildAttributeFilterList(Context context)
                                                   throws DSEException
This utility method obtains pre-defined values from the supplied context and uses these values to build up a string array containing attribute names.
Parameters:
context - com.ibm.dse.base.Context
Returns:
java.lang.String[]
Throws:
DSEException -  

buildAttributeList

public static javax.naming.directory.Attributes buildAttributeList(Context context)
                                                            throws DSEException
This utility method obtains pre-defined values from the supplied context and uses these values to build up an Attributes object.
Parameters:
context - com.ibm.dse.base.Context
Returns:
javax.naming.directory.Attribute[]
Throws:
DSEException -  

buildFilterObjectList

public static java.lang.Object[] buildFilterObjectList(Context context)
                                                throws DSEException
This utility method obtains pre-defined values from the supplied context and uses these values to build up a object array containing objects to be used in building a dynamic filter.
Parameters:
context - com.ibm.dse.base.Context
Returns:
java.lang.Object[]
Throws:
DSEException -  

buildModificationList

public static javax.naming.directory.ModificationItem[] buildModificationList(Context context)
                                                                       throws DSEException
A utility method used to build a list of modification items from data stored in a context.
Parameters:
context - com.ibm.dse.base.Context
Returns:
javax.naming.directory.ModificationItem[]
Throws:
DSEException -  

createAttributeFromColl

public static javax.naming.directory.Attribute createAttributeFromColl(KeyedCollection coll)
                                                                throws DSEException
Given a keyed collection:
 
 		
 		
 
 
Then this method will create an attribute named telephoneNumber, with values 1-888-213-2256, and 1-212-512-2887.
Parameters:
coll - com.ibm.dse.base.KeyedCollection
Returns:
javax.naming.directory.Attribute
Throws:
DSEException -  

getRequestModelFor

public static LDAPRequest getRequestModelFor(java.lang.String requestType)
                                      throws DSEInvalidRequestException
Returns an appropriate request model depending on the request type supplied as argument. This list should be updated if new request types are defined or present request types are modified.
Parameters:
requestType - java.lang.String
Returns:
com.ibm.dse.services.ldap.LDAPRequest
Throws:
DSEInvalidRequestException -