public class CryptoFactoryBean extends Object implements org.springframework.beans.factory.FactoryBean<org.apache.ws.security.components.crypto.Crypto>, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.InitializingBean
Crypto. Allows for strong-typed property configuration, or configuration
through Properties.
Requires either individual properties, or the configuration property
to be set.
Crypto| Constructor and Description |
|---|
CryptoFactoryBean() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
org.apache.ws.security.components.crypto.Crypto |
getObject() |
Class<org.apache.ws.security.components.crypto.Crypto> |
getObjectType() |
boolean |
isSingleton() |
void |
setBeanClassLoader(ClassLoader classLoader) |
void |
setConfiguration(Properties properties)
Sets the configuration of the Crypto.
|
void |
setCryptoProvider(Class<? extends org.apache.ws.security.components.crypto.Crypto> cryptoProviderClass)
Sets the
Crypto provider name. |
void |
setDefaultX509Alias(String defaultX509Alias)
Sets the alias name of the default certificate which has been specified as a property.
|
void |
setKeyStoreLocation(org.springframework.core.io.Resource location)
Sets the location of the key store to be loaded in the
Crypto
instance. |
void |
setKeyStorePassword(String password)
Sets the key store password.
|
void |
setKeyStoreProvider(String provider)
Sets the key store provider.
|
void |
setKeyStoreType(String type)
Sets the key store type.
|
void |
setTrustStorePassword(String password)
Sets the trust store password.
|
public void setConfiguration(Properties properties)
CryptoFactory.getInstance(java.util.Properties)public void setCryptoProvider(Class<? extends org.apache.ws.security.components.crypto.Crypto> cryptoProviderClass)
Crypto provider name. Defaults to Merlin.
This property maps to the WSS4J org.apache.ws.security.crypto.provider property.
cryptoProviderClass - the crypto provider classpublic void setKeyStoreLocation(org.springframework.core.io.Resource location)
throws IOException
Crypto
instance.
This property maps to the WSS4J org.apache.ws.security.crypto.merlin.file property.
location - the key store locationIOException - when the resource cannot be openedpublic void setKeyStoreProvider(String provider)
This property maps to the WSS4J org.apache.ws.security.crypto.merlin.keystore.provider property.
provider - the key store providerpublic void setKeyStorePassword(String password)
security.
This property maps to the WSS4J org.apache.ws.security.crypto.merlin.keystore.password property.
password - the key store passwordpublic void setKeyStoreType(String type)
KeyStore.getDefaultType().
This property maps to the WSS4J org.apache.ws.security.crypto.merlin.keystore.type property.
type - the key store typepublic void setTrustStorePassword(String password)
changeit.
WSS4J crypto uses the standard J2SE trust store, i.e. $JAVA_HOME/lib/security/cacerts.
This property maps to the WSS4J org.apache.ws.security.crypto.merlin.cacerts.password property.
password - the trust store passwordpublic void setDefaultX509Alias(String defaultX509Alias)
This property maps to the WSS4J org.apache.ws.security.crypto.merlin.keystore.alias property.
defaultX509Alias - alias name of the default X509 certificatepublic void setBeanClassLoader(ClassLoader classLoader)
setBeanClassLoader in interface org.springframework.beans.factory.BeanClassLoaderAwarepublic void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanExceptionpublic Class<org.apache.ws.security.components.crypto.Crypto> getObjectType()
getObjectType in interface org.springframework.beans.factory.FactoryBean<org.apache.ws.security.components.crypto.Crypto>public boolean isSingleton()
isSingleton in interface org.springframework.beans.factory.FactoryBean<org.apache.ws.security.components.crypto.Crypto>