SHOW Signed
 

net.rim.device.api.servicebook
Class ServiceRecord

java.lang.Object
  |
  +--net.rim.device.api.servicebook.ServiceRecord
All Implemented Interfaces:
GlobalEventListener, Persistable, Persistable

public final class ServiceRecord
extends Object
implements Persistable, GlobalEventListener

Represents a service record that contains BlackBerry configuration information.

Service records, which are contained within ServiceBooks, are used to store information about BlackBerry connections such as MDS and CMIME. Service records act like a registry in that they allow you to keep track of and edit the various configuration settings of your BlackBerry handheld.

This has the ability to control an individual record as well as parse a DataBuffer into a new record.

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 4.0.0

Field Summary
 Category: Signed static int CDMA_WIRELESS_NET_TYPE
          CDMA Network.
 Category: Signed static int COMPRESS_NONE
          Indicates no compression mode.
 Category: Signed static int COMPRESS_RIM
          Indicates RIM-proprietary compression mode.
 Category: Signed static int ENCRYPT_NONE
          Indicates no encryption mode.
 Category: Signed static int ENCRYPT_RIM
          Indicates RIM encryption (3DES or AES) Note: This is the default encryption mode.
 Category: Signed static int ENCRYPT_RIM_WEAK
          Indicates RIM BIS encryption (3DES or AES) Note: If this encyrpt mode is specified, the service is treated as insecure.
 Category: Signed static int GPRS_WIRELESS_NET_TYPE
          GPRS Network.
 Category: Signed static int IDEN_WIRELESS_NET_TYPE
          IDEN Network
 Category: Signed static int INVALID_COMPRESSION_MODES
          Indicates an invalid compression mode.
 Category: Signed static int INVALID_ENCRYPTION_MODES
          Indicates an invalid encyrption mode.
 Category: Signed static int INVALID_RECORD_ID
          Indicates an invalid record ID.
 Category: Signed static int INVALID_USER_ID
          Indicates an invalid user ID.
 Category: Signed static int MAJOR_VERSION
          Current major version of the ServiceRecords/ServiceBook.
 Category: Signed static int MINOR_VERSION
          Current minor version of the ServiceRecord/ServiceBook.
 Category: Signed static int MOBITEX_WIRELESS_NET_TYPE
          Deprecated. Mobitex is no longer supported.
 Category: Signed static int NUM_SOURCES
          Indicates the total number of record source types.
 Category: Signed static int SOURCE_CODE
          Type indicates the recrod's source was progammatical.
 Category: Signed static int SOURCE_EDITOR
          Type indicates the record's source was the SB Editor (user operated or otherwise).
 Category: Signed static int SOURCE_OTA
          Type indicates the record's source was over the air.
 Category: Signed static int SOURCE_OTA_SECURE
          Type indicates the record's source was a secure over-the-air connection.
 Category: Signed static int SOURCE_SERIAL
          Type indicates the record's source was a serial link.
 Category: Signed static int SOURCE_UNKNOWN
          Type indicates an unknown source.
 Category: Signed static int SRT_ACTIVE
          Type indicates a service record that's in use.
 Category: Signed static int SRT_DISALLOWED
          Type indicates a record disallowed by local IT Policy.
 Category: Signed static int SRT_GHOST
          Type indicates a record deleted but sill recoverable.
 Category: Signed static int SRT_NO_CHANGE
          Indicates service record type will not change.
 Category: Signed static int SRT_NUM_TYPES
          Indicates the number of differrent service record types.
 Category: Signed static int SRT_OBSOLETE
          Type indicates a record with an old version (0x00).
 Category: Signed static int SRT_ORPHAN
          Type indicates a record usable but not in the service book.
 Category: Signed static int SRT_PENDING
          Type indicates a record received but not yet accepted (or rejected).
 Category: Signed static int SRT_UNKNOWN
          Type of service record is unknown.
 Category: Signed static int VERSION
          Current version of the ServiceRecord/ServiceBook.
 
Constructor Summary
 Category: Signed ServiceRecord()
          Creates a new service record instance, setting up initial values.
 Category: Signed ServiceRecord(int source)
          Constructs a new service record from the given source.
 
Method Summary
 Category: Signed  void copyInto(ServiceRecord sr)
          Copies the data from this service record into another.
 Category: Signed  String getAPN()
          Retrievs this record's associated access point name.
 Category: Signed  byte[] getApplicationData()
          Retrieves this service record's application-specific data.
 Category: Signed  String[] getBBRHosts()
          Retrieves list of BBR hosts for this record.
 Category: Signed  int[] getBBRPorts()
          Retrieves list of BBR ports for this record.
 Category: Signed  String getCAAddress()
          Retrieves the address for this record's associated certificate authority.
 Category: Signed  short getCAPort()
          Retrieves the port for this record's associated certificate authority.
 Category: Signed  String getCARealm()
          Retrieves this record's associated certificate authority.
 Category: Signed  String getCid()
          Retrieves this service record's CID.
 Category: Signed  int getCidHash()
          Retrieve's this service record's hashed CID (SHA-1 hash).
 Category: Signed  int getCompressionMode()
          Retrieves server's available compression mode.
 Category: Signed  String getDataSourceId()
          Retrieves this record's data source ID.
 Category: Signed  String getDescription()
          Retrieves the textual description of this record.
 Category: Signed  boolean getDisabledState()
          Determines this record's disabled state.
 Category: Signed  int getEncryptionMode()
          Retrieves server's available encryption mode.
 Category: Signed  String getHomeAddress()
          Retrieves this record's home address.
 Category: Signed  int getId()
          Retrieves this service record's ID.
 Category: Signed  int getKeyHashForService()
          getHashCodeForService.
 Category: Signed  long getLastUpdated()
          Retrieves time this record was last updated
 Category: Signed  String getName()
          Retrieves this serivce record's name.
 Category: Signed  int getNameHash()
          Returns this service record's hashed name (SHA-1 hash).
 Category: Signed  String getNetworkAddress()
          Retrieves this record's associated network address.
 Category: Signed  int getNetworkType()
          Retrieves this record's associated network type.
 Category: Signed  short getServiceIdentifierSubType()
          Retrieves the Service Identifier Sub Type
 Category: Signed  short getServiceIdentifierType()
          Retrieves the service Identifier Type
 Category: Signed  int getSource()
          Retrieves this record's source type.
 Category: Signed  Transport getTransport()
          Retrieves this service record's associated transport object using this service record's CID.
 Category: Signed  int getType()
          Retrieves this service record's type.
 Category: Signed  String getUid()
          Retrieves this service record's UID.
 Category: Signed  int getUidHash()
          Retrieves this service record's hashed UID (SHA-1 hash).
 Category: Signed  int getUserId()
          Retrieves this record's user ID.
 Category: Signed  boolean isDirty()
          Determines if this record has unsaved changes.
 Category: Signed  boolean isDisabled()
          Determines if this record is disabled.
 Category: Signed  boolean isDuplicate(ServiceRecord rec, int newType, String newName, String newUid, String newCid, String newDataSourceId, int newUserId)
          Determines if the specified record is a duplicate of this record.
 Category: Signed  boolean isEncrypted()
          Determines if this record's associated service is an encrypted service.
 Category: Signed  boolean isInvisible()
          Determines if this record should be visible to the end user.
 Category: Signed  boolean isRecordProtected()
          Determines if this record is protected.
 Category: Signed  boolean isRestoredFromBackup()
          Determines if this record was restored from a backup
 Category: Signed  boolean isRestoreDisabled()
          Determines if this record is disabled for backup/restore
 Category: Signed  boolean isRestoreEnabled()
          Determines if this record is disabled for backup/restore
 Category: Signed  boolean isSecureService()
          Determines if this record's associated service is secure.
 Category: Signed  boolean isValid()
          Determines if this record is valid.
 Category: Signed  boolean isWeakSecureService()
          Determines if this record's associated service is weakly secure.
 Category: Signed  String toString()
          toString implementation
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CDMA_WIRELESS_NET_TYPE

public static final int CDMA_WIRELESS_NET_TYPE
CDMA Network.
See Also:
getNetworkType()
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.

COMPRESS_NONE

public static final int COMPRESS_NONE
Indicates no compression mode.
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.

COMPRESS_RIM

public static final int COMPRESS_RIM
Indicates RIM-proprietary compression mode.

Note: This is the default compression mode.

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.

ENCRYPT_NONE

public static final int ENCRYPT_NONE
Indicates no encryption mode.
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.

ENCRYPT_RIM

public static final int ENCRYPT_RIM
Indicates RIM encryption (3DES or AES)

Note: This is the default encryption mode.

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.

ENCRYPT_RIM_WEAK

public static final int ENCRYPT_RIM_WEAK
Indicates RIM BIS encryption (3DES or AES)

Note: If this encyrpt mode is specified, the service is treated as insecure.

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

GPRS_WIRELESS_NET_TYPE

public static final int GPRS_WIRELESS_NET_TYPE
GPRS Network.
See Also:
getNetworkType()
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.

IDEN_WIRELESS_NET_TYPE

public static final int IDEN_WIRELESS_NET_TYPE
IDEN Network
See Also:
getNetworkType()
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.

INVALID_COMPRESSION_MODES

public static final int INVALID_COMPRESSION_MODES
Indicates an invalid compression mode.

Note: This constant represents all the invalid compression modes. A high bit means that mode is not allowed.

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.

INVALID_ENCRYPTION_MODES

public static final int INVALID_ENCRYPTION_MODES
Indicates an invalid encyrption mode.

Note: This constant represents all the invalid encryption modes. A high bit means that mode is not allowed.

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.

INVALID_RECORD_ID

public static final int INVALID_RECORD_ID
Indicates an invalid record ID.
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.

INVALID_USER_ID

public static final int INVALID_USER_ID
Indicates an invalid user ID.
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.

MAJOR_VERSION

public static final int MAJOR_VERSION
Current major version of the ServiceRecords/ServiceBook.
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.

MINOR_VERSION

public static final int MINOR_VERSION
Current minor version of the ServiceRecord/ServiceBook.
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.

MOBITEX_WIRELESS_NET_TYPE

public static final int MOBITEX_WIRELESS_NET_TYPE
Deprecated. Mobitex is no longer supported.

Mobitex network.
Since:
JDE 4.0.2
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.

NUM_SOURCES

public static final int NUM_SOURCES
Indicates the total number of record source types.
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.

SOURCE_CODE

public static final int SOURCE_CODE
Type indicates the recrod's source was progammatical.
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.

SOURCE_EDITOR

public static final int SOURCE_EDITOR
Type indicates the record's source was the SB Editor (user operated or otherwise).
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.

SOURCE_OTA

public static final int SOURCE_OTA
Type indicates the record's source was over the air.
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.

SOURCE_OTA_SECURE

public static final int SOURCE_OTA_SECURE
Type indicates the record's source was a secure over-the-air connection.
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.

SOURCE_SERIAL

public static final int SOURCE_SERIAL
Type indicates the record's source was a serial link.
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.

SOURCE_UNKNOWN

public static final int SOURCE_UNKNOWN
Type indicates an unknown source.

Note: This source should only be used for records that are restored to the device without source information.

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.

SRT_ACTIVE

public static final int SRT_ACTIVE
Type indicates a service record that's in use.
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.

SRT_DISALLOWED

public static final int SRT_DISALLOWED
Type indicates a record disallowed by local IT Policy.
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.

SRT_GHOST

public static final int SRT_GHOST
Type indicates a record deleted but sill recoverable.
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.

SRT_NO_CHANGE

public static final int SRT_NO_CHANGE
Indicates service record type will not change.

This constant is used during calls to isDuplicate(net.rim.device.api.servicebook.ServiceRecord, int, java.lang.String, java.lang.String, java.lang.String, java.lang.String, int) to indicate that the type will not be changed.

Note: This is not a valid type to assign to a record.

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.

SRT_NUM_TYPES

public static final int SRT_NUM_TYPES
Indicates the number of differrent service record types.
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.

SRT_OBSOLETE

public static final int SRT_OBSOLETE
Type indicates a record with an old version (0x00).
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.

SRT_ORPHAN

public static final int SRT_ORPHAN
Type indicates a record usable but not in the service book.
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.

SRT_PENDING

public static final int SRT_PENDING
Type indicates a record received but not yet accepted (or rejected).
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.

SRT_UNKNOWN

public static final int SRT_UNKNOWN
Type of service record is unknown.
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.

VERSION

public static final int VERSION
Current version of the ServiceRecord/ServiceBook.

Must be either MAJOR_VERSION or MINOR_VERSION.

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.
Constructor Detail

ServiceRecord

public ServiceRecord()
Creates a new service record instance, setting up initial values.

Note that before the record is added to the service book, you must set the type, name, UID and CID. This is the default constructor.

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.

ServiceRecord

public ServiceRecord(int source)
Constructs a new service record from the given source.
Parameters:
source - Source from which to create the service record,
Since:
JDE 4.0.0
See Also:
getSource()
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

copyInto

public void copyInto(ServiceRecord sr)
Copies the data from this service record into another.

Note: This is not the same as cloning the service record as many of the internal data members are shared between the objects. Note that the record's ID is not copied.

Parameters:
sr - Service record to contain the copied data; during the copy process this passed service record also gets marked as dirty.
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.

getAPN

public String getAPN()
Retrievs this record's associated access point name.

The retrieved APN corresponds to the gateway to which the service is attached.

Returns:
APN of the gateway associated with this service, or null if no APN applies.
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.

getApplicationData

public byte[] getApplicationData()
Retrieves this service record's application-specific data.
Returns:
Application specific data in a byte array, or null if there isn't any.
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.

getBBRHosts

public String[] getBBRHosts()
Retrieves list of BBR hosts for this record.
Returns:
BBR host list.
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.

getBBRPorts

public int[] getBBRPorts()
Retrieves list of BBR ports for this record.
Returns:
BBR port list.
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.

getCAAddress

public String getCAAddress()
Retrieves the address for this record's associated certificate authority.
Returns:
Address of this record's CA or null if it doesn't have one.
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.

getCAPort

public short getCAPort()
Retrieves the port for this record's associated certificate authority.
Returns:
Port of this record's CA.
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.

getCARealm

public String getCARealm()
Retrieves this record's associated certificate authority.
Returns:
CA for this record or null if there isn't one.
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.

getCid

public String getCid()
Retrieves this service record's CID.

Note: The CID should to be treated as case-insensitive.

Returns:
CID of this record; should be treated as case-insensitive.
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.

getCidHash

public int getCidHash()
Retrieve's this service record's hashed CID (SHA-1 hash).

Note: The CID is converted to lower-case before the hash is made.

Returns:
Hashed CID for this record.
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.

getCompressionMode

public int getCompressionMode()
Retrieves server's available compression mode.

Currently, the available compression modes are COMPRESS_NONE, and COMPRESS_RIM.

Returns:
Server's available compression mode value.
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.

getDataSourceId

public String getDataSourceId()
Retrieves this record's data source ID.
Returns:
Data source ID for this record.
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.

getDescription

public String getDescription()
Retrieves the textual description of this record.
Returns:
Text description for this record, or null if it doesn't have one.
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.

getDisabledState

public boolean getDisabledState()
Determines this record's disabled state.
Returns:
True if the record is disabled; otherwise, false.
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.

getEncryptionMode

public int getEncryptionMode()
Retrieves server's available encryption mode.

Currently, the available encryption modes are ENCRYPT_NONE, ENCRYPT_RIM (3DES or AES), ENCRYPT_RIM_WEAK (3DES or AES).

Returns:
Server's available encryption mode value.
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.

getHomeAddress

public String getHomeAddress()
Retrieves this record's home address.
Returns:
This record's home address.
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.

getId

public int getId()
Retrieves this service record's ID.

Use this method to (effectively) retrieve a handle into the service book.

Note: This method is only useful after this record has been added to the service book.

Returns:
ID of this record.
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.

getKeyHashForService

public int getKeyHashForService()
getHashCodeForService. Get the hash code for a serviceRecord.
Returns:
hash code for the key fields UID, CID, and User ID
Since:
JDE 4.1.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.

getLastUpdated

public long getLastUpdated()
Retrieves time this record was last updated
Returns:
time this record was last updated.
Since:
JDE 4.0.2
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.

getName

public String getName()
Retrieves this serivce record's name.
Returns:
Name of this record.
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.

getNameHash

public int getNameHash()
Returns this service record's hashed name (SHA-1 hash).
Returns:
Hashed name for this record.
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.

getNetworkAddress

public String getNetworkAddress()
Retrieves this record's associated network address.

The retrieved address corresponds to the gateway to which the service is attached. For instance, on the GPRS networks, this will be an IP address in octet form.

Returns:
Network address of the gateway associated with this service, or null if none is associated currently.
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.

getNetworkType

public int getNetworkType()
Retrieves this record's associated network type.

The retrieved value corresponds to one of the following types: CDMA_WIRELESS_NET_TYPE, GPRS_WIRELESS_NET_TYPE, IDEN_WIRELESS_NET_TYPE, or MOBITEX_WIRELESS_NET_TYPE.

Returns:
Network type value, or -1 if this record isn't associated with any network.
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.

getServiceIdentifierSubType

public short getServiceIdentifierSubType()
Retrieves the Service Identifier Sub Type
Returns:
The service Identifier SubType, one of the following ServiceIdentifierTypes#NOT_SPECIFIED ServiceIdentifierTypes.MICROSOFT_EXCHANGE_SERVER, ServiceIdentifierTypes.LOTUS_DOMINO_SERVER, ServiceIdentifierTypes.NOVELL_GROUPWISE_SERVER
Since:
JDE 4.1.0
See Also:
ServiceIdentifierTypes
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.

getServiceIdentifierType

public short getServiceIdentifierType()
Retrieves the service Identifier Type
Returns:
The service Identifier Type, one of the following ServiceIdentifierTypes#NOT_SPECIFIED ServiceIdentifierTypes.BLACKBERRY_ENTERPRISE_SERVER, ServiceIdentifierTypes.BLACKBERRY_INTERNET_SERVICE, ServiceIdentifierTypes.BLACKBERRY_UNITE
Since:
JDE 4.1.0
See Also:
ServiceIdentifierTypes
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.

getSource

public int getSource()
Retrieves this record's source type.
Returns:
Source type for this record.
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.

getTransport

public Transport getTransport()
Retrieves this service record's associated transport object using this service record's CID. Use this method to return the Transport object associated with this service record.
Returns:
The Transport associated with this service record. A null value is never returned.
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.

getType

public int getType()
Retrieves this service record's type. This method will return one of the SRT_ constants defined in this class. For reference, some are listed below:

Returns:
Type of this record; will be equal to one of the SRT_ constants defined in this class.
Since:
JDE 4.0.0
See Also:
#setType
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.

getUid

public String getUid()
Retrieves this service record's UID.
Returns:
UID of this record; should be treated as case-insensitive.
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.

getUidHash

public int getUidHash()
Retrieves this service record's hashed UID (SHA-1 hash).

Note: The UID is converted to lower-case before the hash is made.

Returns:
Hashed UID for this record.
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.

getUserId

public int getUserId()
Retrieves this record's user ID.
Returns:
user ID for this record.
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.

isDirty

public boolean isDirty()
Determines if this record has unsaved changes.

The record is considered dirty if one of its member variables has changed, and the record has not yet been committed into the service book.

Returns:
True if the record is dirty; otherwise, false.
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.

isDisabled

public boolean isDisabled()
Determines if this record is disabled.

Use this method to determine if this record currently has routing information (enabled) or not (disabled).

Returns:
True if this record has no routing information; otherwise, true.
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.

isDuplicate

public boolean isDuplicate(ServiceRecord rec,
                           int newType,
                           String newName,
                           String newUid,
                           String newCid,
                           String newDataSourceId,
                           int newUserId)
Determines if the specified record is a duplicate of this record.

It is possible to indicate a different type, name, UID and CID to use during the check. This way the calling code can determine if a change will create a duplicate record before actually making the change.

Two records are considered duplicates if they have the same CID, either the same name or the same UID and equivalent types. The types are considered equivalent if they have the same SRT_ value or if the argument record has type SRT_ACTIVE and the potential duplicate has a type of either SRT_ACTIVE or SRT_OBSOLETE.

Note that UIDs and CIDs are case insensitive.

Parameters:
rec - Record to match against.
newType - The type to use for the provided record or SRT_NO_CHANGE to use what the record currently contains.
newName - The name to use for the provided record or null to use what the record currently contains.
newUid - The UID to use for the provided record or null to use what the record currently contains.
newCid - The CID to use for the provided record or null to use what the record currently contains.
dataSourceId - The data-source ID to use for the provided record or null to use what the record currently contains.
Returns:
True if the argument record is a duplicate of this record; otherwise, false.
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.

isEncrypted

public boolean isEncrypted()
Determines if this record's associated service is an encrypted service.
Returns:
True if this service is encryptable; otheriwse, false.
Since:
JDE 4.2.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.

isInvisible

public boolean isInvisible()
Determines if this record should be visible to the end user.
Returns:
True if this record is not visible to the end user in the Options->Service Book screen.
Since:
JDE 4.2.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.

isRecordProtected

public boolean isRecordProtected()
Determines if this record is protected.
Returns:
True if the record is protected; otherwise, false.
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.

isRestoredFromBackup

public boolean isRestoredFromBackup()
Determines if this record was restored from a backup
Returns:
True if the record is protected; otherwise, false.
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.

isRestoreDisabled

public boolean isRestoreDisabled()
Determines if this record is disabled for backup/restore
Returns:
True if this service is explicitly disabled for restore
Since:
JDE 4.1.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.

isRestoreEnabled

public boolean isRestoreEnabled()
Determines if this record is disabled for backup/restore
Returns:
True if this service is explicitly enabled for restore
Since:
JDE 4.1.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.

isSecureService

public boolean isSecureService()
Determines if this record's associated service is secure.
Returns:
True if this service is secure; otheriwse, false.
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.

isValid

public boolean isValid()
Determines if this record is valid.

A service record is valid if it has a name, UID, and CID. None of which can have a length of zero.

Returns:
True if this record is valid; otherwise, false.
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.

isWeakSecureService

public boolean isWeakSecureService()
Determines if this record's associated service is weakly secure.
Returns:
True if this service is secure; otheriwse, false.
Since:
JDE 4.2.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.

toString

public String toString()
toString implementation
Overrides:
toString in class Object
Returns:
Returns the datasource ID and user ID if present, else the UID/Name Strings.
Since:
JDE 4.2.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.