|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface CardStoreStrategy
Strategy for storing and retrieving data from a CardStore. The strategy must be initialized to be functional. The exportCards() method is to store the cards under the same paradigm the strategy uses for storing cards. E.g., if the strategy stores ICards in a encrypted CRDS file, the exportCards() method will also store the exported cards in such a CRDS file.
| Method Summary | |
|---|---|
void |
changePassword(char[] oldPassword,
char[] newPassword)
Changes the password of a password protected CardStore. |
void |
exportCards(CallbackHandler authHandler,
Iterator cards,
OutputStream out)
Exports the cards provided as Iterator cards to stream out. |
Map |
importStore(CallbackHandler authHandler,
String asciiStore)
This should be part of a future CardManager |
void |
initialize(CallbackHandler authHandler,
ICardProvider cardProvider,
String filename,
PasswordCallback passwordCallback,
org.eclipse.higgins.registry.IConfiguration configuration)
Initializes the ICardStoreStrategy before it is used. |
boolean |
isPasswordProtected()
Determines whether this strategy is capable of protecting its ICards by a password. |
void |
synchFromMap(CallbackHandler authHandler,
Map icards)
Synchronizes the CardStore from the provided in-memory Map icards. |
void |
synchFromStore(CallbackHandler authHandler,
Map icards)
Synchronizes the CardStore from the disk representation. |
| Method Detail |
|---|
void initialize(CallbackHandler authHandler,
ICardProvider cardProvider,
String filename,
PasswordCallback passwordCallback,
org.eclipse.higgins.registry.IConfiguration configuration)
throws CardStoreException
authHandler - CallbackHandler for handling password eventsfilename - target location of the CardStore. Can refer to a
directory for directory-based CardStores or a single
File.passwordCallback - the password handler to use if password is required by
the type of implemented storeconfig -
ICardStoreException
CardStoreException
void synchFromMap(CallbackHandler authHandler,
Map icards)
throws CardStoreException
authHandler - icards - Map with the memory representation of the CardStore
ICardStoreException
CardStoreException
void synchFromStore(CallbackHandler authHandler,
Map icards)
throws CardStoreException
authHandler - icards - icards Map with the memory representation of the
CardStore
ICardStoreException
CardStoreException
void exportCards(CallbackHandler authHandler,
Iterator cards,
OutputStream out)
throws CardException
authHandler - cards - Iterator of cards to be exportedout - OutputStream where the cards are stored.
ICardException
CardExceptionboolean isPasswordProtected()
void changePassword(char[] oldPassword,
char[] newPassword)
throws CardStoreException
oldPassword - newPassword -
UnsupportedOperationException - if the CardStore does not support passwords.
ICardStoreException - if the oldPassword is not correct.
CardStoreException
Map importStore(CallbackHandler authHandler,
String asciiStore)
throws CardStoreException
asciiStore -
CardStoreException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||