Class PropertyToEntityDescriptorConverter
java.lang.Object
se.swedenconnect.signservice.authn.saml.spring.PropertyToEntityDescriptorConverter
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
,org.springframework.core.convert.converter.Converter<String,
org.opensaml.saml.saml2.metadata.EntityDescriptor>
public class PropertyToEntityDescriptorConverter
extends Object
implements org.springframework.core.convert.converter.Converter<String,org.opensaml.saml.saml2.metadata.EntityDescriptor>, org.springframework.context.ApplicationContextAware
A
Converter
that gets the property value (e.g., classpath:metadata.xml
) and instantiates an
EntityDescriptor
object.
To use this converter it has to be instantiated as a bean and then registered in the registry using
ConverterRegistry.addConverter(Converter)
.
If you are using Spring Boot, do:
@Bean @ConfigurationPropertiesBinding public PropertyToEntityDescriptorConverter propertyToEntityDescriptorConverter() { return new PropertyToEntityDescriptorConverter(); }
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.opensaml.saml.saml2.metadata.EntityDescriptor
void
setApplicationContext
(org.springframework.context.ApplicationContext applicationContext) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.core.convert.converter.Converter
andThen
-
Constructor Details
-
PropertyToEntityDescriptorConverter
public PropertyToEntityDescriptorConverter()
-
-
Method Details
-
setApplicationContext
public void setApplicationContext(@Nonnull org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException
-
convert
- Specified by:
convert
in interfaceorg.springframework.core.convert.converter.Converter<String,
org.opensaml.saml.saml2.metadata.EntityDescriptor>
-