org.norther.tammi.core.security
Interface KeyStoreLoader

All Known Implementing Classes:
DefaultKeyStoreLoader

public interface KeyStoreLoader

An interface to key store loaders.

Version:
$Id: KeyStoreLoader.java,v 1.13 2009/09/28 15:08:42 cvsimp Exp $
Author:
Ilkka Priha

Method Summary
 void addKeyStore(KeyStore store)
          Adds a new key store or refreshes a changed one.
 void clearKeyStores()
          Clears all key stores.
 KeyStore getKeyStore(String alias)
          Gets the first key store for the specified alias.
 KeyStore[] getKeyStores(String alias)
          Gets all key stores for the specified alias.
 String getSecurityKey()
          Gets the path finder key for resolving security paths.
 void load(File file, String password)
          Loads a key store from the specified file.
 void load(InputStream stream, String password)
          Loads a key store from the specified input stream.
 void load(String path, String password)
          Loads a key store from the specified path.
 void load(URL url, String password)
          Loads a key store from the specified URL.
 void removeKeyStore(KeyStore store)
          Removes a key store.
 void removeKeyStores(String alias)
          Removes all key stores for the specified alias.
 void setSecurityKey(String key)
          Sets the path finder key for resolving security paths.
 

Method Detail

getSecurityKey

String getSecurityKey()
Gets the path finder key for resolving security paths.

Returns:
the path finder key.

setSecurityKey

void setSecurityKey(String key)
Sets the path finder key for resolving security paths. The default key is PathFinderMBean.SECURITY.

Parameters:
key - the path finder key.

getKeyStore

KeyStore getKeyStore(String alias)
Gets the first key store for the specified alias.

Parameters:
alias - the alias.
Returns:
a key store or null.

getKeyStores

KeyStore[] getKeyStores(String alias)
Gets all key stores for the specified alias.

Parameters:
alias - the alias.
Returns:
an array of key stores or null.

addKeyStore

void addKeyStore(KeyStore store)
                 throws LogException
Adds a new key store or refreshes a changed one.

Parameters:
store - a key store.
Throws:
LogException - on errors.

removeKeyStore

void removeKeyStore(KeyStore store)
Removes a key store.

Parameters:
store - a key store.

removeKeyStores

void removeKeyStores(String alias)
Removes all key stores for the specified alias.

Note that the associated key stores are removed from all of their other aliases as well.

Parameters:
alias - the alias.

clearKeyStores

void clearKeyStores()
Clears all key stores.


load

void load(String path,
          String password)
          throws LogException
Loads a key store from the specified path.

Parameters:
path - the path from which the key store is loaded.
password - the (optional) password used to check the integrity.
Throws:
LogException - on errors.

load

void load(File file,
          String password)
          throws LogException
Loads a key store from the specified file.

Parameters:
file - the file from which the key store is loaded.
password - the (optional) password used to check the integrity.
Throws:
LogException - on errors.

load

void load(URL url,
          String password)
          throws LogException
Loads a key store from the specified URL.

Parameters:
url - the URL from which the key store is loaded.
password - the (optional) password used to check the integrity.
Throws:
LogException - on errors.

load

void load(InputStream stream,
          String password)
          throws LogException
Loads a key store from the specified input stream.

Parameters:
stream - the input stream from which the key store is loaded.
password - the (optional) password used to check the integrity.
Throws:
LogException - on errors.


Copyright © 2004 The Norther Organization. All rights reserved.