com.atlassian.confluence.security.persistence.dao.hibernate
Class HibernateKeyStoreDao
java.lang.Object
org.springframework.dao.support.DaoSupport
org.springframework.orm.hibernate.support.HibernateDaoSupport
com.atlassian.confluence.security.persistence.dao.hibernate.HibernateKeyStoreDao
- All Implemented Interfaces:
- KeyStore, org.springframework.beans.factory.InitializingBean
public class HibernateKeyStoreDao
- extends org.springframework.orm.hibernate.support.HibernateDaoSupport
- implements KeyStore
Hibernate implementation of the KeyStore
interface
Fields inherited from class org.springframework.dao.support.DaoSupport |
logger |
Method Summary |
java.security.KeyPair |
getKeyPair(java.lang.String alias)
Returns a key pair for a specified alias. |
java.security.PrivateKey |
getPrivateKey(java.lang.String alias)
|
java.security.PublicKey |
getPublicKey(java.lang.String alias)
|
void |
storeKeyPair(java.lang.String alias,
java.security.KeyPair keyPair)
Stores a key pair against a key alias. |
void |
storePublicKey(java.lang.String alias,
java.security.PublicKey publicKey)
Stores a public key against a key alias. |
Methods inherited from class org.springframework.orm.hibernate.support.HibernateDaoSupport |
checkDaoConfig, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory |
Methods inherited from class org.springframework.dao.support.DaoSupport |
afterPropertiesSet, initDao |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HibernateKeyStoreDao
public HibernateKeyStoreDao()
getPrivateKey
public java.security.PrivateKey getPrivateKey(java.lang.String alias)
- Specified by:
getPrivateKey
in interface KeyStore
- Parameters:
alias
- Key alias
- Returns:
- private key for this alias or null if no such key exists
getPublicKey
public java.security.PublicKey getPublicKey(java.lang.String alias)
- Specified by:
getPublicKey
in interface KeyStore
- Parameters:
alias
- Key alias
- Returns:
- public key for this alias or null if no such key exists
getKeyPair
public java.security.KeyPair getKeyPair(java.lang.String alias)
- Description copied from interface:
KeyStore
- Returns a key pair for a specified alias. If there isn't a public/private key pair for the alias null will be
returned. This is also true if there is only a public key stored for the alias.
- Specified by:
getKeyPair
in interface KeyStore
- Parameters:
alias
- Key alias
- Returns:
- Key pair for this alias or null if a pair of keys exists
storeKeyPair
public void storeKeyPair(java.lang.String alias,
java.security.KeyPair keyPair)
- Description copied from interface:
KeyStore
- Stores a key pair against a key alias. Whether a key store supports updating existing keys forms is left to the
key store implementation.
- Specified by:
storeKeyPair
in interface KeyStore
- Parameters:
alias
- Key aliaskeyPair
- Key pair to store
storePublicKey
public void storePublicKey(java.lang.String alias,
java.security.PublicKey publicKey)
- Description copied from interface:
KeyStore
- Stores a public key against a key alias.
- Specified by:
storePublicKey
in interface KeyStore
- Parameters:
alias
- Key aliaspublicKey
- Key pair to store
Copyright © 2003-2013 Atlassian. All Rights Reserved.