IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.services.ldap.model
Class LDAPSearchRequest

java.lang.Object
  extended by com.ibm.btt.services.ldap.model.LDAPRequest
      extended by com.ibm.btt.services.ldap.model.LDAPSearchRequest

public class LDAPSearchRequest
extends LDAPRequest

This class supports the search request to the LDAP service.


Field Summary
static int OBJECT_SCOPE
           
static int ONELEVEL_SCOPE
           
static int SUBTREE_SCOPE
           
 
Fields inherited from class com.ibm.btt.services.ldap.model.LDAPRequest
COMPID, requestType
 
Constructor Summary
LDAPSearchRequest()
          This constructor creates an LDAPSearchRequest object.
 
Method Summary
 void addAttributeToMatch(javax.naming.directory.Attribute attribute)
          Manages the list of attributes used to contruct a filter.
 void addAttributeToMatch(java.lang.String key, java.lang.Object value)
          Manages the list of attributes used to contruct a filter.
 void addAttributeToReturn(java.lang.String attributeName)
          Manages the list of attributes to return.
 void addFilterArgument(java.lang.Object argument)
          Manages the list of filter objects.
 java.lang.String getFilter()
          Returns the filter string used by this search request.
 java.lang.String getFilterExpression()
          Returns the filter expression used to carry out this search request.
 java.lang.Object[] getFilterObjects()
          Returns the filter objects used to dynamically build a filter list.
 java.lang.String getFilterType()
          Returns the type of filter in use by this request.
 boolean getFollowReferences()
          Returns the value of the flag used to determine the behaviour of the LDAP server when it encounters referrals.
 javax.naming.directory.Attributes getMatchingAttributes()
          Returns the list of attributes used to build a filter.
 long getMaxHits()
          Returns the value set for the maximum number of results to be returned in response to this search request.
 java.lang.String[] getReturningAttributes()
          Returns the list of attributes that are desired to be returned with the request's response data.
 boolean getReturnObjects()
          Returns the present value of the flag that determines whether the LDAP server will return objects as part of its response.
 javax.naming.directory.SearchControls getSearchControls()
          Returns the current search control object for this request.
 int getSearchScope()
          Returns the present value for the search scope.
 int getTimeLimit()
          Returns the present time limit set for this search request to run.
 void mapFromContext(Context context)
          Supports externalization of an LDAP search request.
static int parseSearchScope(java.lang.String scope)
          Given one of the following strings, object, subtree, onelevel, this method returns a valid search scope.
 void removeAttributeToMatch(java.lang.String key)
          Manages the list of attributes used to build a filter expression.
 void removeAttributeToReturn(java.lang.String attributeName)
          Manages the list of attributes to return.
 void removeFilterArgument(java.lang.Object argument)
          Manages the list of filter objects.
 void setFilter(java.lang.String newFilter)
          Sets the filter to use to carry out this search request.
 void setFilterExpression(java.lang.String newFilterExpression)
          Sets a filter expression for use in carrying out this search request.
 void setFilterObjects(java.lang.Object[] newFilterObjects)
          Sets an array of object for use in conjunction with a filter expression.
 void setFilterType(java.lang.String newFilterType)
          Specifies the type of filter to use for carrying out this search request.
 void setFollowReferences(boolean newFollowReferences)
          Sets the flag that controls the behaviour of the LDAP server when it encounters referrals.
 void setMatchingAttributes(javax.naming.directory.Attributes newMatchingAttributes)
          The values specified in the javax.naming.directory.Attributes object passed into this method are used to contruct a filter for carrying out this search request.
 void setMaxHits(long newMaxHits)
          Sets the maximum number of results for the LDAP server to return in response to the search request.
 void setReturningAttributes(java.lang.String[] newReturningAttributes)
          The array passed into this method should contain the names of attributes that the LDAP server should make an attempt to return.
 void setReturnObjects(boolean newReturnObjects)
          Sets a flag indicating whether the LDAP server should return directory objects along with its response data.
 void setSearchControls(javax.naming.directory.SearchControls controls)
          Sets a javax.naming.directory.SearchControls containing search parameters for this request.
 void setSearchScope(int newSearchScope)
          Sets the scope of this search.
 void setTimeLimit(int newTimeLimit)
          Sets the time limit for this search request
 
Methods inherited from class com.ibm.btt.services.ldap.model.LDAPRequest
getBooleanValue, getIntValue, getName, getRequestType, getValue, setName, setRequestType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OBJECT_SCOPE

public static final int OBJECT_SCOPE
See Also:
Constant Field Values

ONELEVEL_SCOPE

public static final int ONELEVEL_SCOPE
See Also:
Constant Field Values

SUBTREE_SCOPE

public static final int SUBTREE_SCOPE
See Also:
Constant Field Values
Constructor Detail

LDAPSearchRequest

public LDAPSearchRequest()
This constructor creates an LDAPSearchRequest object.

Method Detail

addAttributeToMatch

public void addAttributeToMatch(java.lang.String key,
                                java.lang.Object value)
Manages the list of attributes used to contruct a filter. This method adds an object to the list. It is equivalent to calling addAttributeToMatch(new Attribute(key, Object)) ;

Parameters:
key - java.lang.String
value - java.lang.Object

addAttributeToMatch

public void addAttributeToMatch(javax.naming.directory.Attribute attribute)
Manages the list of attributes used to contruct a filter. This method adds an object to the list.

Parameters:
attribute - javax.naming.directory.Attribute

addAttributeToReturn

public void addAttributeToReturn(java.lang.String attributeName)
Manages the list of attributes to return. This method adds an object to the list.

Parameters:
attributeName - java.lang.String

addFilterArgument

public void addFilterArgument(java.lang.Object argument)
Manages the list of filter objects. This method adds an object to the list.

Parameters:
argument - java.lang.Object

getFilter

public java.lang.String getFilter()
Returns the filter string used by this search request.

Returns:
java.lang.String

getFilterExpression

public java.lang.String getFilterExpression()
Returns the filter expression used to carry out this search request.

Returns:
java.lang.String

getFilterObjects

public java.lang.Object[] getFilterObjects()
Returns the filter objects used to dynamically build a filter list.

Returns:
java.lang.Object[]

getFilterType

public java.lang.String getFilterType()
Returns the type of filter in use by this request.

Returns:
java.lang.String

getFollowReferences

public boolean getFollowReferences()
Returns the value of the flag used to determine the behaviour of the LDAP server when it encounters referrals.

Returns:
boolean

getMatchingAttributes

public javax.naming.directory.Attributes getMatchingAttributes()
Returns the list of attributes used to build a filter.

Returns:
javax.naming.directory.Attributes

getMaxHits

public long getMaxHits()
Returns the value set for the maximum number of results to be returned in response to this search request.

Returns:
long

getReturningAttributes

public java.lang.String[] getReturningAttributes()
Returns the list of attributes that are desired to be returned with the request's response data.

Returns:
java.lang.String[]

getReturnObjects

public boolean getReturnObjects()
Returns the present value of the flag that determines whether the LDAP server will return objects as part of its response.

Returns:
boolean

getSearchControls

public javax.naming.directory.SearchControls getSearchControls()
Returns the current search control object for this request.

Returns:
javax.naming.directory.SearchControls

getSearchScope

public int getSearchScope()
Returns the present value for the search scope.

Returns:
int

getTimeLimit

public int getTimeLimit()
Returns the present time limit set for this search request to run. If this time limit is exceeded, then the search is terminated.

Returns:
int

mapFromContext

public void mapFromContext(Context context)
                    throws DSEException
Supports externalization of an LDAP search request. It maps external data definitions from a context into the request model.

Overrides:
mapFromContext in class LDAPRequest
Parameters:
context - com.ibm.btt.base.Context
Throws:
DSEException

parseSearchScope

public static int parseSearchScope(java.lang.String scope)
                            throws DSEException
Given one of the following strings, object, subtree, onelevel, this method returns a valid search scope. See setSearchScope().

Parameters:
scope - java.lang.String
Returns:
int
Throws:
DSEException

removeAttributeToMatch

public void removeAttributeToMatch(java.lang.String key)
Manages the list of attributes used to build a filter expression. This utility method removes an item from this list.

Parameters:
key - java.lang.String

removeAttributeToReturn

public void removeAttributeToReturn(java.lang.String attributeName)
Manages the list of attributes to return. This utility method removes an attribute from this list.

Parameters:
attributeName - java.lang.String

removeFilterArgument

public void removeFilterArgument(java.lang.Object argument)
Manages the list of filter objects. This utility method removes an object from this list.

Parameters:
argument - java.lang.Object

setFilter

public void setFilter(java.lang.String newFilter)
Sets the filter to use to carry out this search request.

Parameters:
newFilter - java.lang.String

setFilterExpression

public void setFilterExpression(java.lang.String newFilterExpression)
Sets a filter expression for use in carrying out this search request. Filter expressions are strings that are parsed by LDAP and dynamically filled with data from a list of objects. It allows filters to be built dynamically at run time.

Parameters:
newFilterExpression - java.lang.String

setFilterObjects

public void setFilterObjects(java.lang.Object[] newFilterObjects)
Sets an array of object for use in conjunction with a filter expression.

Parameters:
newFilterObjects - java.lang.Object[]

setFilterType

public void setFilterType(java.lang.String newFilterType)
Specifies the type of filter to use for carrying out this search request. It may be any one of the following values:

Parameters:
newFilterType - java.lang.String

setFollowReferences

public void setFollowReferences(boolean newFollowReferences)
Sets the flag that controls the behaviour of the LDAP server when it encounters referrals. If true, then the server will attempt to resolve referrals, and if false it will return referrals to the client. See the JDK 1.3 documentation for more details.

Parameters:
newFollowReferences - boolean

setMatchingAttributes

public void setMatchingAttributes(javax.naming.directory.Attributes newMatchingAttributes)
The values specified in the javax.naming.directory.Attributes object passed into this method are used to contruct a filter for carrying out this search request.

Parameters:
newMatchingAttributes - javax.naming.directory.Attributes

setMaxHits

public void setMaxHits(long newMaxHits)
Sets the maximum number of results for the LDAP server to return in response to the search request.

Parameters:
newMaxHits - long

setReturningAttributes

public void setReturningAttributes(java.lang.String[] newReturningAttributes)
The array passed into this method should contain the names of attributes that the LDAP server should make an attempt to return. The protocol does not garauntee that the attributes returned by the server will have the same names as supplied in this array.

Parameters:
newReturningAttributes - java.lang.String[]

setReturnObjects

public void setReturnObjects(boolean newReturnObjects)
Sets a flag indicating whether the LDAP server should return directory objects along with its response data. The default behaviour is to not return objects.

Parameters:
newReturnObjects - boolean

setSearchControls

public void setSearchControls(javax.naming.directory.SearchControls controls)
Sets a javax.naming.directory.SearchControls containing search parameters for this request.

Parameters:
controls - javax.naming.directory.SearchControls

setSearchScope

public void setSearchScope(int newSearchScope)
Sets the scope of this search. Refer to JDK 1.3 documentation on javax.naming.directory.SearchControls for more information on these scopes. They are SearchControls.OBJECT_SCOPE SearchControls.ONELEVEL_SCOPE SearchControls.SUBTREE_SCOPE This value determines the depth in the DIT that this search will be retricted to.

Parameters:
newSearchScope - int

setTimeLimit

public void setTimeLimit(int newTimeLimit)
Sets the time limit for this search request

Parameters:
newTimeLimit - int

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2009