org.idoox.security.pstore
Interface KeyStoreSource


public interface KeyStoreSource

Interface for loading and saving KeyStore to the database.

Since:
3.0
Component:
Security-Core

Method Summary
 void addKey(java.lang.String alias, KeyEntry keyEntry)
          Adds key with specified properties to the database.
 void deleteKey(java.lang.String alias)
          Deletes key with the given alias from database
 void editKey(java.lang.String alias, KeyEntry keyEntry)
          Saves key properties that were changed to the database.
 void load(KeyStore keystore, java.lang.String password)
          Loads KeyStore from database.
 

Method Detail

load

public void load(KeyStore keystore,
                 java.lang.String password)
          throws BadPasswordException
Loads KeyStore from database.

Parameters:
keystore - The KeyStore being initialized.
password - the given password to access.
Throws:
BadPasswordException - Exception

addKey

public void addKey(java.lang.String alias,
                   KeyEntry keyEntry)
            throws BadPasswordException,
                   KeyStoreException
Adds key with specified properties to the database.

Parameters:
alias - alias of the key
keyEntry - properties of the key
Throws:
BadPasswordException - password not correct
KeyStoreException - any error when processing

editKey

public void editKey(java.lang.String alias,
                    KeyEntry keyEntry)
             throws BadPasswordException,
                    KeyStoreException
Saves key properties that were changed to the database.

Parameters:
alias - alias of the key
keyEntry - properties of the key
Throws:
BadPasswordException - password not correct
KeyStoreException - any error when processing

deleteKey

public void deleteKey(java.lang.String alias)
               throws KeyStoreException
Deletes key with the given alias from database

Parameters:
alias - alias of the being deleted key
Throws:
KeyStoreException - any error when processing