SHOW Signed

net.rim.device.api.crypto.keystore
Interface KeyStoreIndex

All Known Implementing Classes:
CertificateHashKeyStoreIndex, CertificateKeyStoreIndex, IssuerKeyStoreIndex, LabelKeyStoreIndex, PrivateKeysKeyStoreIndex, PublicKeyKeyStoreIndex, SerialNumberIssuerKeyStoreIndex, SubjectKeyIdentifierKeyStoreIndex, SubjectKeyStoreIndex, X509PublicKeyHashKeyStoreIndex, AssociatedDataKeyStoreIndex

public interface KeyStoreIndex

Specifies the information that the key store will be indexed on.

NOTE: It is the responsibility of the developer to create and implement this interface for each index they want in the key store.

It is worthwhile to note that there are already several indices implemented in the KeyStore and other applications at RIM that may be available for you to call before you attempt to implement your own index.

For more information on using a keystore index, see Using the keystore index. This quick tutorial provides overview information as well as an example on how to use an index within a keystore.

Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

Since:
JDE 3.6.0
See Also:
KeyStore, KeyStoreData

Method Summary
 Category: Signed  void addToIndex(KeyStoreData data, KeyStoreDataMap map)
          This method is called by the index to add the alias values or integers that are going to be used to link to the key store data object that was passed into this method.
 Category: Signed  int getHash(Object target)
          Returns the int representing the target object passed into the KeyStoreDataComparator.
 Category: Signed  long getID()
          Returns the long associated with this index class for use inside the keystore.
 Category: Signed  boolean matches(KeyStoreData data, Object target)
          This method will return true if the target is the KeyStoreData object that is found using the index.
 

Method Detail

addToIndex

public void addToIndex(KeyStoreData data,
                       KeyStoreDataMap map)
This method is called by the index to add the alias values or integers that are going to be used to link to the key store data object that was passed into this method.

Parameters:
data - The KeyStoreData object where one is going to construct the hashes from.
map - The object that is going to be used to add the hashes to the key store.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

getHash

public int getHash(Object target)
            throws IllegalArgumentException
Returns the int representing the target object passed into the KeyStoreDataComparator.

Parameters:
target - The object to return the representing int from.
Returns:
An integer representing the target object passed into this method.
Throws:
IllegalArgumentException - Thrown if the specified target parameter is invalid.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

getID

public long getID()
Returns the long associated with this index class for use inside the keystore.

Note that this long has to be unique.

Returns:
A long that is associated with the index.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

matches

public boolean matches(KeyStoreData data,
                       Object target)
This method will return true if the target is the KeyStoreData object that is found using the index.

Parameters:
data - The key store data to be found.
target - The information that used to find the key store data.
Returns:
true if the key store data object equals the target, false otherwise.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.


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