org.cagrid.gaards.cds.service
Class AbstractDBKeyManager

java.lang.Object
  extended by org.cagrid.gaards.cds.service.AbstractDBKeyManager
All Implemented Interfaces:
KeyManager
Direct Known Subclasses:
DBKeyManager

public abstract class AbstractDBKeyManager
extends java.lang.Object
implements KeyManager


Constructor Summary
AbstractDBKeyManager(Database db)
           
 
Method Summary
 java.security.KeyPair createAndStoreKeyPair(java.lang.String alias, int keyLength)
           
 void delete(java.lang.String alias)
           
 void deleteAll()
           
 boolean exists(java.lang.String alias)
           
 java.security.cert.X509Certificate[] getCertificates(java.lang.String alias)
           
protected  Database getDB()
           
protected  org.apache.commons.logging.Log getLog()
           
 java.security.PrivateKey getPrivateKey(java.lang.String alias)
           
 java.security.PublicKey getPublicKey(java.lang.String alias)
           
 void storeCertificates(java.lang.String alias, java.security.cert.X509Certificate[] cert)
           
abstract  java.security.PrivateKey unwrapPrivateKey(WrappedKey wrappedKey)
           
abstract  WrappedKey wrapPrivateKey(java.security.PrivateKey key)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractDBKeyManager

public AbstractDBKeyManager(Database db)
Method Detail

exists

public boolean exists(java.lang.String alias)
               throws CDSInternalFault
Specified by:
exists in interface KeyManager
Throws:
CDSInternalFault

wrapPrivateKey

public abstract WrappedKey wrapPrivateKey(java.security.PrivateKey key)
                                   throws CDSInternalFault
Throws:
CDSInternalFault

unwrapPrivateKey

public abstract java.security.PrivateKey unwrapPrivateKey(WrappedKey wrappedKey)
                                                   throws CDSInternalFault
Throws:
CDSInternalFault

createAndStoreKeyPair

public java.security.KeyPair createAndStoreKeyPair(java.lang.String alias,
                                                   int keyLength)
                                            throws CDSInternalFault
Specified by:
createAndStoreKeyPair in interface KeyManager
Throws:
CDSInternalFault

getCertificates

public java.security.cert.X509Certificate[] getCertificates(java.lang.String alias)
                                                     throws CDSInternalFault
Specified by:
getCertificates in interface KeyManager
Throws:
CDSInternalFault

getPublicKey

public java.security.PublicKey getPublicKey(java.lang.String alias)
                                     throws CDSInternalFault
Specified by:
getPublicKey in interface KeyManager
Throws:
CDSInternalFault

getPrivateKey

public java.security.PrivateKey getPrivateKey(java.lang.String alias)
                                       throws CDSInternalFault
Specified by:
getPrivateKey in interface KeyManager
Throws:
CDSInternalFault

storeCertificates

public void storeCertificates(java.lang.String alias,
                              java.security.cert.X509Certificate[] cert)
                       throws CDSInternalFault,
                              DelegationFault
Specified by:
storeCertificates in interface KeyManager
Throws:
CDSInternalFault
DelegationFault

delete

public void delete(java.lang.String alias)
            throws CDSInternalFault
Specified by:
delete in interface KeyManager
Throws:
CDSInternalFault

deleteAll

public void deleteAll()
               throws CDSInternalFault
Specified by:
deleteAll in interface KeyManager
Throws:
CDSInternalFault

getDB

protected Database getDB()

getLog

protected org.apache.commons.logging.Log getLog()