SHOW Signed

net.rim.device.api.ldap
Class LDAPQuery

java.lang.Object
  |
  +--net.rim.device.api.ldap.LDAPQuery

public class LDAPQuery
extends Object

Contains the functionality for performing LDAP queries.

Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

Since:
JDE 4.0.0
See Also:
LDAPEntry, LDAPAttribute

Field Summary
 Category: Signed static int LDAP_AUTH_ANONYMOUS
           
 Category: Signed static int LDAP_AUTH_SIMPLE
           
 Category: Signed static int LDAP_ERROR_ATTRIBUTE_IN_USE_EXCEPTION
           
 Category: Signed static int LDAP_ERROR_ATTRIBUTE_MODIFICATION_EXCEPTION
           
 Category: Signed static int LDAP_ERROR_AUTHENTICATION_EXCEPTION
           
 Category: Signed static int LDAP_ERROR_AUTHENTICATION_NOT_SUPPORTED_EXCEPTION
           
 Category: Signed static int LDAP_ERROR_CANNOT_PROCEED_EXCEPTION
           
 Category: Signed static int LDAP_ERROR_COMMUNICATION_EXCEPTION
           
 Category: Signed static int LDAP_ERROR_CONFIGURATION_EXCEPTION
           
 Category: Signed static int LDAP_ERROR_CONTEXT_NOT_EMPTY_EXCEPTION
           
 Category: Signed static int LDAP_ERROR_INSUFFICIENT_RESOURCES_EXCEPTION
           
 Category: Signed static int LDAP_ERROR_INTERNAL_PROXY_PROVIDER_ERROR
           
 Category: Signed static int LDAP_ERROR_INTERRUPTED_NAMING_EXCEPTION
           
 Category: Signed static int LDAP_ERROR_INVALID_ATTRIBUTE_IDENTIFIER_EXCEPTION
           
 Category: Signed static int LDAP_ERROR_INVALID_ATTRIBUTE_VALUE_EXCEPTION
           
 Category: Signed static int LDAP_ERROR_INVALID_ATTRIBUTES_EXCEPTION
           
 Category: Signed static int LDAP_ERROR_INVALID_NAME_EXCEPTION
           
 Category: Signed static int LDAP_ERROR_INVALID_SCOPE_SYNTAX
           
 Category: Signed static int LDAP_ERROR_INVALID_SEARCH_CONTROLS_EXCEPTION
           
 Category: Signed static int LDAP_ERROR_INVALID_SEARCH_FILTER_EXCEPTION
           
 Category: Signed static int LDAP_ERROR_LIMIT_EXCEEDED_EXCEPTION
           
 Category: Signed static int LDAP_ERROR_LINK_EXCEPTION
           
 Category: Signed static int LDAP_ERROR_NAME_ALREADY_BOUND_EXCEPTION
           
 Category: Signed static int LDAP_ERROR_NAME_NOT_FOUND_EXCEPTION
           
 Category: Signed static int LDAP_ERROR_NAMING_SECURITY_EXCEPTION
           
 Category: Signed static int LDAP_ERROR_NO_DEFAULT_SERVER
           
 Category: Signed static int LDAP_ERROR_NO_INITIAL_CONTEXT_EXCEPTION
           
 Category: Signed static int LDAP_ERROR_NO_PERMISSION_EXCEPTION
           
 Category: Signed static int LDAP_ERROR_NO_SERVICE_BOOK_EXCEPTION
           
 Category: Signed static int LDAP_ERROR_NO_SUCH_ATTRIBUTE_EXCEPTION
           
 Category: Signed static int LDAP_ERROR_NOT_CONTEXT_EXCEPTION
           
 Category: Signed static int LDAP_ERROR_OPERATION_NOT_SUPPORTED_EXCEPTION
           
 Category: Signed static int LDAP_ERROR_PARTIAL_RESULT_EXCEPTION
           
 Category: Signed static int LDAP_ERROR_RADIO_IS_OFF
           
 Category: Signed static int LDAP_ERROR_REFERRAL_EXCEPTION
           
 Category: Signed static int LDAP_ERROR_SCHEMA_VIOLATION_EXCEPTION
           
 Category: Signed static int LDAP_ERROR_SERVICE_UNAVAILABLE_EXCEPTION
           
 Category: Signed static int LDAP_ERROR_TIMEOUT
           
 Category: Signed static int LDAP_ERROR_UNKNOWN
           
 Category: Signed static int LDAP_SCOPE_BASE
           
 Category: Signed static int LDAP_SCOPE_ONE
           
 Category: Signed static int LDAP_SCOPE_SUB
           
 Category: Signed static int LDAP_SUCCESS
           
 
Constructor Summary
 Category: Signed LDAPQuery()
          Creates an LDAPQuery object.
 Category: Signed LDAPQuery(LDAPListener listener)
          Creates an LDAPQuery object.
 Category: Signed LDAPQuery(String url)
          Creates an LDAPQuery object.
 Category: Signed LDAPQuery(String url, LDAPListener listener)
          Creates an LDAPQuery object.
 
Method Summary
 Category: Signed  void abort()
          Aborts the current query (if a query is currently running).
 Category: Signed  void addAttribute(String oid)
          Request that the server return a specific attribute.
 Category: Signed  void addFilter(String filter)
          Adds a filter to the query.
 Category: Signed  void addFilter(String oid, String value)
          Adds a filter to the query.
 Category: Signed  void addListener(LDAPListener listener)
          Adds a LDAP listener to this query.
 Category: Signed  LDAPEntry getEntry(int index)
          Returns the indexed LDAPEntry.
 Category: Signed  int getErrorCode()
          Returns the error code describing any error that might have occurred during processing of the query.
 Category: Signed  String getErrorMsg()
          Returns a string describing any error that might have occurred during processing of the query.
 Category: Signed  Enumeration getResults()
          Performs a blocking fetch to retrieve all of the results from the constructed LDAPQuery.
 Category: Signed  int getResultSize()
          Returns the number of results recieved from the query.
 Category: Signed  boolean isRunning()
          Checks to see if the query has been started.
 Category: Signed  void removeListener(LDAPListener listener)
          Removes the LDAP listener from this query.
 Category: Signed  void setAuthType(int authType)
          Sets the type of authentication that should be used during this query.
 Category: Signed  void setHost(String server, int port, String baseQuery)
          This method determines which LDAP directory will be queried for the information requested.
 Category: Signed  void setScope(int scope)
          Sets the scope of the query to perform.
 Category: Signed  void start()
          Starts the query.
 Category: Signed  String toString()
          Returns a string representation of the URL describing the query.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LDAP_SUCCESS

public static final int LDAP_SUCCESS
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

LDAP_ERROR_UNKNOWN

public static final int LDAP_ERROR_UNKNOWN
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

LDAP_ERROR_INVALID_SCOPE_SYNTAX

public static final int LDAP_ERROR_INVALID_SCOPE_SYNTAX
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

LDAP_ERROR_NO_SERVICE_BOOK_EXCEPTION

public static final int LDAP_ERROR_NO_SERVICE_BOOK_EXCEPTION
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

LDAP_ERROR_TIMEOUT

public static final int LDAP_ERROR_TIMEOUT
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

LDAP_ERROR_RADIO_IS_OFF

public static final int LDAP_ERROR_RADIO_IS_OFF
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

LDAP_ERROR_ATTRIBUTE_IN_USE_EXCEPTION

public static final int LDAP_ERROR_ATTRIBUTE_IN_USE_EXCEPTION
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

LDAP_ERROR_ATTRIBUTE_MODIFICATION_EXCEPTION

public static final int LDAP_ERROR_ATTRIBUTE_MODIFICATION_EXCEPTION
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

LDAP_ERROR_CANNOT_PROCEED_EXCEPTION

public static final int LDAP_ERROR_CANNOT_PROCEED_EXCEPTION
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

LDAP_ERROR_COMMUNICATION_EXCEPTION

public static final int LDAP_ERROR_COMMUNICATION_EXCEPTION
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

LDAP_ERROR_CONFIGURATION_EXCEPTION

public static final int LDAP_ERROR_CONFIGURATION_EXCEPTION
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

LDAP_ERROR_CONTEXT_NOT_EMPTY_EXCEPTION

public static final int LDAP_ERROR_CONTEXT_NOT_EMPTY_EXCEPTION
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

LDAP_ERROR_INSUFFICIENT_RESOURCES_EXCEPTION

public static final int LDAP_ERROR_INSUFFICIENT_RESOURCES_EXCEPTION
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

LDAP_ERROR_INTERRUPTED_NAMING_EXCEPTION

public static final int LDAP_ERROR_INTERRUPTED_NAMING_EXCEPTION
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

LDAP_ERROR_INVALID_ATTRIBUTE_IDENTIFIER_EXCEPTION

public static final int LDAP_ERROR_INVALID_ATTRIBUTE_IDENTIFIER_EXCEPTION
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

LDAP_ERROR_INVALID_ATTRIBUTES_EXCEPTION

public static final int LDAP_ERROR_INVALID_ATTRIBUTES_EXCEPTION
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

LDAP_ERROR_INVALID_ATTRIBUTE_VALUE_EXCEPTION

public static final int LDAP_ERROR_INVALID_ATTRIBUTE_VALUE_EXCEPTION
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

LDAP_ERROR_INVALID_NAME_EXCEPTION

public static final int LDAP_ERROR_INVALID_NAME_EXCEPTION
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

LDAP_ERROR_INVALID_SEARCH_CONTROLS_EXCEPTION

public static final int LDAP_ERROR_INVALID_SEARCH_CONTROLS_EXCEPTION
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

LDAP_ERROR_INVALID_SEARCH_FILTER_EXCEPTION

public static final int LDAP_ERROR_INVALID_SEARCH_FILTER_EXCEPTION
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

LDAP_ERROR_LIMIT_EXCEEDED_EXCEPTION

public static final int LDAP_ERROR_LIMIT_EXCEEDED_EXCEPTION
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

LDAP_ERROR_LINK_EXCEPTION

public static final int LDAP_ERROR_LINK_EXCEPTION
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

LDAP_ERROR_NAME_ALREADY_BOUND_EXCEPTION

public static final int LDAP_ERROR_NAME_ALREADY_BOUND_EXCEPTION
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

LDAP_ERROR_NAME_NOT_FOUND_EXCEPTION

public static final int LDAP_ERROR_NAME_NOT_FOUND_EXCEPTION
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

LDAP_ERROR_NAMING_SECURITY_EXCEPTION

public static final int LDAP_ERROR_NAMING_SECURITY_EXCEPTION
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

LDAP_ERROR_NO_INITIAL_CONTEXT_EXCEPTION

public static final int LDAP_ERROR_NO_INITIAL_CONTEXT_EXCEPTION
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

LDAP_ERROR_NO_SUCH_ATTRIBUTE_EXCEPTION

public static final int LDAP_ERROR_NO_SUCH_ATTRIBUTE_EXCEPTION
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

LDAP_ERROR_NOT_CONTEXT_EXCEPTION

public static final int LDAP_ERROR_NOT_CONTEXT_EXCEPTION
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

LDAP_ERROR_OPERATION_NOT_SUPPORTED_EXCEPTION

public static final int LDAP_ERROR_OPERATION_NOT_SUPPORTED_EXCEPTION
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

LDAP_ERROR_PARTIAL_RESULT_EXCEPTION

public static final int LDAP_ERROR_PARTIAL_RESULT_EXCEPTION
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

LDAP_ERROR_REFERRAL_EXCEPTION

public static final int LDAP_ERROR_REFERRAL_EXCEPTION
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

LDAP_ERROR_SCHEMA_VIOLATION_EXCEPTION

public static final int LDAP_ERROR_SCHEMA_VIOLATION_EXCEPTION
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

LDAP_ERROR_SERVICE_UNAVAILABLE_EXCEPTION

public static final int LDAP_ERROR_SERVICE_UNAVAILABLE_EXCEPTION
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

LDAP_ERROR_INTERNAL_PROXY_PROVIDER_ERROR

public static final int LDAP_ERROR_INTERNAL_PROXY_PROVIDER_ERROR
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

LDAP_ERROR_AUTHENTICATION_EXCEPTION

public static final int LDAP_ERROR_AUTHENTICATION_EXCEPTION
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

LDAP_ERROR_AUTHENTICATION_NOT_SUPPORTED_EXCEPTION

public static final int LDAP_ERROR_AUTHENTICATION_NOT_SUPPORTED_EXCEPTION
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

LDAP_ERROR_NO_PERMISSION_EXCEPTION

public static final int LDAP_ERROR_NO_PERMISSION_EXCEPTION
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

LDAP_ERROR_NO_DEFAULT_SERVER

public static final int LDAP_ERROR_NO_DEFAULT_SERVER
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

LDAP_SCOPE_BASE

public static final int LDAP_SCOPE_BASE
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

LDAP_SCOPE_ONE

public static final int LDAP_SCOPE_ONE
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

LDAP_SCOPE_SUB

public static final int LDAP_SCOPE_SUB
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

LDAP_AUTH_ANONYMOUS

public static final int LDAP_AUTH_ANONYMOUS
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

LDAP_AUTH_SIMPLE

public static final int LDAP_AUTH_SIMPLE
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
Constructor Detail

LDAPQuery

public LDAPQuery()
Creates an LDAPQuery object.
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

LDAPQuery

public LDAPQuery(String url)
Creates an LDAPQuery object.

Parameters:
url - The url of the query to perform
Throws:
IllegalArgumentException - if the url is empty or improperly formatted
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

LDAPQuery

public LDAPQuery(LDAPListener listener)
Creates an LDAPQuery object.

This constructor accepts the LDAPListener interface as a parameter.

Parameters:
listener - The LDAP listener object used to monitor messages.
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

LDAPQuery

public LDAPQuery(String url,
                 LDAPListener listener)
Creates an LDAPQuery object.

Parameters:
url - The url of the query to perform
listener - The LDAP listener object used to monitor messages.
Throws:
IllegalArgumentException - if the url is empty or improperly formatted
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
Method Detail

setHost

public void setHost(String server,
                    int port,
                    String baseQuery)
             throws LDAPInvalidOperationException,
                    LDAPBadSyntaxException
This method determines which LDAP directory will be queried for the information requested. Additionally, a specific subtree can be searched by specifing the subtree as the baseQuery parameter.

If this method is not called prior to starting the query then the MDS will substitute the administrator configured default values.

Parameters:
server - The hostname or IP Address of the server to query.
port - The port number that the LDAP server is listening on. (Default LDAP port is normally 389)
baseQuery - The base query for the searchspace.
Throws:
LDAPInvalidOperationException - Thrown if an LDAP query using the current object is already running.
LDAPBadSyntaxException - Thrown if any of the parameters contains invalid characters.
Since:
JDE 4.0.2
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

setScope

public void setScope(int scope)
              throws IllegalArgumentException,
                     LDAPInvalidOperationException
Sets the scope of the query to perform.

If this method is not called prior to starting the query then the scope of the query will default to "LDAP_SCOPE_BASE".

Parameters:
scope - The scope of the query to perform.
Throws:
LDAPInvalidOperationException - Thrown if an LDAP query using the current object is already running.
LDAPBadSyntaxException - Thrown if the scope parameter is not one of: "LDAP_SCOPE_BASE", "LDAP_SCOPE_ONE", "LDAP_SCOPE_SUB"
Since:
JDE 4.0.2
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

setAuthType

public void setAuthType(int authType)
                 throws IllegalArgumentException,
                        LDAPInvalidOperationException
Sets the type of authentication that should be used during this query.
Parameters:
authType - the authentication type that is to be used for this connection. Currently, the LDAP API only supports SIMPLE authentication.
Throws:
LDAPInvalidOperationException - when the authType is an invalid authentication type.
Since:
JDE 4.0.2
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

toString

public String toString()
Returns a string representation of the URL describing the query.

Overrides:
toString in class Object
Returns:
The URL describing the query
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

addListener

public void addListener(LDAPListener listener)
Adds a LDAP listener to this query.

Parameters:
listener - LDAP listener to register for this query.
Since:
JDE 4.0.2
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

removeListener

public void removeListener(LDAPListener listener)
Removes the LDAP listener from this query.

Parameters:
listener - LDAP listener to remove from this query.
Since:
JDE 4.0.2
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

addFilter

public void addFilter(String oid,
                      String value)
               throws LDAPInvalidOperationException,
                      LDAPBadSyntaxException
Adds a filter to the query.

A filter is used to restrict the output from the query. A filter is comprised of an OID and value pair with optional wildcard '*'.

For example: - 'addFilter("givenname","Bob")' would return all the entries who's first name is 'Bob' - 'addFilter("givenname","Bo*")' would return all the entries who's first name starts with 'Bo' - 'addFilter("givenname","*o*")' would return all the entries who's first name contains an 'o' - 'addFilter("givenname","*")' would return all the entries who have a first name - 'addFilter("givenname","Bob;Alice;Dick")' would return all the entries who have a first name of Bob, Alice or Dick

Note: all filters added are joined together with an AND.

Parameters:
oid - The String representation of the new filter's oid. Must not be empty or null.
value - The value of the requested oid. Must not be null. Multiple values may be separated by ';'
Throws:
LDAPInvalidOperationException - Thrown if an LDAP query using the current object is already running.
LDAPBadSyntaxException - Thrown if any of the parameters contains invalid characters.
IllegalArgumentException - if either of the parameters are null or if oid is empty
Since:
JDE 4.0.2
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

addFilter

public void addFilter(String filter)
               throws LDAPInvalidOperationException,
                      LDAPBadSyntaxException
Adds a filter to the query.

A filter is used to restrict the output from the query. A filter is comprised of an OID and value pair with optional wildcard '*'. More complex filters can be specified using compound statements. A compound filter is combined with either a '&' (Logical AND) and '|' (Logical OR). An example of a compound filter is: '(&(givenname=Bob)(sn=Smith))'

Examples of filters are: - 'addFilter("(givenname=Bob)")' would return all the entries who's first name is 'Bob' - 'addFilter("(givenname=Bo*)")' would return all the entries who's first name starts with 'Bo' - 'addFilter("(givenname=*o*)")' would return all the entries who's first name contains an 'o' - 'addFilter("(givenname=*)")' would return all the entries who have a first name Examples of compound filters are: - 'addFilter("(|(givenname=Bob)(givenname=Ted))")' would return all the entries who's first name is 'Bob' or 'Ted' - 'addFilter("(&(givenname=Bob)(sn=Smith))")' would return all the entries who's first name is 'Bob' and last name is 'Smith'

Note: all filters added are joined together with an AND. Note: all filters must be contained by opening and closing round braces. See examples above.

Parameters:
filter - The String represenation of the filter to add.
Throws:
LDAPInvalidOperationException - Thrown if an LDAP query using the current object is already running.
LDAPBadSyntaxException - Thrown if any of the parameters contains invalid characters.
IllegalArgumentException - Thrown if the filter is null or invalid.
Since:
JDE 4.0.2
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

addAttribute

public void addAttribute(String oid)
                  throws LDAPInvalidOperationException,
                         LDAPBadSyntaxException
Request that the server return a specific attribute.

If this method is not called to specify the attributes to return, then all attributes will be returned. NOTE: May be called multiple times.

Parameters:
oid - The String representation of the oid to request.
Throws:
LDAPInvalidOperationException - Thrown if an LDAP query using the current object is already running.
LDAPBadSyntaxException - Thrown if the parameter contains invalid characters.
IllegalArgumentException - Thrown if the parameter is null
Since:
JDE 4.0.2
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

getEntry

public LDAPEntry getEntry(int index)
Returns the indexed LDAPEntry.

This method blocks if the specified entry has not been recieved yet.

Parameters:
index - The entry to retrieve.
Returns:
The requested entry or null if there is no such entry or the query is interrupted.
Since:
JDE 4.0.2
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

isRunning

public boolean isRunning()
Checks to see if the query has been started.

Returns:
True if the query is currently running.
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

start

public void start()
           throws LDAPInvalidOperationException
Starts the query.

This method actually begins the query.

Throws:
LDAPInvalidOperationException - Thrown if an LDAP query using the current object is already running.
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

abort

public void abort()
Aborts the current query (if a query is currently running).
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

getResultSize

public int getResultSize()
Returns the number of results recieved from the query.

Returns:
-1 if the query either hasn't been started or was aborted
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

getErrorCode

public int getErrorCode()
Returns the error code describing any error that might have occurred during processing of the query. If no error code ocurred during this query then this method will return LDAPQuery.LDAP_SUCCESS.
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

getErrorMsg

public String getErrorMsg()
Returns a string describing any error that might have occurred during processing of the query. This method may return null if no error message was available.
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

getResults

public Enumeration getResults()
Performs a blocking fetch to retrieve all of the results from the constructed LDAPQuery. This method will not return until all results have been retrieved.

Note: This method will return an empty Enumeration if query has not yet been started or was aborted.

Returns:
an Enumeration of LDAPEntry objects.
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.


Copyright 1999-2004 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.