net.rim.device.api.crypto.certificate
Class CertificateServers

java.lang.Object
  extended by net.rim.device.api.crypto.certificate.CertificateServers
All Implemented Interfaces:
Persistable

public final class CertificateServers
extends Object
implements Persistable

This class is used to store the certificate servers so that we can ensure that they are maintained on the device through resets.

See Also:
CertificateServerInfo, CertificateFactory
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 3.6.0

Field Summary
Category: Signed static int CRL_SERVER
          An integer representing the CRL server type.
Category: Signed static int DELETED_SERVER
          An integer representing the Deleted servers.
Category: Signed static int LDAP_SERVER
          An integer representing the LDAP server type.
Category: Signed static int OCSP_SERVER
          An integer representing the OCSP server type.
 
Method Summary
Category: Signed  void addCollectionListener(CollectionListener listener)
           
Category: Signed  CertificateServerInfo addServer(String server, int type, String friendlyName)
          Adds a server to the list of servers using the specified parameters.
Category: Signed  CertificateServerInfo addServer(String server, int type, String friendlyName, String baseQuery, int port)
          Deprecated.  
Category: Signed  CertificateServerInfo addServer(String server, int type, String friendlyName, String baseQuery, int port, int authType)
          Adds a server to the list of servers using the specified parameters.
Category: Signed  CertificateServerInfo addServer(String server, int type, String friendlyName, String baseQuery, int port, int authType, int connectionType)
          Adds a server to the list of servers using the specified parameters.
Category: Signed  CertificateServerInfo addServer(CertificateServerInfo server)
          Adds a server to the list of servers.
Category: Signed  boolean contains(CertificateServerInfo server)
          Returns a boolean that determines if the specified CertificateServerInfo is contained on a server.
Category: Signed  CertificateServerInfo elementAt(int type, int index)
          Returns the element at the index specified by the index parameter to the method.
Category: Signed static CertificateServers getInstance()
          Returns an instance of a CertificateServers object.
Category: Signed  CertificateServerInfo[] getServerInfo(int type)
          Returns an array of CertificateServerInfo corresponding to type.
Category: Signed  int getServerSize(int type)
          Returns the number of servers of the specified type.
Category: Signed  Enumeration getServers(int type)
          Get an enumeration of servers.
Category: Signed  SyncObject getSyncObject(int uid)
          Return the SyncObject that has the given UID.
Category: Signed  SyncObject[] getSyncObjects()
          Returns the SyncObjects.
Category: Signed  void removeAllElements()
          Removes all elements from the list of servers.
Category: Signed  void removeCollectionListener(CollectionListener listener)
           
Category: Signed  boolean removeServer(CertificateServerInfo server)
          This method removes an element from the appropriate list of servers, given the server to remove.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Field Detail

LDAP_SERVER

public static final int LDAP_SERVER
An integer representing the LDAP server type.

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 3.6.0

OCSP_SERVER

public static final int OCSP_SERVER
An integer representing the OCSP server type.

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 3.6.0

CRL_SERVER

public static final int CRL_SERVER
An integer representing the CRL server type.

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 3.6.0

DELETED_SERVER

public static final int DELETED_SERVER
An integer representing the Deleted servers.

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 3.6.0


Method Detail

getInstance

public static CertificateServers getInstance()
Returns an instance of a CertificateServers object.

Returns:
A CertificateServers 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 3.6.0

addCollectionListener

public void addCollectionListener(CollectionListener listener)
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

removeCollectionListener

public void removeCollectionListener(CollectionListener listener)
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

addServer

public CertificateServerInfo addServer(CertificateServerInfo server)
Adds a server to the list of servers.

Parameters:
server - The server to add to the list.
Returns:
A CertificateServerInfo object containing information about the added server
Throws:
IllegalArgumentException - if the server is null or invalid or is a duplicate.
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 3.6.0

addServer

public CertificateServerInfo addServer(String server,
                                       int type,
                                       String friendlyName)
Adds a server to the list of servers using the specified parameters. This method sets the baseQuery to null, port to 0 and automatically generates the unique identifier ( UID ). NOTE: Use addServer(String, int, String, String, int) for LDAP_SERVER because it requires a non-null base query.

Parameters:
server - A String representing the name of the server.
type - The type of server. Any of the CertificateServers.*_SERVER fields except LDAP_SERVER.
friendlyName - The friendly name of the server.
Returns:
A CertificateServerInfo object containing information about the added server.
Throws:
IllegalArgumentException - if server or friendlyName is null, or if the type is LDAP_SERVER.
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 3.6.0

addServer

public CertificateServerInfo addServer(String server,
                                       int type,
                                       String friendlyName,
                                       String baseQuery,
                                       int port)
Deprecated. 

Adds a server to the list of servers using the specified parameters. This method automatically generates the unique identifier ( UID ).

Parameters:
server - A String representing the name of the server, must be non null.
type - The type of server. The currently defined types are: CertificateServers.LDAP_SERVER, CertificateServers.OCSP_SERVER and CertificateServers.CRL_SERVER.
friendlyName - The friendly name of the server, must be non null.
baseQuery - A String containing the base query of the server, must be non null if the type is CertificateServer.LDAP_SERVER.
port - The port number of the server.
Returns:
A CertificateServerInfo object containing information about the added server
Throws:
IllegalArgumentException - if an invalid type was specified
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 3.6.0

addServer

public CertificateServerInfo addServer(String server,
                                       int type,
                                       String friendlyName,
                                       String baseQuery,
                                       int port,
                                       int authType)
Adds a server to the list of servers using the specified parameters. This method automatically generates the unique identifier ( UID ).

Parameters:
server - A String representing the name of the server, must be non null.
type - The type of server. The currently defined types are: CertificateServers.LDAP_SERVER, CertificateServers.OCSP_SERVER and CertificateServers.CRL_SERVER.
friendlyName - The friendly name of the server, must be non null.
baseQuery - A String containing the base query of the server, must be non null if the type is CertificateServer.LDAP_SERVER.
port - The port number of the server.
authType - an integer representing the type of authentication to use for this LDAP connection. For example, one can set it to be LDAPQuery.LDAP_AUTH_ANONYMOUS or LDAPQuery.LDAP_AUTH_SIMPLE. Simple authentication will prompt for a username and password.
Returns:
A CertificateServerInfo object containing information about the added server
Throws:
IllegalArgumentException - if an invalid type was specified
See Also:
LDAPQuery
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

addServer

public CertificateServerInfo addServer(String server,
                                       int type,
                                       String friendlyName,
                                       String baseQuery,
                                       int port,
                                       int authType,
                                       int connectionType)
Adds a server to the list of servers using the specified parameters. This method automatically generates the unique identifier ( UID ).

Parameters:
server - A String representing the name of the server, must be non null.
type - The type of server. The currently defined types are: CertificateServers.LDAP_SERVER, CertificateServers.OCSP_SERVER and CertificateServers.CRL_SERVER.
friendlyName - The friendly name of the server, must be non null.
baseQuery - A String containing the base query of the server, must be non null if the type is CertificateServer.LDAP_SERVER.
port - The port number of the server.
authType - an integer representing the type of authentication to use for this LDAP connection. For example, one can set it to be LDAPQuery.LDAP_AUTH_ANONYMOUS or LDAPQuery.LDAP_AUTH_SIMPLE. Simple authentication will prompt for a username and password.
connectionType - an integer representing the type of authentication to use for this LDAP connection. For example, one can set it to be LDAPQuery.LDAP_CONN_DEFAULT, LDAPQuery.LDAP_CONN_SSL or LDAPQuery.LDAP_CONN_TLS.
Returns:
A CertificateServerInfo object containing information about the added server
Throws:
IllegalArgumentException - if an invalid type was specified
IllegalArgumentException - if type is invalid or if one of server, friendlyName, baseQuery, are null
See Also:
LDAPQuery
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

contains

public boolean contains(CertificateServerInfo server)
Returns a boolean that determines if the specified CertificateServerInfo is contained on a server.

Parameters:
server - The CertificateServerInfo object.
Returns:
A boolean that returns true if the server is found.
Throws:
IllegalArgumentException - if an invalid type was specified within the server parameter or if the server 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 3.6.0

elementAt

public CertificateServerInfo elementAt(int type,
                                       int index)
Returns the element at the index specified by the index parameter to the method.

Parameters:
type - The type of the server. The currently defined types are: CertificateServers.LDAP_SERVER, CertificateServers.OCSP_SERVER and CertificateServers.CRL_SERVER.
index - The index of the element.
Returns:
The CertificateServerInfo object. May be null.
Throws:
IllegalArgumentException - if an invalid type was specified
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 3.6.0

removeServer

public boolean removeServer(CertificateServerInfo server)
This method removes an element from the appropriate list of servers, given the server to remove.

Parameters:
server - The CertificateServerInfo object.
Returns:
A boolean that returns true if the server is removed.
Throws:
IllegalArgumentException - if an invalid type was specified within the server parameter or if the server was 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 3.6.0

getSyncObjects

public SyncObject[] getSyncObjects()
Returns the SyncObjects.

Returns:
An array of SyncObjects.
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 3.6.0

getSyncObject

public SyncObject getSyncObject(int uid)
Return the SyncObject that has the given UID.

Parameters:
uid - The UID of the SyncObject to retrieve.
Returns:
The SyncObject with the given UID or null if no such SyncObject exists.
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 3.6.0

removeAllElements

public void removeAllElements()
Removes all elements from the list of servers.

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 3.6.0

getServerSize

public int getServerSize(int type)
Returns the number of servers of the specified type.

Parameters:
type - the type of server for which to return the size. The currently defined types are: CertificateServers.LDAP_SERVER, CertificateServers.OCSP_SERVER and CertificateServers.CRL_SERVER.
Returns:
An integer that represents the number of servers of the specified type.
Throws:
IllegalArgumentException - if an invalid type was specified
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 3.6.0

getServers

public Enumeration getServers(int type)
Get an enumeration of servers.

Parameters:
type - the type of servers to get
Returns:
an enumeration of the servers, namely CertificateServerInfo objects.
Throws:
IllegalArgumentException - if an invalid type was specified
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 3.6.0

getServerInfo

public CertificateServerInfo[] getServerInfo(int type)
Returns an array of CertificateServerInfo corresponding to type.

Parameters:
type - The class of information to return
Returns:
Returns an array of CertificateServerInfo corresponding to type, will return a zero length array if no items of type exist
Throws:
IllegalArgumentException - if an invalid type is specified. A valid type is one of the CertificateServers.*_SERVER fields.
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.2.1





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