Class KeyDescriptorFactoryBean
- java.lang.Object
-
- org.springframework.beans.factory.config.AbstractFactoryBean<T>
-
- se.litsec.opensaml.core.spring.AbstractSAMLObjectBuilderFactoryBean<KeyDescriptor>
-
- se.litsec.opensaml.saml2.metadata.build.spring.KeyDescriptorFactoryBean
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanClassLoaderAware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.FactoryBean<KeyDescriptor>,org.springframework.beans.factory.InitializingBean
public class KeyDescriptorFactoryBean extends AbstractSAMLObjectBuilderFactoryBean<KeyDescriptor>
A Spring factory bean for creatingKeyDescriptorobjects.- Author:
- Martin Lindström (martin.lindstrom@litsec.se)
- See Also:
KeyDescriptorBuilder
-
-
Constructor Summary
Constructors Constructor Description KeyDescriptorFactoryBean()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AbstractSAMLObjectBuilder<KeyDescriptor>builder()Returns the builder.Class<?>getObjectType()voidsetCertificate(X509Certificate certificate)Assigns a certificate to be used as a X.509 data element of theKeyInfoelement within the key descriptor.voidsetCertificate(X509Credential credential)Assigns a certificate in OpenSAML credential format to be used as a X.509 data element of theKeyInfoelement within the key descriptor.voidsetCertificateResource(org.springframework.core.io.Resource certificateResource)Assigns a resource to a certificate resource that is to be used as a X.509 data element of theKeyInfoelement within the key descriptor.voidsetEncryptionMethods(List<String> encryptionMethods)Assigns a list of encryption methods.voidsetEncryptionMethodsExt(List<EncryptionMethod> encryptionMethods)Assigns a list of encryption methods.voidsetKeyName(String name)Assigns the key name of theKeyInfoelement within the key descriptor.voidsetUse(UsageType usageType)Assigns the usage type for the key descriptor.-
Methods inherited from class se.litsec.opensaml.core.spring.AbstractSAMLObjectBuilderFactoryBean
createInstance, localizedStringListToVarArgs, stringListToVarArgs, toVarArgs
-
-
-
-
Method Detail
-
setUse
public void setUse(UsageType usageType)
Assigns the usage type for the key descriptor.- Parameters:
usageType- the usage type
-
setKeyName
public void setKeyName(String name)
Assigns the key name of theKeyInfoelement within the key descriptor.- Parameters:
name- the key name
-
setCertificate
public void setCertificate(X509Certificate certificate)
Assigns a certificate to be used as a X.509 data element of theKeyInfoelement within the key descriptor.- Parameters:
certificate- the certificate
-
setCertificate
public void setCertificate(X509Credential credential)
Assigns a certificate in OpenSAML credential format to be used as a X.509 data element of theKeyInfoelement within the key descriptor.- Parameters:
credential- the credential
-
setCertificateResource
public void setCertificateResource(org.springframework.core.io.Resource certificateResource) throws IOExceptionAssigns a resource to a certificate resource that is to be used as a X.509 data element of theKeyInfoelement within the key descriptor.- Parameters:
certificateResource- the certificate resource- Throws:
IOException- if the resource can not be read
-
setEncryptionMethods
public void setEncryptionMethods(List<String> encryptionMethods)
Assigns a list of encryption methods.Note: the method only accepts algorithm URI:s. If you need to assign other parts of an
EncryptionMethodobject usesetEncryptionMethodsExt(List).- Parameters:
encryptionMethods- list of algorithms
-
setEncryptionMethodsExt
public void setEncryptionMethodsExt(List<EncryptionMethod> encryptionMethods)
Assigns a list of encryption methods.- Parameters:
encryptionMethods- list of algorithms
-
builder
protected AbstractSAMLObjectBuilder<KeyDescriptor> builder()
Returns the builder.- Specified by:
builderin classAbstractSAMLObjectBuilderFactoryBean<KeyDescriptor>- Returns:
- the builder
-
getObjectType
public Class<?> getObjectType()
- Specified by:
getObjectTypein interfaceorg.springframework.beans.factory.FactoryBean<KeyDescriptor>- Specified by:
getObjectTypein classorg.springframework.beans.factory.config.AbstractFactoryBean<KeyDescriptor>
-
-