Class BeanConfigurationLookupStrategy<T>
java.lang.Object
net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
net.shibboleth.idp.saml.profile.config.AbstractMetadataDrivenConfigurationLookupStrategy<T>
net.shibboleth.idp.saml.profile.config.BeanConfigurationLookupStrategy<T>
- Type Parameters:
T
- type of bean
- All Implemented Interfaces:
Function<BaseContext,
,T> Component
,DestructableComponent
,InitializableComponent
,Aware
,ApplicationContextAware
public class BeanConfigurationLookupStrategy<T>
extends AbstractMetadataDrivenConfigurationLookupStrategy<T>
implements ApplicationContextAware
A strategy function that examines SAML metadata associated with a relying party and derives bean-based
configuration settings based on EntityAttribute extension tags.
Defaults to no caching of the result to avoid bean lifecycle issues if relying party config is reloaded.
- Since:
- 3.4.0
-
Nested Class Summary
Nested classes/interfaces inherited from class net.shibboleth.idp.saml.profile.config.AbstractMetadataDrivenConfigurationLookupStrategy
AbstractMetadataDrivenConfigurationLookupStrategy.CachedConfigurationContext
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ApplicationContext
Enclosing Spring context.private final org.slf4j.Logger
Class logger.Type of bean to return. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected T
doTranslate
(IdPAttribute tag) Translate the value(s) into a setting of the appropriate type.protected T
doTranslate
(Attribute tag) Translate the value(s) into a setting of the appropriate type.void
setApplicationContext
(ApplicationContext context) void
setPropertyType
(Class<T> type) Set the type of bean to search for.private T
xmlObjectToBean
(XMLObject object) Convert an XMLObject to a Spring bean reference if the type is supported.Methods inherited from class net.shibboleth.idp.saml.profile.config.AbstractMetadataDrivenConfigurationLookupStrategy
apply, setDefaultValue, setDefaultValueStrategy, setEnableCaching, setExplicitPropertyName, setIgnoreUnmappedEntityAttributes, setMetadataLookupStrategy, setProfileAliases, setProfileIdLookupStrategy, setPropertyName, setStrictNameFormat
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, doDestroy, initialize, isDestroyed, isInitialized
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
applicationContext
Enclosing Spring context. -
propertyType
Type of bean to return.
-
-
Constructor Details
-
BeanConfigurationLookupStrategy
public BeanConfigurationLookupStrategy()Constructor.
-
-
Method Details
-
setPropertyType
Set the type of bean to search for.- Parameters:
type
- bean type
-
setApplicationContext
- Specified by:
setApplicationContext
in interfaceApplicationContextAware
- Throws:
BeansException
-
doInitialize
- Overrides:
doInitialize
in classAbstractMetadataDrivenConfigurationLookupStrategy<T>
- Throws:
ComponentInitializationException
-
doTranslate
Translate the value(s) into a setting of the appropriate type.Overrides of this function can assume a non-zero collection of values.
- Specified by:
doTranslate
in classAbstractMetadataDrivenConfigurationLookupStrategy<T>
- Parameters:
tag
- tag to translate- Returns:
- the setting derived from the tag's value(s)
-
doTranslate
Translate the value(s) into a setting of the appropriate type.Overrides of this function can assume a non-zero collection of values.
- Specified by:
doTranslate
in classAbstractMetadataDrivenConfigurationLookupStrategy<T>
- Parameters:
tag
- tag to translate- Returns:
- the setting derived from the tag's value(s)
-
xmlObjectToBean
Convert an XMLObject to a Spring bean reference if the type is supported.- Parameters:
object
- object to convert- Returns:
- the converted value, or null
-