net.rim.device.api.ldap
Class LDAPQuery

java.lang.Object
  extended by net.rim.device.api.ldap.LDAPQuery

public class LDAPQuery
extends Object

Contains the functionality for performing LDAP queries.

See Also:
LDAPEntry, LDAPAttribute
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

Field Summary
Category: Signed static int LDAP_AUTH_ANONYMOUS
          Value that represents LDAP "anonymous" authentication mode.
Category: Signed static int LDAP_AUTH_SIMPLE
          Value that represents LDAP "simple" authentication mode.
Category: Signed static int LDAP_CONN_DEFAULT
          Value that represents a "default" LDAP connection type.
Category: Signed static int LDAP_CONN_SSL_OR_TLS
          Value that represents an "SSL or TLS" LDAP connection type.
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_BAD_DEFAULT_AUTHENTICATION_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_ATTRIBUTES_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_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_NOT_CONTEXT_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_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_SSL_HANDSHAKE_EXCEPTION
           
Category: Signed static int LDAP_ERROR_TIMEOUT
           
Category: Signed static int LDAP_ERROR_UNKNOWN
           
Category: Signed static int LDAP_SCOPE_BASE
          Value that represents LDAP search scope of "base".
Category: Signed static int LDAP_SCOPE_ONE
          Value that represents LDAP search scope of "one".
Category: Signed static int LDAP_SCOPE_SUB
          Value that represents LDAP search scope of "subtree".
Category: Signed static int LDAP_SUCCESS
           
 
Constructor Summary
Category: Signed LDAPQuery()
          Creates an LDAPQuery object.
Category: Signed LDAPQuery(String url)
          Creates an LDAPQuery object.
Category: Signed LDAPQuery(String url, LDAPListener listener)
          Creates an LDAPQuery object.
Category: Signed LDAPQuery(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)
          Adds an attribute to the list of attributes that will be requested to be returned from the server.
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 an 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  int getResultSize()
          Returns the number of results received from the query.
Category: Signed  Enumeration getResults()
          Performs a blocking fetch to retrieve all of the results.
Category: Signed  boolean isRunning()
          Checks to see if the query has been started.
Category: Signed  void removeListener(LDAPListener listener)
          Removes an 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 setConnectionType(int connectionType)
          Sets the type of connection that should be used during this query.
Category: Signed  void setHost(String inServer, int port, String inBaseQuery)
          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
See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

LDAP_ERROR_UNKNOWN

public static final int LDAP_ERROR_UNKNOWN
See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

LDAP_ERROR_INVALID_SCOPE_SYNTAX

public static final int LDAP_ERROR_INVALID_SCOPE_SYNTAX
See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

LDAP_ERROR_NO_SERVICE_BOOK_EXCEPTION

public static final int LDAP_ERROR_NO_SERVICE_BOOK_EXCEPTION
See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

LDAP_ERROR_TIMEOUT

public static final int LDAP_ERROR_TIMEOUT
See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

LDAP_ERROR_RADIO_IS_OFF

public static final int LDAP_ERROR_RADIO_IS_OFF
See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

LDAP_ERROR_ATTRIBUTE_IN_USE_EXCEPTION

public static final int LDAP_ERROR_ATTRIBUTE_IN_USE_EXCEPTION
See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

LDAP_ERROR_ATTRIBUTE_MODIFICATION_EXCEPTION

public static final int LDAP_ERROR_ATTRIBUTE_MODIFICATION_EXCEPTION
See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

LDAP_ERROR_CANNOT_PROCEED_EXCEPTION

public static final int LDAP_ERROR_CANNOT_PROCEED_EXCEPTION
See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

LDAP_ERROR_COMMUNICATION_EXCEPTION

public static final int LDAP_ERROR_COMMUNICATION_EXCEPTION
See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

LDAP_ERROR_CONFIGURATION_EXCEPTION

public static final int LDAP_ERROR_CONFIGURATION_EXCEPTION
See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

LDAP_ERROR_CONTEXT_NOT_EMPTY_EXCEPTION

public static final int LDAP_ERROR_CONTEXT_NOT_EMPTY_EXCEPTION
See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

LDAP_ERROR_INSUFFICIENT_RESOURCES_EXCEPTION

public static final int LDAP_ERROR_INSUFFICIENT_RESOURCES_EXCEPTION
See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

LDAP_ERROR_INTERRUPTED_NAMING_EXCEPTION

public static final int LDAP_ERROR_INTERRUPTED_NAMING_EXCEPTION
See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

LDAP_ERROR_INVALID_ATTRIBUTE_IDENTIFIER_EXCEPTION

public static final int LDAP_ERROR_INVALID_ATTRIBUTE_IDENTIFIER_EXCEPTION
See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

LDAP_ERROR_INVALID_ATTRIBUTES_EXCEPTION

public static final int LDAP_ERROR_INVALID_ATTRIBUTES_EXCEPTION
See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

LDAP_ERROR_INVALID_ATTRIBUTE_VALUE_EXCEPTION

public static final int LDAP_ERROR_INVALID_ATTRIBUTE_VALUE_EXCEPTION
See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

LDAP_ERROR_INVALID_NAME_EXCEPTION

public static final int LDAP_ERROR_INVALID_NAME_EXCEPTION
See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

LDAP_ERROR_INVALID_SEARCH_CONTROLS_EXCEPTION

public static final int LDAP_ERROR_INVALID_SEARCH_CONTROLS_EXCEPTION
See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

LDAP_ERROR_INVALID_SEARCH_FILTER_EXCEPTION

public static final int LDAP_ERROR_INVALID_SEARCH_FILTER_EXCEPTION
See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

LDAP_ERROR_LIMIT_EXCEEDED_EXCEPTION

public static final int LDAP_ERROR_LIMIT_EXCEEDED_EXCEPTION
See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

LDAP_ERROR_LINK_EXCEPTION

public static final int LDAP_ERROR_LINK_EXCEPTION
See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

LDAP_ERROR_NAME_ALREADY_BOUND_EXCEPTION

public static final int LDAP_ERROR_NAME_ALREADY_BOUND_EXCEPTION
See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

LDAP_ERROR_NAME_NOT_FOUND_EXCEPTION

public static final int LDAP_ERROR_NAME_NOT_FOUND_EXCEPTION
See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

LDAP_ERROR_NAMING_SECURITY_EXCEPTION

public static final int LDAP_ERROR_NAMING_SECURITY_EXCEPTION
See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

LDAP_ERROR_NO_INITIAL_CONTEXT_EXCEPTION

public static final int LDAP_ERROR_NO_INITIAL_CONTEXT_EXCEPTION
See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

LDAP_ERROR_NO_SUCH_ATTRIBUTE_EXCEPTION

public static final int LDAP_ERROR_NO_SUCH_ATTRIBUTE_EXCEPTION
See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

LDAP_ERROR_NOT_CONTEXT_EXCEPTION

public static final int LDAP_ERROR_NOT_CONTEXT_EXCEPTION
See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

LDAP_ERROR_OPERATION_NOT_SUPPORTED_EXCEPTION

public static final int LDAP_ERROR_OPERATION_NOT_SUPPORTED_EXCEPTION
See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

LDAP_ERROR_PARTIAL_RESULT_EXCEPTION

public static final int LDAP_ERROR_PARTIAL_RESULT_EXCEPTION
See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

LDAP_ERROR_REFERRAL_EXCEPTION

public static final int LDAP_ERROR_REFERRAL_EXCEPTION
See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

LDAP_ERROR_SCHEMA_VIOLATION_EXCEPTION

public static final int LDAP_ERROR_SCHEMA_VIOLATION_EXCEPTION
See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

LDAP_ERROR_SERVICE_UNAVAILABLE_EXCEPTION

public static final int LDAP_ERROR_SERVICE_UNAVAILABLE_EXCEPTION
See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

LDAP_ERROR_INTERNAL_PROXY_PROVIDER_ERROR

public static final int LDAP_ERROR_INTERNAL_PROXY_PROVIDER_ERROR
See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

LDAP_ERROR_AUTHENTICATION_EXCEPTION

public static final int LDAP_ERROR_AUTHENTICATION_EXCEPTION
See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

LDAP_ERROR_AUTHENTICATION_NOT_SUPPORTED_EXCEPTION

public static final int LDAP_ERROR_AUTHENTICATION_NOT_SUPPORTED_EXCEPTION
See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

LDAP_ERROR_NO_PERMISSION_EXCEPTION

public static final int LDAP_ERROR_NO_PERMISSION_EXCEPTION
See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

LDAP_ERROR_NO_DEFAULT_SERVER

public static final int LDAP_ERROR_NO_DEFAULT_SERVER
See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

LDAP_ERROR_BAD_DEFAULT_AUTHENTICATION_EXCEPTION

public static final int LDAP_ERROR_BAD_DEFAULT_AUTHENTICATION_EXCEPTION
See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.3.0

LDAP_ERROR_SSL_HANDSHAKE_EXCEPTION

public static final int LDAP_ERROR_SSL_HANDSHAKE_EXCEPTION
See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.3.0

LDAP_SCOPE_BASE

public static final int LDAP_SCOPE_BASE
Value that represents LDAP search scope of "base". This search scope only returns the entry at the base DN, yielding at most one returned result. Zero results will be returned if the single LDAP entry does not match the search criteria.

See Also:
LDAPQuery.setScope(int), Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

LDAP_SCOPE_ONE

public static final int LDAP_SCOPE_ONE
Value that represents LDAP search scope of "one". This search scope searches exactly one level below the base DN. Notably, this does NOT include the base DN itself nor any entries two or more levels below it.

See Also:
LDAPQuery.setScope(int), Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

LDAP_SCOPE_SUB

public static final int LDAP_SCOPE_SUB
Value that represents LDAP search scope of "subtree". This search scope searches the base DN and all levels below it.

See Also:
LDAPQuery.setScope(int), Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

LDAP_AUTH_ANONYMOUS

public static final int LDAP_AUTH_ANONYMOUS
Value that represents LDAP "anonymous" authentication mode. See section 4.2.2 of RFC2251 (Lightweight Directory Access Protocol (v3)) for details about LDAP authentication modes.

See Also:
LDAPQuery.setAuthType(int), Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

LDAP_AUTH_SIMPLE

public static final int LDAP_AUTH_SIMPLE
Value that represents LDAP "simple" authentication mode. Note that in this authentication mode passwords are transmitted in cleartext. See section 4.2.2 of RFC2251 (Lightweight Directory Access Protocol (v3)) for details about LDAP authentication modes.

See Also:
LDAPQuery.setAuthType(int), Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

LDAP_CONN_DEFAULT

public static final int LDAP_CONN_DEFAULT
Value that represents a "default" LDAP connection type.

See Also:
LDAPQuery.setConnectionType(int), Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.3.0

LDAP_CONN_SSL_OR_TLS

public static final int LDAP_CONN_SSL_OR_TLS
Value that represents an "SSL or TLS" LDAP connection type. This causes the connection to use the "ldaps" protocol and the URL used by this object will begin with "ldaps://". The default port for this protocol is 636. Note that the usage of ldaps was deprecated along with LDAPv2. Also, note that ldaps was never formally specified.

See Also:
LDAPQuery.setConnectionType(int), Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.3.0


Constructor Detail

LDAPQuery

public LDAPQuery()
Creates an LDAPQuery object. The parameters of the query must be specified by invoking the addXXX() and setXXX() methods of this object.

Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

LDAPQuery

public LDAPQuery(String url)
Creates an LDAPQuery object.

Parameters:
url - The url of the query to perform; if non-null then this query will be executed by this object and may not be modified by any of the query-modifying methods (for example LDAPQuery.addAttribute(String) and LDAPQuery.setHost(String, int, String)); the value of this string should conform to RFC2255 (The LDAP URL Format).
Throws:
IllegalArgumentException - if the url is empty or improperly formatted
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

LDAPQuery

public LDAPQuery(LDAPListener listener)
Creates an LDAPQuery object.

The parameters of the query must be specified by invoking the addXXX() and setXXX() methods of this object.

Parameters:
listener - An LDAPListener object that will be added to this object's list of listeners; this can also be done after object creation using LDAPQuery.addListener(LDAPListener); may be null in which case no listener will be added.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

LDAPQuery

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

Parameters:
url - The url of the query to perform; if non-null then this query will be executed by this object and may not be modified by any of the query-modifying methods (for example LDAPQuery.addAttribute(String) and LDAPQuery.setHost(String, int, String)); the value of this string should conform to RFC2255 (The LDAP URL Format).
listener - An LDAPListener object that will be added to this object's list of listeners; this can also be done after object creation using LDAPQuery.addListener(LDAPListener); may be null in which case no listener will be added.
Throws:
IllegalArgumentException - if the url is empty or improperly formatted
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0


Method Detail

setHost

public void setHost(String inServer,
                    int port,
                    String inBaseQuery)
             throws LDAPInvalidOperationException,
                    LDAPBadSyntaxException
This method determines which LDAP directory will be queried for the information requested. Additionally, a specific subtree can be searched by specifying 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 search space.
Throws:
LDAPInvalidOperationException - Thrown if an LDAP query using the current object is already running or if a non-null URL was specified to the constructor.
LDAPBadSyntaxException - Thrown if any of the parameters is null or contains invalid characters.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

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 LDAPQuery.LDAP_SCOPE_BASE.

The scope parameter must be equal to one of the LDAP_SCOPE_ constants defined in this class. Examples include LDAPQuery.LDAP_SCOPE_BASE, LDAPQuery.LDAP_SCOPE_ONE, and LDAPQuery.LDAP_SCOPE_SUB.

Parameters:
scope - The scope of the query to perform.
Throws:
LDAPInvalidOperationException - Thrown if an LDAP query using the current object is already running or if a non-null URL was specified to the constructor.
IllegalArgumentException - if scope is not valid, as defined above.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

setAuthType

public void setAuthType(int authType)
                 throws IllegalArgumentException,
                        LDAPInvalidOperationException
Sets the type of authentication that should be used during this query.

The authType parameter must be equal to one of the LDAP_AUTH_ constants defined in this class. Examples include LDAPQuery.LDAP_AUTH_SIMPLE and LDAPQuery.LDAP_AUTH_ANONYMOUS.

Parameters:
authType - the authentication type that is to be used for this connection.
Throws:
LDAPInvalidOperationException - if authType is not valid, as defined above.
IllegalArgumentException
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

setConnectionType

public void setConnectionType(int connectionType)
                       throws IllegalArgumentException,
                              LDAPInvalidOperationException
Sets the type of connection that should be used during this query.

The connectionType parameter must be equal to one of the LDAP_CONN_ constants defined in this class. Examples include LDAPQuery.LDAP_CONN_DEFAULT and LDAPQuery.LDAP_CONN_SSL_OR_TLS.

Parameters:
connectionType - the connection type that is to be used.
Throws:
LDAPInvalidOperationException - if connectionType is not valid, as defined above.
IllegalArgumentException
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.3.0

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
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

addListener

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

See ListenerUtilities.addListener(Object[], Object) for detailed behavior.

Parameters:
listener - LDAP listener to register for this query.
Throws:
NullPointerException - if listener is null.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

removeListener

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

See ListenerUtilities.removeListener(Object[], Object) for detailed behavior.

Parameters:
listener - LDAP listener to remove from this query; if null or a listener that is not currently registered with this object then this method does nothing.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

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:

For more information see RFC2255 (The LDAP URL Format), RFC2251 (Lightweight Directory Access Protocol (v3)), and RFC2254 (The String Representation of LDAP Search Filters).

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 or if a non-null URL was specified to the constructor.
LDAPBadSyntaxException - Thrown if any of the parameters contains invalid characters.
IllegalArgumentException - if either of the parameters are null or if oid is empty
See Also:
LDAPQuery.addFilter(String)
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

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 an '&' (Logical AND) or a '|' (Logical OR). An example of a compound filter is: '(&(givenname=Bob)(sn=Smith))'

Examples of filters are:

Examples of compound filters are:

For more information see RFC2255 (The LDAP URL Format), RFC2251 (Lightweight Directory Access Protocol (v3)), and RFC2254 (The String Representation of LDAP Search Filters).

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 representation of the filter to add.
Throws:
LDAPInvalidOperationException - Thrown if an LDAP query using the current object is already running or if a non-null URL was specified to the constructor.
LDAPBadSyntaxException - Thrown if any of the parameters contains invalid characters.
IllegalArgumentException - Thrown if the filter is null or invalid.
See Also:
LDAPQuery.addFilter(String, String)
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

addAttribute

public void addAttribute(String oid)
                  throws LDAPInvalidOperationException,
                         LDAPBadSyntaxException
Adds an attribute to the list of attributes that will be requested to be returned from the server.

If this method is not called to specify the attributes to return, then all attributes will be returned.

Note:: This method 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 or if a non-null URL was specified to the constructor.
LDAPBadSyntaxException - Thrown if the parameter contains invalid characters; although there are more invalid characters according to RFC2255, this exception is only thrown if the parameter contains the "question mark" (?) character.
IllegalArgumentException - Thrown if the parameter is null
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

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.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

isRunning

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

Returns:
true if the query is currently running; false otherwise.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

start

public void start()
           throws LDAPInvalidOperationException
Starts the query.

This method actually begins the query. If a query is already in progress then LDAPQuery.abort() will first be invoked to stop it.

Throws:
LDAPInvalidOperationException - Thrown if an LDAP query using the current object is already running.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

abort

public void abort()
Aborts the current query (if a query is currently running).

Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

getResultSize

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

Returns:
the number of results received from the query or -1 if the query either has not been started or was aborted.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

getErrorCode

public int getErrorCode()
Returns the error code describing any error that might have occurred during processing of the query. If no error code occurred during this query then this method will return LDAPQuery.LDAP_SUCCESS.

Returns:
the error code describing any error that might have occurred during processing of the query as specified above.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

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.

Returns:
a string describing any error that might have occurred during processing of the query as specified above.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

getResults

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

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

Returns:
an enumeration of LDAPEntry objects as specified above.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0





Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal