IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.services.ldap
Class LDAPService

java.lang.Object
  extended by com.ibm.btt.base.DSENotifier
      extended by com.ibm.btt.base.Service
          extended by com.ibm.btt.services.ldap.LDAPService
All Implemented Interfaces:
Notifier, java.io.Externalizable, java.io.Serializable

@ATTR(value={"factory#String#REQUIRED","providerUrl#String#REQUIRED","authMethod#String#IMPLIED","authPrincipal#String#IMPLIED","authCredentials#String#IMPLIED","searchRoot#String#IMPLIED"})
public class LDAPService
extends Service

This class encapsulates the majority of the functionality provided by the LDAP Access Service. It provides means to connect to an LDAP service provider. Once connected, a client may interact with the provider via traditional JNDI method calls, or through calls created for use within the toolkit.

See Also:
Serialized Form

Field Summary
static java.lang.String COMPID
           
 
Fields inherited from class com.ibm.btt.base.Service
externalizer, name
 
Fields inherited from class com.ibm.btt.base.DSENotifier
handlersList
 
Constructor Summary
LDAPService()
          This constructor creates an LDAPService object.
LDAPService(java.lang.String aName)
          LDAPService constructor.
 
Method Summary
 void addToEnvironment(java.util.Properties envProps)
          Wraps functionality from JNDI.
 java.lang.Object addToEnvironment(java.lang.String propName, java.lang.Object propVal)
          Wraps functionality from JNDI.
 void close()
          Closes this service object and releases all associated resources.
 javax.naming.directory.DirContext createSubcontext(javax.naming.Name name, javax.naming.directory.Attributes attributes)
          Wraps functionality from JNDI.
 javax.naming.directory.DirContext createSubcontext(java.lang.String name, javax.naming.directory.Attributes attributes)
          Wraps functionality from JNDI.
protected  LDAPResponse delegate(LDAPRequest request)
          Delegates the request to an appropriate handler function depending on what kind (of request) it is.
 void destroySubcontext(javax.naming.Name name)
          Wraps functionality from JNDI.
 void destroySubcontext(java.lang.String name)
          Wraps functionality from JNDI.
 LDAPResponse execute(Context context, LDAPRequestFormat reqFmt, LDAPResponseFormat resFmt)
          Serves as an entry point for clients with externalized data.
 LDAPResponse execute(Operation operation)
          Performs functionally equivalent task as execute(operation.getContext(), LDAPRequestFormat, LDAPResponseFormat).
 LDAPResponse execute(Operation operation, LDAPRequestFormat reqFmt, LDAPResponseFormat resFmt)
          Performs functionally equivalent task as calling execute(Context, LDAPRequestFormat, LDAPResponseFormat), with the context argument being obtained from the supplied operation.
 LDAPResponse execute(Operation operation, java.lang.String reqFmtName, java.lang.String resFmtName)
          Performs functionally equivalent task as execute(Context, LDAPRequestFormat, LDAPResponseFormat).
 javax.naming.directory.Attributes getAttributes(javax.naming.Name name)
          Wraps functionality from JNDI.
 javax.naming.directory.Attributes getAttributes(javax.naming.Name name, java.lang.String[] attrs)
          Wraps functionality from JNDI.
 javax.naming.directory.Attributes getAttributes(java.lang.String name)
          Wraps functionality from JNDI.
 javax.naming.directory.Attributes getAttributes(java.lang.String name, java.lang.String[] attrs)
          Wraps functionality from JNDI.
 java.lang.Object getAuthenticationCredentials()
          Returns the authentication credentials registered for this service.
 java.lang.String getAuthenticationMethod()
          Returns the authentication method registered for this service.
 java.lang.Object getAuthenticationPrincipal()
          Returns the authentication principal registered for this service.
 javax.naming.directory.DirContext getContext()
          Returns the context attribute of this service.
 java.lang.String getProviderFactory()
          Returns the provider factory registered for this service.
 java.lang.String getProviderUrl()
          Returns the name of the LDAP server this service will be communicating with.
 javax.naming.directory.DirContext getSchema(javax.naming.Name name)
          Wraps functionality from JNDI.
 javax.naming.directory.DirContext getSchema(java.lang.String name)
          Wraps functionality from JNDI.
 void initialize()
          Equivalent to calling initialize(String) with a null argument.
 void initialize(java.lang.String name)
          Initializes this service by connecting it to a directory context in the LDAP server.
 java.lang.Object initializeFrom(Tag aTag)
          Initializes the state of this service from externalized data.
 javax.naming.NamingEnumeration list(javax.naming.Name name)
          Wraps functionality from JNDI.
 javax.naming.NamingEnumeration list(java.lang.String name)
          Wraps functionality from JNDI.
 javax.naming.NamingEnumeration listBindings(javax.naming.Name name)
          Wraps functionality from JNDI.
 javax.naming.NamingEnumeration listBindings(java.lang.String name)
          Wraps functionality from JNDI.
 java.lang.Object lookup(javax.naming.Name name)
          Wraps functionality from JNDI.
 java.lang.Object lookup(java.lang.String name)
          Wraps functionality from JNDI.
 java.lang.Object lookupLink(javax.naming.Name name)
          Wraps functionality from JNDI.
 java.lang.Object lookupLink(java.lang.String name)
          Wraps functionality from JNDI.
 void modifyAttributes(javax.naming.Name name, int modificationCode, javax.naming.directory.Attributes attributes)
          Wraps functionality from JNDI.
 void modifyAttributes(javax.naming.Name name, javax.naming.directory.ModificationItem[] modifications)
          Wraps functionality from JNDI.
 void modifyAttributes(java.lang.String name, int modificationCode, javax.naming.directory.Attributes attributes)
          Wraps functionality from JNDI.
 void modifyAttributes(java.lang.String name, javax.naming.directory.ModificationItem[] modifications)
          Wraps functionality from JNDI.
 LDAPCreateResponse performCreate(LDAPCreateRequest request)
          Returns the results of calling createSubcontext(Name name, Attributes attributes) on javax.naming.directory.DirContext.
 LDAPCreateResponse performCreate(LDAPCreateRequest request, Context context, LDAPResponseFormat format)
          Returns the results of calling createSubcontext(Name name, Attributes attributes) on javax.naming.directory.DirContext.
 LDAPCreateResponse performCreate(LDAPCreateRequest request, Operation operation)
          Returns the results of calling createSubcontext(Name name, Attributes attributes) on javax.naming.directory.DirContext.
 LDAPDestroyResponse performDestroy(LDAPDestroyRequest request)
          Returns the results of calling destroySubcontext(Name name) on javax.naming.Context.
 LDAPDestroyResponse performDestroy(LDAPDestroyRequest request, Context context, LDAPResponseFormat format)
          Returns the results of calling destroySubcontext(Name name) on javax.naming.Context.
 LDAPDestroyResponse performDestroy(LDAPDestroyRequest request, Operation operation)
          Returns the results of calling destroySubcontext(Name name) on javax.naming.Context.
 LDAPGetAttributesResponse performGetAttributes(LDAPGetAttributesRequest request)
          Returns the results of calling getAttributes(Name name, String[] attrSet) on javax.naming.directory.DirContext.
 LDAPGetAttributesResponse performGetAttributes(LDAPGetAttributesRequest request, Context context, LDAPResponseFormat format)
          Returns the results of calling getAttributes(Name name, String[] attrSet) on javax.naming.directory.DirContext.
 LDAPGetAttributesResponse performGetAttributes(LDAPGetAttributesRequest request, Operation operation)
          Returns the results of calling getAttributes(Name name, String[] attrSet) on javax.naming.directory.DirContext.
 LDAPListResponse performList(LDAPListRequest request)
          Returns the results of calling list(Name name) on javax.naming.directory.DirContext.
 LDAPListResponse performList(LDAPListRequest request, Context context, LDAPResponseFormat format)
          Returns the results of calling list(Name name) on javax.naming.directory.DirContext.
 LDAPListResponse performList(LDAPListRequest request, Operation operation)
          Returns the results of calling list(Name name) on javax.naming.directory.DirContext.
 LDAPLookupResponse performLookup(LDAPLookupRequest request)
          Returns the results of calling lookup(Name name) on javax.naming.directory.DirContext.
 LDAPLookupResponse performLookup(LDAPLookupRequest request, Context context, LDAPResponseFormat format)
          Returns the results of calling lookup(Name name) on javax.naming.directory.DirContext.
 LDAPLookupResponse performLookup(LDAPLookupRequest request, Operation operation)
          Returns the results of calling lookup(Name name) on javax.naming.directory.DirContext.
 LDAPModifyResponse performModify(LDAPModifyRequest request)
          Returns the results of calling modifyAttributes(Name name, ModificationItem[] items) on javax.naming.directory.DirContext.
 LDAPModifyResponse performModify(LDAPModifyRequest request, Context context, LDAPResponseFormat format)
          Returns the results of calling modifyAttributes(Name name, ModificationItem[] items) on javax.naming.directory.DirContext.
 LDAPModifyResponse performModify(LDAPModifyRequest request, Operation operation)
          Returns the results of calling modifyAttributes(Name name, ModificationItem[] items) on javax.naming.directory.DirContext.
 LDAPResponse performRequest(LDAPRequest request)
          Performs the request supplied.
 LDAPResponse performRequest(LDAPRequest request, Context context, LDAPResponseFormat format)
          Allows for clients that wish to externalize response data, but wish to supply thier own request data.
 LDAPResponse performRequest(LDAPRequest request, Operation operation)
          Performs functionally equivalent task as calling performRequest(LDAPRequest, Context, LDAPResponseFormat).
 LDAPSearchResponse performSearch(LDAPSearchRequest request)
          Returns the results of calling search(Name name, String filter, SearchControls controls) or search(Name name, String filterExpr, Object[] args, SearchControls controls) on javax.naming.directory.DirContext.
 LDAPSearchResponse performSearch(LDAPSearchRequest request, Context context, LDAPResponseFormat format)
          Returns the results of calling search(Name name, String filter, SearchControls controls) or search(Name name, String filterExpr, Object[] args, SearchControls controls) on javax.naming.directory.DirContext.
 LDAPSearchResponse performSearch(LDAPSearchRequest request, Operation operation)
          Returns the results of calling search(Name name, String filter, SearchControls controls) or search(Name name, String filterExpr, Object[] args, SearchControls controls) on javax.naming.directory.DirContext.
protected  void release()
          Releases the directory context object obtained by this service from the LDAP server.
 java.lang.Object removeFromEnvironment(java.lang.String propName)
          Wraps functionality from JNDI.
 javax.naming.NamingEnumeration search(javax.naming.Name name, java.lang.String filterExpr, java.lang.Object[] filterArgs, javax.naming.directory.SearchControls controls)
          Wraps functionality from JNDI.
 javax.naming.NamingEnumeration search(javax.naming.Name name, java.lang.String filter, javax.naming.directory.SearchControls controls)
          Wraps functionality from JNDI.
 javax.naming.NamingEnumeration search(java.lang.String name, java.lang.String filterExpr, java.lang.Object[] filterArgs, javax.naming.directory.SearchControls controls)
          Wraps functionality from JNDI.
 javax.naming.NamingEnumeration search(java.lang.String name, java.lang.String filter, javax.naming.directory.SearchControls controls)
          Wraps functionality from JNDI.
 void setAuthenticationCredentials(java.lang.Object newAuthenticationCredentials)
          Sets the authentication credentials to be used by this services.
 void setAuthenticationMethod(java.lang.String newAuthenticationMethod)
          Sets the authentication method to be used by this service.
 void setAuthenticationPrincipal(java.lang.Object newAuthenticationPrincipal)
          Sets the authentication principal to be used by this service.
 void setContext(javax.naming.directory.DirContext newContext)
          Sets this service directory context object.
 void setProviderFactory(java.lang.String newSpFactory)
          Sets the provider factory used by this service.
 void setProviderUrl(java.lang.String newProviderUrl)
          Sets the address of the LDAP server this service will be communicating with.
 java.lang.String toString()
          Returns the string representation of this object.
 
Methods inherited from class com.ibm.btt.base.Service
externalizer, getExternalizer, getTagName, readExternal, readExternal, readObject, removeExternal, setExternalizer, terminate, toStrings, toTags, writeExternal, writeExternal
 
Methods inherited from class com.ibm.btt.base.DSENotifier
addHandler, getHandlersList, getName, removeHandler, setName, signalEvent, signalEvent, signalEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.ibm.btt.base.Externalizable
getName, setName
 

Field Detail

COMPID

public static final java.lang.String COMPID
See Also:
Constant Field Values
Constructor Detail

LDAPService

public LDAPService()
This constructor creates an LDAPService object.


LDAPService

public LDAPService(java.lang.String aName)
            throws java.io.IOException
LDAPService constructor.

Parameters:
aName - java.lang.String
Throws:
java.io.IOException
Method Detail

addToEnvironment

public java.lang.Object addToEnvironment(java.lang.String propName,
                                         java.lang.Object propVal)
                                  throws javax.naming.NamingException
Wraps functionality from JNDI. Adds a variable to the environment of the JNDI context. These variables control the behaviour of these contexs. See JDK 1.3 documentation on JNDI for more details.

Parameters:
propName - java.lang.String
propVal - java.lang.Object
Returns:
java.lang.Object
Throws:
javax.naming.NamingException

addToEnvironment

public void addToEnvironment(java.util.Properties envProps)
Wraps functionality from JNDI. Adds a variable to the environment of the JNDI context. These variables control the behaviour of these contexs. See JDK 1.3 documentation on JNDI for more details.

Parameters:
props - java.util.Properties

close

public void close()
Closes this service object and releases all associated resources.


createSubcontext

public javax.naming.directory.DirContext createSubcontext(java.lang.String name,
                                                          javax.naming.directory.Attributes attributes)
                                                   throws javax.naming.NamingException
Wraps functionality from JNDI. Creates a new entry in the DIT. See JDK 1.3 documentation on JNDI for more details.

Parameters:
name - java.lang.String
attributes - javax.naming.directory.Attributes
Returns:
javax.naming.directory.DirContext
Throws:
javax.naming.NamingException

createSubcontext

public javax.naming.directory.DirContext createSubcontext(javax.naming.Name name,
                                                          javax.naming.directory.Attributes attributes)
                                                   throws javax.naming.NamingException
Wraps functionality from JNDI. Creates a new entry in the DIT. See JDK 1.3 documentation on JNDI for more details.

Parameters:
name - javax.naming.Name
attributes - javax.naming.directory.Attributes
Returns:
javax.naming.directory.DirContext
Throws:
javax.naming.NamingException

delegate

protected LDAPResponse delegate(LDAPRequest request)
                         throws DSEException,
                                DSEInvalidRequestException
Delegates the request to an appropriate handler function depending on what kind (of request) it is.

Parameters:
request - com.ibm.btt.services.ldap.model.LDAPRequest
Returns:
com.ibm.btt.services.ldap.model.LDAPResponse
Throws:
DSEException
DSEInvalidRequestException

destroySubcontext

public void destroySubcontext(java.lang.String name)
                       throws javax.naming.NamingException
Wraps functionality from JNDI. Request removal of the entry associated with the supplied name from the DIT. See JDK 1.3 documentation on JNDI for more details.

Parameters:
name - java.lang.String
Throws:
javax.naming.NamingException

destroySubcontext

public void destroySubcontext(javax.naming.Name name)
                       throws javax.naming.NamingException
Wraps functionality from JNDI. Requests removal of the entry associated with the supplied name from the DIT. See JDK 1.3 documentation on JNDI for more details.

Parameters:
name - javax.naming.Name
Throws:
javax.naming.NamingException

execute

public LDAPResponse execute(Context context,
                            LDAPRequestFormat reqFmt,
                            LDAPResponseFormat resFmt)
                     throws DSEException
Serves as an entry point for clients with externalized data. Data from the supplied context is used to create an appropriate request model using the supplied LDAPRequestFormat. The request is then processed and response data is mapped back into the supplied context using the supplied LDAPResponseFormat object.

Parameters:
context - com.ibm.btt.base.Context
reqFmt - com.ibm.btt.services.ldap.LDAPRequestFormat
resFmt - com.ibm.btt.services.ldap.LDAPResponseFormat
Returns:
com.ibm.btt.services.ldap.model.LDAPResponse
Throws:
DSEException

execute

public LDAPResponse execute(Operation operation)
                     throws DSEException
Performs functionally equivalent task as execute(operation.getContext(), LDAPRequestFormat, LDAPResponseFormat). The LDAPRequestFormat and LDAPResponseFormat objects are obtained from the operation context using pre-defined keywords.

Parameters:
operation - com.ibm.btt.base.Operation
Returns:
com.ibm.btt.services.ldap.model.LDAPResponse
Throws:
DSEException

execute

public LDAPResponse execute(Operation operation,
                            LDAPRequestFormat reqFmt,
                            LDAPResponseFormat resFmt)
                     throws DSEException
Performs functionally equivalent task as calling execute(Context, LDAPRequestFormat, LDAPResponseFormat), with the context argument being obtained from the supplied operation.

Parameters:
operation - com.ibm.btt.base.Operation
reqFmt - com.ibm.btt.services.ldap.LDAPRequestFormat
resFmt - com.ibm.btt.services.ldap.LDAPResponseFormat
Returns:
com.ibm.btt.services.ldap.model.LDAPResponse
Throws:
DSEException

execute

public LDAPResponse execute(Operation operation,
                            java.lang.String reqFmtName,
                            java.lang.String resFmtName)
                     throws DSEException
Performs functionally equivalent task as execute(Context, LDAPRequestFormat, LDAPResponseFormat). The context argument is obtained from the supplied operation. The LDAPRequestFormat and LDAPResponseFormat are read from externalized definitions, keyed by the supplied names.

Parameters:
operation - com.ibm.btt.base.Operation
reqFmtName - java.lang.String
resFmtName - java.lang.String
Returns:
com.ibm.btt.services.ldap.model.LDAPResponse
Throws:
DSEException

getAttributes

public javax.naming.directory.Attributes getAttributes(java.lang.String name)
                                                throws javax.naming.NamingException
Wraps functionality from JNDI. Get the attributes of the entry in the DIT matching the supplied name. See JDK 1.3 documentation on JNDI for more details.

Parameters:
name - java.lang.String
Returns:
javax.naming.directory.Attributes
Throws:
javax.naming.NamingException

getAttributes

public javax.naming.directory.Attributes getAttributes(java.lang.String name,
                                                       java.lang.String[] attrs)
                                                throws javax.naming.NamingException
Wraps functionality from JNDI. Get the attributes of the entry in the DIT matching the supplied name. The client can express interest in a subset of the entries attributes by supplying a string array of the names of attributes it wants returned. See JDK 1.3 documentation on JNDI for more details.

Parameters:
name - java.lang.String
attrs - java.lang.String[]
Returns:
javax.naming.directory.Attributes
Throws:
javax.naming.NamingException

getAttributes

public javax.naming.directory.Attributes getAttributes(javax.naming.Name name)
                                                throws javax.naming.NamingException
Wraps functionality from JNDI. Get the attributes of the entry in the DIT matching the supplied name. See JDK 1.3 documentation on JNDI for more details.

Parameters:
name - java.lang.Name
Returns:
javax.naming.directory.Attributes
Throws:
javax.naming.NamingException

getAttributes

public javax.naming.directory.Attributes getAttributes(javax.naming.Name name,
                                                       java.lang.String[] attrs)
                                                throws javax.naming.NamingException
Wraps functionality from JNDI. Get the attributes of the entry in the DIT matching the supplied name. The client can express interest in a subset of the entries attributes by supplying a string array of the names of attributes it wants returned. See JDK 1.3 documentation on JNDI for more details.

Parameters:
name - java.lang.Name
attrs - java.lang.String[]
Returns:
javax.naming.directory.Attributes
Throws:
javax.naming.NamingException

getAuthenticationCredentials

public java.lang.Object getAuthenticationCredentials()
Returns the authentication credentials registered for this service.

Returns:
java.lang.Object

getAuthenticationMethod

public java.lang.String getAuthenticationMethod()
Returns the authentication method registered for this service.

Returns:
java.lang.String

getAuthenticationPrincipal

public java.lang.Object getAuthenticationPrincipal()
Returns the authentication principal registered for this service.

Returns:
java.lang.Object

getContext

public javax.naming.directory.DirContext getContext()
                                             throws javax.naming.NamingException
Returns the context attribute of this service. If the service has not been initialized yet, then a call to initialize() is made first.

Returns:
javax.naming.directory.DirContext
Throws:
javax.naming.NamingException

getProviderFactory

public java.lang.String getProviderFactory()
Returns the provider factory registered for this service. This determines the SPI that JNDI will utilize for providing service.

Returns:
java.lang.String

getProviderUrl

public java.lang.String getProviderUrl()
Returns the name of the LDAP server this service will be communicating with.

Returns:
java.lang.String

getSchema

public javax.naming.directory.DirContext getSchema(java.lang.String name)
                                            throws javax.naming.NamingException
Wraps functionality from JNDI. Returns the schema being used to defined the directory object associated with the supplied name. See JDK 1.3 documentation on JNDI for more details.

Parameters:
name - java.lang.String
Returns:
javax.naming.directory.DirContext
Throws:
javax.naming.NamingException

getSchema

public javax.naming.directory.DirContext getSchema(javax.naming.Name name)
                                            throws javax.naming.NamingException
Wraps functionality from JNDI. Returns the schema being used to defined the directory object associated with the supplied name. See JDK 1.3 documentation on JNDI for more details.

Parameters:
name - javax.naming.Name
Returns:
javax.naming.directory.DirContext
Throws:
javax.naming.NamingException

initialize

public void initialize()
                throws javax.naming.NamingException
Equivalent to calling initialize(String) with a null argument.

Throws:
javax.naming.NamingException

initialize

public void initialize(java.lang.String name)
                throws javax.naming.NamingException
Initializes this service by connecting it to a directory context in the LDAP server. If the supplied string name is not null, the service will request to be bound to the directory context of that name.

Parameters:
name - java.lang.String
Throws:
javax.naming.NamingException

initializeFrom

public java.lang.Object initializeFrom(Tag aTag)
                                throws java.io.IOException,
                                       DSEInvalidArgumentException
Initializes the state of this service from externalized data.

Overrides:
initializeFrom in class Service
Parameters:
aTag - com.ibm.btt.base.Tag
Returns:
java.lang.Object
Throws:
java.io.IOException
DSEInvalidArgumentException

list

public javax.naming.NamingEnumeration list(java.lang.String name)
                                    throws javax.naming.NamingException
Wraps functionality from JNDI. Returns a listing of all the entries in the directory context associated with the given name. See JDK 1.3 documentation on JNDI for more details.

Parameters:
name - java.lang.String
Returns:
javax.naming.NamingEnumeration
Throws:
javax.naming.NamingException

list

public javax.naming.NamingEnumeration list(javax.naming.Name name)
                                    throws javax.naming.NamingException
Wraps functionality from JNDI. Returns a listing of all the entries in the directory context associated with the given name. See JDK 1.3 documentation on JNDI for more details.

Parameters:
name - javax.naming.Name
Returns:
javax.naming.NamingEnumeration
Throws:
javax.naming.NamingException

listBindings

public javax.naming.NamingEnumeration listBindings(java.lang.String name)
                                            throws javax.naming.NamingException
Wraps functionality from JNDI. Returns a listing of all the entries in the directory context associated with the given name. See JDK 1.3 documentation on JNDI for more details.

Parameters:
name - java.lang.String
Returns:
javax.naming.NamingEnumeration
Throws:
javax.naming.NamingException

listBindings

public javax.naming.NamingEnumeration listBindings(javax.naming.Name name)
                                            throws javax.naming.NamingException
Wraps functionality from JNDI. Returns a listing of all the entries in the directory context associated with the given name. See JDK 1.3 documentation on JNDI for more details.

Parameters:
name - javax.naming.Name
Returns:
javax.naming.NamingEnumeration
Throws:
javax.naming.NamingException

lookup

public java.lang.Object lookup(java.lang.String name)
                        throws javax.naming.NamingException
Wraps functionality from JNDI. This function returns the directory object associated with the supplied LDAP distinguished name (DN). See JDK 1.3 documentation on JNDI for more details.

Parameters:
name - java.lang.String
Returns:
java.lang.Object
Throws:
javax.naming.NamingException

lookup

public java.lang.Object lookup(javax.naming.Name name)
                        throws javax.naming.NamingException
Wraps functionality from JNDI. This function returns the directory object associated with the supplied LDAP distinguished name (DN). See JDK 1.3 documentation on JNDI for more details.

Parameters:
name - javax.naming.Name
Returns:
java.lang.Object
Throws:
javax.naming.NamingException

lookupLink

public java.lang.Object lookupLink(java.lang.String name)
                            throws javax.naming.NamingException
Wraps functionality from JNDI. The name supplied is used to lookup an associated directory object in the DIT. Referrals and links are followed. See JDK 1.3 documentation on JNDI for more details.

Parameters:
name - java.lang.String
Returns:
java.lang.Object
Throws:
javax.naming.NamingException

lookupLink

public java.lang.Object lookupLink(javax.naming.Name name)
                            throws javax.naming.NamingException
Wraps functionality from JNDI. The name supplied is used to lookup an associated directory object in the DIT. Referrals and links are followed. See JDK 1.3 documentation on JNDI for more details.

Parameters:
name - javax.naming.Name
Returns:
java.lang.Object
Throws:
javax.naming.NamingException

modifyAttributes

public void modifyAttributes(java.lang.String name,
                             javax.naming.directory.ModificationItem[] modifications)
                      throws javax.naming.NamingException
Wraps functionality from JNDI. Modifies the named entry, changing it using the attributes and modification codes contained within the array of supplied modification items. See JDK 1.3 documentation on JNDI for more details.

Parameters:
name - java.lang.String
modifications - javax.naming.directory.ModificationItem[]
Throws:
javax.naming.NamingException

modifyAttributes

public void modifyAttributes(java.lang.String name,
                             int modificationCode,
                             javax.naming.directory.Attributes attributes)
                      throws javax.naming.NamingException
Wraps functionality from JNDI. Modifies the named entry, changing the supplied attributes. These attributes are either added, deleted or replaced, depending on the supplied modification code. See JDK 1.3 documentation on JNDI for more details.

Parameters:
name - java.lang.String
modificationCode - int
attributes - javax.naming.directory.Attributes
Throws:
javax.naming.NamingException

modifyAttributes

public void modifyAttributes(javax.naming.Name name,
                             javax.naming.directory.ModificationItem[] modifications)
                      throws javax.naming.NamingException
Wraps functionality from JNDI. Modifies the named entry, changing it using the attributes and modification codes contained within the array of supplied modification items. See JDK 1.3 documentation on JNDI for more details.

Parameters:
name - javax.naming.Name
modifications - javax.naming.directory.ModificationItem[]
Throws:
javax.naming.NamingException

modifyAttributes

public void modifyAttributes(javax.naming.Name name,
                             int modificationCode,
                             javax.naming.directory.Attributes attributes)
                      throws javax.naming.NamingException
Wraps functionality from JNDI. Modifies the named entry, changing the supplied attributes. These attributes are either added, deleted or replaced, depending on the supplied modification code. See JDK 1.3 documentation on JNDI for more details.

Parameters:
name - javax.naming.Name
modificationCode - int
attributes - javax.naming.directory.Attributes
Throws:
javax.naming.NamingException

performCreate

public LDAPCreateResponse performCreate(LDAPCreateRequest request)
                                 throws DSEException
Returns the results of calling createSubcontext(Name name, Attributes attributes) on javax.naming.directory.DirContext. The results are wrapped in an LDAPCreateResponse model object. This function serves as an entry point for the create request type. Input data for this function is obtained from the LDAPCreateRequest model object.

Parameters:
request - com.ibm.btt.services.ldap.model.LDAPCreateRequest
Returns:
com.ibm.btt.services.ldap.model.LDAPCreateResponse
Throws:
DSEException

performCreate

public LDAPCreateResponse performCreate(LDAPCreateRequest request,
                                        Context context,
                                        LDAPResponseFormat format)
                                 throws DSEException
Returns the results of calling createSubcontext(Name name, Attributes attributes) on javax.naming.directory.DirContext. The results are wrapped in an LDAPCreateResponse model object. This function serves as an entry point for the create request type. Input data for this function is obtained from the LDAPCreateRequest model object. Response data is automatically mapped back into the supplied context using the supplied format.

Parameters:
request - com.ibm.btt.services.ldap.model.LDAPCreateRequest
context - com.ibm.btt.base.Context
format - com.ibm.btt.services.ldap.LDAPRequestFormat
Returns:
com.ibm.btt.services.ldap.model.LDAPCreateResponse
Throws:
DSEException

performCreate

public LDAPCreateResponse performCreate(LDAPCreateRequest request,
                                        Operation operation)
                                 throws DSEException
Returns the results of calling createSubcontext(Name name, Attributes attributes) on javax.naming.directory.DirContext. The results are wrapped in an LDAPCreateResponse model object. This function serves as an entry point for the create request type. Input data for this function is obtained from the LDAPCreateRequest model object. Response data is automatically mapped back into the data context of the supplied operation, provided that appropriate formats have been defined for the operation.

Parameters:
request - com.ibm.btt.services.ldap.model.LDAPCreateRequest
operation - com.ibm.btt.base.Operation
Returns:
com.ibm.btt.services.ldap.model.LDAPCreateResponse
Throws:
DSEException

performDestroy

public LDAPDestroyResponse performDestroy(LDAPDestroyRequest request)
                                   throws DSEException
Returns the results of calling destroySubcontext(Name name) on javax.naming.Context. The results are wrapped in an LDAPDestroyResponse model object. This function serves as an entry point for the destroy request type. Input data for this function is obtained from the LDAPDestroyRequest model object.

Parameters:
request - com.ibm.btt.services.ldap.model.LDAPDestroyRequest
Returns:
com.ibm.btt.services.ldap.model.LDAPDestroyResponse
Throws:
DSEException

performDestroy

public LDAPDestroyResponse performDestroy(LDAPDestroyRequest request,
                                          Context context,
                                          LDAPResponseFormat format)
                                   throws DSEException
Returns the results of calling destroySubcontext(Name name) on javax.naming.Context. The results are wrapped in an LDAPDestroyResponse model object. This function serves as an entry point for the destroy request type. Input data for this function is obtained from the LDAPDestroyRequest model object. Response data is automatically mapped back into the supplied context using the supplied format.

Parameters:
request - com.ibm.btt.services.ldap.model.LDAPDestroyRequest
context - com.ibm.btt.base.Context
format - com.ibm.btt.services.ldap.LDAPRequestFormat
Returns:
com.ibm.btt.services.ldap.model.LDAPDestroyResponse
Throws:
DSEException

performDestroy

public LDAPDestroyResponse performDestroy(LDAPDestroyRequest request,
                                          Operation operation)
                                   throws DSEException
Returns the results of calling destroySubcontext(Name name) on javax.naming.Context. The results are wrapped in an LDAPDestroyResponse model object. This function serves as an entry point for the destroy request type. Input data for this function is obtained from the LDAPDestroyRequest model object. Response data is automatically mapped back into the data context of the supplied operation, provided that appropriate formats have been defined for the operation.

Parameters:
request - com.ibm.btt.services.ldap.model.LDAPDestroyRequest
operation - com.ibm.btt.base.Operation
Returns:
com.ibm.btt.services.ldap.model.LDAPDestroyResponse
Throws:
DSEException

performGetAttributes

public LDAPGetAttributesResponse performGetAttributes(LDAPGetAttributesRequest request)
                                               throws DSEException
Returns the results of calling getAttributes(Name name, String[] attrSet) on javax.naming.directory.DirContext. The results are wrapped in an LDAPGetAttributesResponse model object. This function serves as an entry point for the getattributes request type. Input data for this function is obtained from the LDAPGetAttributesRequest model object.

Parameters:
request - com.ibm.btt.services.ldap.model.LDAPGetAttributesRequest
Returns:
com.ibm.btt.services.ldap.model.LDAPGetAttributesResponse
Throws:
DSEException

performGetAttributes

public LDAPGetAttributesResponse performGetAttributes(LDAPGetAttributesRequest request,
                                                      Context context,
                                                      LDAPResponseFormat format)
                                               throws DSEException
Returns the results of calling getAttributes(Name name, String[] attrSet) on javax.naming.directory.DirContext. The results are wrapped in an LDAPGetAttributesResponse model object. This function serves as an entry point for the getattributes request type. Input data for this function is obtained from the LDAPGetAttributesRequest model object. Response data is automatically mapped back into the supplied context using the supplied format.

Parameters:
request - com.ibm.btt.services.ldap.model.LDAPGetAttributesRequest
context - com.ibm.btt.base.Context
format - com.ibm.btt.services.ldap.LDAPRequestFormat
Returns:
com.ibm.btt.services.ldap.model.LDAPGetAttributesResponse
Throws:
DSEException

performGetAttributes

public LDAPGetAttributesResponse performGetAttributes(LDAPGetAttributesRequest request,
                                                      Operation operation)
                                               throws DSEException
Returns the results of calling getAttributes(Name name, String[] attrSet) on javax.naming.directory.DirContext. The results are wrapped in an LDAPGetAttributesResponse model object. This function serves as an entry point for the getattributes request type. Input data for this function is obtained from the LDAPGetAttributesRequest model object. Response data is automatically mapped back into the data context of the supplied operation, provided that appropriate formats have been defined for the operation.

Parameters:
request - com.ibm.btt.services.ldap.model.LDAPGetAttributesRequest
operation - com.ibm.btt.base.Operation
Returns:
com.ibm.btt.services.ldap.model.LDAPGetAttributesResponse
Throws:
DSEException

performList

public LDAPListResponse performList(LDAPListRequest request)
                             throws DSEException
Returns the results of calling list(Name name) on javax.naming.directory.DirContext. The results are wrapped in an LDAPListResponse model object. This function serves as an entry point for both the list and listbindings request types. Input data for this function is obtained from the LDAPListRequest model object.

Parameters:
request - com.ibm.btt.services.ldap.model.LDAPListRequest
Returns:
com.ibm.btt.services.ldap.model.LDAPListResponse
Throws:
DSEException

performList

public LDAPListResponse performList(LDAPListRequest request,
                                    Context context,
                                    LDAPResponseFormat format)
                             throws DSEException
Returns the results of calling list(Name name) on javax.naming.directory.DirContext. The results are wrapped in an LDAPListResponse model object. This function serves as an entry point for both the list and listbindings request types. Input data for this function is obtained from the LDAPListRequest model object. Response data is automatically mapped back into the supplied context using the supplied format.

Parameters:
request - com.ibm.btt.services.ldap.model.LDAPListRequest
context - com.ibm.btt.base.Context
format - com.ibm.btt.services.ldap.LDAPRequestFormat
Returns:
com.ibm.btt.services.ldap.model.LDAPListResponse
Throws:
DSEException

performList

public LDAPListResponse performList(LDAPListRequest request,
                                    Operation operation)
                             throws DSEException
Returns the results of calling list(Name name) on javax.naming.directory.DirContext. The results are wrapped in an LDAPListResponse model object. This function serves as an entry point for both the list and listbindings request types. Input data for this function is obtained from the LDAPListRequest model object. Response data is automatically mapped back into the data context of the supplied operation, provided that appropriate formats have been defined for the operation.

Parameters:
request - com.ibm.btt.services.ldap.model.LDAPListRequest
operation - com.ibm.btt.base.Operation
Returns:
com.ibm.btt.services.ldap.model.LDAPListResponse
Throws:
DSEException

performLookup

public LDAPLookupResponse performLookup(LDAPLookupRequest request)
                                 throws DSEException
Returns the results of calling lookup(Name name) on javax.naming.directory.DirContext. The results are wrapped in an LDAPLookupResponse model object. This function serves as an entry point for the lookup request type. Input data for this function is obtained from the LDAPLookupRequest model object.

Parameters:
request - com.ibm.btt.services.ldap.model.LDAPLookupRequest
Returns:
com.ibm.btt.services.ldap.model.LDAPLookupResponse
Throws:
DSEException

performLookup

public LDAPLookupResponse performLookup(LDAPLookupRequest request,
                                        Context context,
                                        LDAPResponseFormat format)
                                 throws DSEException
Returns the results of calling lookup(Name name) on javax.naming.directory.DirContext. The results are wrapped in an LDAPLookupResponse model object. This function serves as an entry point for the lookup request type. Input data for this function is obtained from the LDAPLookupRequest model object. Response data is automatically mapped back into the supplied context using the supplied format.

Parameters:
request - com.ibm.btt.services.ldap.model.LDAPLookupRequest
context - com.ibm.btt.base.Context
format - com.ibm.btt.services.ldap.LDAPRequestFormat
Returns:
com.ibm.btt.services.ldap.model.LDAPLookupResponse
Throws:
DSEException

performLookup

public LDAPLookupResponse performLookup(LDAPLookupRequest request,
                                        Operation operation)
                                 throws DSEException
Returns the results of calling lookup(Name name) on javax.naming.directory.DirContext. The results are wrapped in an LDAPLookupResponse model object. This function serves as an entry point for the lookup request type. Input data for this function is obtained from the LDAPLookupRequest model object. Response data is automatically mapped back into the data context of the supplied operation, provided that appropriate formats have been defined for the operation.

Parameters:
request - com.ibm.btt.services.ldap.model.LDAPLookupRequest
operation - com.ibm.btt.base.Operation
Returns:
com.ibm.btt.services.ldap.model.LDAPLookupResponse
Throws:
DSEException

performModify

public LDAPModifyResponse performModify(LDAPModifyRequest request)
                                 throws DSEException
Returns the results of calling modifyAttributes(Name name, ModificationItem[] items) on javax.naming.directory.DirContext. The results are wrapped in an LDAPModifyResponse model object. This function serves as an entry point for the modify request type. Input data for this function is obtained from the LDAPModifyRequest model object.

Parameters:
request - com.ibm.btt.services.ldap.model.LDAPModifyRequest
Returns:
com.ibm.btt.services.ldap.model.LDAPModifyResponse
Throws:
DSEException

performModify

public LDAPModifyResponse performModify(LDAPModifyRequest request,
                                        Context context,
                                        LDAPResponseFormat format)
                                 throws DSEException
Returns the results of calling modifyAttributes(Name name, ModificationItem[] items) on javax.naming.directory.DirContext. The results are wrapped in an LDAPModifyResponse model object. This function serves as an entry point for the modify request type. Input data for this function is obtained from the LDAPModifyRequest model object. Response data is automatically mapped back into supplied context using the supplied format.

Parameters:
request - com.ibm.btt.services.ldap.model.LDAPModifyRequest
context - com.ibm.btt.base.Context
format - com.ibm.btt.services.ldap.LDAPRequestFormat
Returns:
com.ibm.btt.services.ldap.model.LDAPModifyResponse
Throws:
DSEException

performModify

public LDAPModifyResponse performModify(LDAPModifyRequest request,
                                        Operation operation)
                                 throws DSEException
Returns the results of calling modifyAttributes(Name name, ModificationItem[] items) on javax.naming.directory.DirContext. The results are wrapped in an LDAPModifyResponse model object. This function serves as an entry point for the modify request type. Input data for this function is obtained from the LDAPModifyRequest model object. Response data is automatically mapped back into the data context of the supplied operation, provided that appropriate formats have been defined for the operation.

Parameters:
request - com.ibm.btt.services.ldap.model.LDAPModifyRequest
operation - com.ibm.btt.base.Operation
Returns:
com.ibm.btt.services.ldap.model.LDAPModifyResponse
Throws:
DSEException

performRequest

public LDAPResponse performRequest(LDAPRequest request)
                            throws DSEException
Performs the request supplied. This function calls delegate(LDAPRequest) to find a function that can handle the request type specified.

Parameters:
request - com.ibm.btt.services.ldap.model.LDAPRequest
Returns:
com.ibm.btt.services.ldap.model.LDAPResponse
Throws:
DSEException

performRequest

public LDAPResponse performRequest(LDAPRequest request,
                                   Context context,
                                   LDAPResponseFormat format)
                            throws DSEException
Allows for clients that wish to externalize response data, but wish to supply thier own request data. The supplied request is processed, and response data is mapped back into the supplied context using the supplied format.

Parameters:
request - com.ibm.btt.services.ldap.model.LDAPRequest
context - com.ibm.btt.base.Context
format - com.ibm.btt.services.ldap.LDAPRequestFormat
Returns:
com.ibm.btt.services.ldap.model.LDAPResponse
Throws:
DSEException

performRequest

public LDAPResponse performRequest(LDAPRequest request,
                                   Operation operation)
                            throws DSEException
Performs functionally equivalent task as calling performRequest(LDAPRequest, Context, LDAPResponseFormat). The context and response format are obtained from the operation.

Parameters:
request - com.ibm.btt.services.ldap.model.LDAPRequest
operation - com.ibm.btt.base.Operation
Returns:
com.ibm.btt.services.ldap.model.LDAPResponse
Throws:
DSEException

performSearch

public LDAPSearchResponse performSearch(LDAPSearchRequest request)
                                 throws DSEException
Returns the results of calling search(Name name, String filter, SearchControls controls) or search(Name name, String filterExpr, Object[] args, SearchControls controls) on javax.naming.directory.DirContext. The results are wrapped in an LDAPSearchResponse model object. This function serves as an entry point for the search request type. Input data for this function is obtained from the LDAPSearchRequest model object.

Parameters:
request - com.ibm.btt.services.ldap.model.LDAPSearchRequest
Returns:
com.ibm.btt.services.ldap.model.LDAPSearchResponse
Throws:
DSEException

performSearch

public LDAPSearchResponse performSearch(LDAPSearchRequest request,
                                        Context context,
                                        LDAPResponseFormat format)
                                 throws DSEException
Returns the results of calling search(Name name, String filter, SearchControls controls) or search(Name name, String filterExpr, Object[] args, SearchControls controls) on javax.naming.directory.DirContext. The results are wrapped in an LDAPSearchResponse model object. This function serves as an entry point for the search request type. Input data for this function is obtained from the LDAPSearchRequest model object. Response data is automatically mapped back into the supplied context using the supplied format.

Parameters:
request - com.ibm.btt.services.ldap.model.LDAPSearchRequest
context - com.ibm.btt.base.Context
format - com.ibm.btt.services.ldap.LDAPRequestFormat
Returns:
com.ibm.btt.services.ldap.model.LDAPSearchResponse
Throws:
DSEException

performSearch

public LDAPSearchResponse performSearch(LDAPSearchRequest request,
                                        Operation operation)
                                 throws DSEException
Returns the results of calling search(Name name, String filter, SearchControls controls) or search(Name name, String filterExpr, Object[] args, SearchControls controls) on javax.naming.directory.DirContext. The results are wrapped in an LDAPSearchResponse model object. This function serves as an entry point for the search request type. Input data for this function is obtained from the LDAPSearchRequest model object. Response data is automatically mapped back into the data context of the supplied operation, provided that appropriate formats have been defined for the operation.

Parameters:
request - com.ibm.btt.services.ldap.model.LDAPSearchRequest
operation - com.ibm.btt.base.Operation
Returns:
com.ibm.btt.services.ldap.model.LDAPSearchResponse
Throws:
DSEException

release

protected void release()
Releases the directory context object obtained by this service from the LDAP server.


removeFromEnvironment

public java.lang.Object removeFromEnvironment(java.lang.String propName)
                                       throws javax.naming.NamingException
Wraps functionality from JNDI. Removes the named property from the environment of the directory context. See JDK 1.3 documentation on JNDI for more details.

Parameters:
propName - java.lang.String
Returns:
java.lang.Object
Throws:
javax.naming.NamingException

search

public javax.naming.NamingEnumeration search(java.lang.String name,
                                             java.lang.String filterExpr,
                                             java.lang.Object[] filterArgs,
                                             javax.naming.directory.SearchControls controls)
                                      throws javax.naming.NamingException
Wraps functionality from JNDI. Performs a search using the supplied criteria and returns the results. See JDK 1.3 documentation on JNDI for more details.

Parameters:
name - java.lang.String
filterExpr - java.lang.String
filterArgs - java.lang.Object[]
controls - javax.naming.directory.SearchControls
Returns:
javax.naming.NamingEnumeration
Throws:
javax.naming.NamingException

search

public javax.naming.NamingEnumeration search(java.lang.String name,
                                             java.lang.String filter,
                                             javax.naming.directory.SearchControls controls)
                                      throws javax.naming.NamingException
Wraps functionality from JNDI. Performs a search using the supplied criteria and returns the results. See JDK 1.3 documentation on JNDI for more details.

Parameters:
name - java.lang.String
filter - java.lang.String
controls - javax.naming.directory.SearchControls
Returns:
javax.naming.NamingEnumeration
Throws:
javax.naming.NamingException

search

public javax.naming.NamingEnumeration search(javax.naming.Name name,
                                             java.lang.String filterExpr,
                                             java.lang.Object[] filterArgs,
                                             javax.naming.directory.SearchControls controls)
                                      throws javax.naming.NamingException
Wraps functionality from JNDI. Performs a search using the supplied criteria and returns the results. See JDK 1.3 documentation on JNDI for more details.

Parameters:
name - javax.naming.Name
filterExpr - java.lang.String
filterArgs - java.lang.Object[]
controls - javax.naming.directory.SearchControls
Returns:
javax.naming.NamingEnumeration
Throws:
javax.naming.NamingException

search

public javax.naming.NamingEnumeration search(javax.naming.Name name,
                                             java.lang.String filter,
                                             javax.naming.directory.SearchControls controls)
                                      throws javax.naming.NamingException
Wraps functionality from JNDI. Performs a search using the supplied criteria and returns the results. See JDK 1.3 documentation on JNDI for more details.

Parameters:
name - javax.naming.Name
filter - java.lang.String
controls - javax.naming.directory.SearchControls
Returns:
javax.naming.NamingEnumeration
Throws:
javax.naming.NamingException

setAuthenticationCredentials

public void setAuthenticationCredentials(java.lang.Object newAuthenticationCredentials)
Sets the authentication credentials to be used by this services.

Parameters:
newAuthenticationCredentials - java.lang.Object

setAuthenticationMethod

public void setAuthenticationMethod(java.lang.String newAuthenticationMethod)
Sets the authentication method to be used by this service.

Parameters:
newAuthenticationMethod - java.lang.String

setAuthenticationPrincipal

public void setAuthenticationPrincipal(java.lang.Object newAuthenticationPrincipal)
Sets the authentication principal to be used by this service.

Parameters:
newAuthenticationPrincipal - java.lang.Object

setContext

public void setContext(javax.naming.directory.DirContext newContext)
Sets this service directory context object.

Parameters:
newContext - javax.naming.directory.DirContext

setProviderFactory

public void setProviderFactory(java.lang.String newSpFactory)
Sets the provider factory used by this service. This will determine the SPI for JNDI.

Parameters:
newSpFactory - java.lang.String

setProviderUrl

public void setProviderUrl(java.lang.String newProviderUrl)
Sets the address of the LDAP server this service will be communicating with.

Parameters:
newServerUrl - java.lang.String

toString

public java.lang.String toString()
Returns the string representation of this object.

Overrides:
toString in class Service
Returns:
java.lang.String

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2010