net.rim.device.api.crypto.keystore
Class KeyStoreSyncFields

java.lang.Object
  extended by net.rim.device.api.crypto.keystore.KeyStoreSyncFields

public final class KeyStoreSyncFields
extends Object

Allows a third party developer to register information that can be sent back and forth between the desktop software and the device for the key store.

See the registration method below for more information.

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 Summary
Category: Signed static boolean register(int syncConstant, long associatedDataConstant, boolean up, boolean down)
          Allows a third party developer to add a syncConstant (for use with the desktop software) and a long for the associatedData.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Method Detail

register

public static boolean register(int syncConstant,
                               long associatedDataConstant,
                               boolean up,
                               boolean down)
Allows a third party developer to add a syncConstant (for use with the desktop software) and a long for the associatedData.

in other words, you can write desktop software to sync with the Key Stores and automatically add data to the associatedData of an object. On upload to the desktop, it will also send this information to the desktop if desired.

Due to the nature of the AssociatedData structure one should not attempt to send anything other than byte[] to and from the desktop using this method. As well, if there are multiple entries returned from the associated data structure under the constant given then ALL of them will be sent to the desktop in the order they were received each with the same constant.

It is also important to note that the registration "database" is not persisted which means if the device resets you are going to have to register your constants again.

Parameters:
syncConstant - This is the constant that should be used to sync data back and forth between the desktop software. It must be greater than 100 (RIM needs some of the constants) or an IllegalArgumentException will be thrown.
associatedDataConstant - This represents the long that will be used to store the data in the associatedData structure (and the one to retrieve it on upload).
up - This boolean denotes whether or not this item should be sent up to the desktop.
down - This boolean denotes whether or not this item should be expected to be received from the desktop.
Returns:
A boolean dictating whether or not the information was registered successfully. It could fail if the sync constant is already taken or if both booleans are false.
Throws:
IllegalArgumentException - Thrown if the sync constant is less than 100.
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





Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.