SHOW Signed
 

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

java.lang.Object
  |
  +--net.rim.device.api.crypto.certificate.CertificateServers
All Implemented Interfaces:
Persistable, 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.

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

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(CertificateServerInfo server)
          Adds a server to the list of servers.
 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  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  Enumeration getServers(int type)
          Get an enumeration of servers.
 Category: Signed  int getServerSize(int type)
          Returns the number of servers of the specified type.
 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

CRL_SERVER

public static final int CRL_SERVER
An integer representing the CRL server type.
Since:
JDE 3.6.0
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.

DELETED_SERVER

public static final int DELETED_SERVER
An integer representing the Deleted servers.
Since:
JDE 3.6.0
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.

LDAP_SERVER

public static final int LDAP_SERVER
An integer representing the LDAP server type.
Since:
JDE 3.6.0
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.

OCSP_SERVER

public static final int OCSP_SERVER
An integer representing the OCSP server type.
Since:
JDE 3.6.0
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.
Method Detail

addCollectionListener

public void addCollectionListener(CollectionListener listener)
Since:
JDE 4.0.0
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.

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.
Since:
JDE 3.6.0
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.

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.
Since:
JDE 3.6.0
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.

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
Since:
JDE 3.6.0
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.

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
Since:
JDE 4.0.0
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.

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
Since:
JDE 4.3.0
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.

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.
Since:
JDE 3.6.0
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.

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
Since:
JDE 3.6.0
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.

getInstance

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

Returns:
A CertificateServers object.
Since:
JDE 3.6.0
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.

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.
Since:
JDE 4.2.1
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.

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
Since:
JDE 3.6.0
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.

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
Since:
JDE 3.6.0
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.

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.
Since:
JDE 3.6.0
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.

getSyncObjects

public SyncObject[] getSyncObjects()
Returns the SyncObjects.

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

removeAllElements

public void removeAllElements()
Removes all elements from the list of servers.
Since:
JDE 3.6.0
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.

removeCollectionListener

public void removeCollectionListener(CollectionListener listener)
Since:
JDE 4.0.0
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.

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.
Since:
JDE 3.6.0
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.



Copyright 1999-2009 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.