|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rim.device.api.crypto.keystore.AssociatedDataKeyStoreIndex
public class AssociatedDataKeyStoreIndex
This class allows for easy use of current associated data elements to be used as an index into the keystore.
For example,
if you added an email address as an AssociatedData
then set that with a keystore data you will be able to use the long
for the association to find all of the keystoredata records with that long.
For more information on using a keystore index, see Using the keystore index. This quick tutorial provides overview information as well as an example of using an index within a keystore.
AssociatedData
Constructor Summary | ||
---|---|---|
|
AssociatedDataKeyStoreIndex(long association)
Accepts a long which would refer to the association for an AssociatedData object. |
Method Summary | ||
---|---|---|
|
void |
addToIndex(KeyStoreData data,
KeyStoreDataMap dataMap)
This method adds the KeyStoreData item to the KeyStoreDataMap given the associated data that is contained within that KeyStoreData. |
|
int |
getHash(Object target)
This method returns the hash or int representing a target object given the hashing method. |
|
long |
getID()
Returns the long associated with this index which is the long passed into the constructor. |
|
boolean |
matches(KeyStoreData data,
Object target)
This method will return true if the target is the KeyStoreData object that we are attempting to find using the index. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AssociatedDataKeyStoreIndex(long association)
AssociatedData
object. Note that this long needs to be
unique.
association
- A long describing the association.Method Detail |
---|
public void addToIndex(KeyStoreData data, KeyStoreDataMap dataMap)
addToIndex
in interface KeyStoreIndex
data
- the KeyStoreData object that contains the associated
data items we want to add to the index.dataMap
- the map that represents the mapping between the associations
and the associated data objects.public int getHash(Object target)
getHash
in interface KeyStoreIndex
target
- an object that we will return the hash for.
IllegalArgumentException
- if the target is not of type byte[]public boolean matches(KeyStoreData data, Object target)
matches
in interface KeyStoreIndex
data
- the key store data we are attempting to find.target
- the information that we used to find the key store data.
IllegalArgumentException
- if the target object is not an instance of
byte[].public long getID()
getID
in interface KeyStoreIndex
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.