net.rim.device.api.ldap
Class LDAPPasswordCache

java.lang.Object
  extended by net.rim.device.api.ldap.LDAPPasswordCache
All Implemented Interfaces:
MemoryCleanerListener

Deprecated. No longer for 3rd party use. getInstance() will throw a ControlledAccessException if a non-RIM module is on the call stack when this is called.

public final class LDAPPasswordCache
extends Object
implements MemoryCleanerListener

This class maps a server to any username/password used for that server. Then when we are connecting to the same server again we will first try an existing password entry BEFORE prompting the user. Note as well that we will wipe out our cache if the memory cleaner fires.

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
 
Fields inherited from interface net.rim.device.api.memorycleaner.MemoryCleanerListener
EVENT_DEVICE_LOCK, EVENT_IDLE_TIMEOUT, EVENT_IN_HOLSTER, EVENT_IT_POLICY_CHANGED, EVENT_MEMORY_CLEANER, EVENT_OTA_SYNC_TRANSACTION_STOPPED, EVENT_PERSISTENT_CONTENT_CLEAN, EVENT_POWER_DOWN, EVENT_PROGRAMMATIC_CLEAN, EVENT_SYNC_START, EVENT_SYNC_STOPPED, EVENT_TIME_CHANGED
 
Method Summary
Category: Signed  boolean cleanNow(int event)
          Deprecated.  LDAPPasswordCache Removes all passwords from the cache hash MemoryCleanerListener.EVENT_MEMORY_CLEANER MemoryCleanerListener.EVENT_DEVICE_LOCK MemoryCleanerListener.EVENT_POWER_DOWN MemoryCleanerListener.EVENT_PROGRAMMATIC_CLEAN
Category: Signed  void cleanPassword(String server, String baseQuery)
          Deprecated. This method cleans out the password for the entry represented by the server and baseQuery passed into this method.
Category: Signed  String getDescription()
          Deprecated. Invoked when the memory cleaner application must display a string about the type of listener being cleaned.
Category: Signed static LDAPPasswordCache getInstance()
          Deprecated. Returns the instance of the LDAPPasswordCache.
Category: Signed  String getPassword(String server, String baseQuery)
          Deprecated. Returns the password associated with the server and base query.
Category: Signed  String getUserDN(String server, String baseQuery)
          Deprecated. Returns the userDN associated with the server and base query.
Category: Signed  void setPassword(String server, String baseQuery, String userDN, String password)
          Deprecated. Sets the username and password associated with the server and baseQuery passed into this method.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Method Detail

getInstance

public static LDAPPasswordCache getInstance()
Deprecated. 
Returns the instance of the LDAPPasswordCache.

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

setPassword

public void setPassword(String server,
                        String baseQuery,
                        String userDN,
                        String password)
                 throws IllegalArgumentException
Deprecated. 
Sets the username and password associated with the server and baseQuery passed into this method.

Parameters:
server - the server to associate with the username and password.
baseQuery - the baseQuery to associate with the username and password.
userDN - the user distinguished name for this server.
password - the password for this server.
Throws:
IllegalArgumentException - if any of the parameters are 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

getUserDN

public String getUserDN(String server,
                        String baseQuery)
                 throws IllegalArgumentException
Deprecated. 
Returns the userDN associated with the server and base query. If no userDN exists for that server and base query then null is returned from this method.

Parameters:
server - the server to retrieve the userDN for.
baseQuery - the baseQuery to retrieve the userDN for.
Throws:
IllegalArgumentException - if any of the parameters are 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

getPassword

public String getPassword(String server,
                          String baseQuery)
                   throws IllegalArgumentException
Deprecated. 
Returns the password associated with the server and base query. If no password exists for that server and base query then null is returned from this method.

Parameters:
server - the server to retrieve the password for.
baseQuery - the baseQuery to retrieve the password for.
Throws:
IllegalArgumentException - if any of the parameters are 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

cleanPassword

public void cleanPassword(String server,
                          String baseQuery)
                   throws IllegalArgumentException
Deprecated. 
This method cleans out the password for the entry represented by the server and baseQuery passed into this method.

Parameters:
server - the string representing the server to use for finding the password.
baseQuery - the string representing the base query to use for finding the password.
Throws:
IllegalArgumentException - thrown if the server or baseQuery are 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

cleanNow

public boolean cleanNow(int event)
Deprecated. 
LDAPPasswordCache Removes all passwords from the cache hash MemoryCleanerListener.EVENT_MEMORY_CLEANER MemoryCleanerListener.EVENT_DEVICE_LOCK MemoryCleanerListener.EVENT_POWER_DOWN MemoryCleanerListener.EVENT_PROGRAMMATIC_CLEAN

Specified by:
cleanNow in interface MemoryCleanerListener
Parameters:
event - Constant describing the specific event (one of the defined EVENT_* fields in this class).
Returns:
True if any objects were released (hence requiring a GC); otherwise, false.
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

getDescription

public String getDescription()
Deprecated. 
Description copied from interface: MemoryCleanerListener
Invoked when the memory cleaner application must display a string about the type of listener being cleaned.

Specified by:
getDescription in interface MemoryCleanerListener
Returns:
A textual description the MemoryCleaner application can show to the user; if null, it will not be shown in the memory cleaner application but it will still be called to clean.
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-2010 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. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.