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
Fields Modifier and Type Field Description private ApplicationContextapplicationContextEnclosing Spring context.private org.slf4j.LoggerlogClass logger.private Class<T>propertyTypeType of bean to return.
-
Constructor Summary
Constructors Constructor Description BeanConfigurationLookupStrategy()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoInitialize()protected TdoTranslate(IdPAttribute tag)Translate the value(s) into a setting of the appropriate type.protected TdoTranslate(Attribute tag)Translate the value(s) into a setting of the appropriate type.voidsetApplicationContext(ApplicationContext context)voidsetPropertyType(Class<T> type)Set the type of bean to search for.private TxmlObjectToBean(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 Detail
-
log
@Nonnull private final org.slf4j.Logger log
Class logger.
-
applicationContext
@Nullable private ApplicationContext applicationContext
Enclosing Spring context.
-
propertyType
@NonnullAfterInit private Class<T> propertyType
Type of bean to return.
-
-
Method Detail
-
setPropertyType
public void setPropertyType(@Nonnull Class<T> type)Set the type of bean to search for.- Parameters:
type- bean type
-
setApplicationContext
public void setApplicationContext(ApplicationContext context) throws BeansException
- Specified by:
setApplicationContextin interfaceApplicationContextAware- Throws:
BeansException
-
doInitialize
protected void doInitialize() throws ComponentInitializationException- Overrides:
doInitializein classAbstractMetadataDrivenConfigurationLookupStrategy<T>- Throws:
ComponentInitializationException
-
doTranslate
@Nullable protected T doTranslate(@Nonnull IdPAttribute tag)
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:
doTranslatein classAbstractMetadataDrivenConfigurationLookupStrategy<T>- Parameters:
tag- tag to translate- Returns:
- the setting derived from the tag's value(s)
-
doTranslate
@Nullable protected T doTranslate(@Nonnull Attribute tag)
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:
doTranslatein classAbstractMetadataDrivenConfigurationLookupStrategy<T>- Parameters:
tag- tag to translate- Returns:
- the setting derived from the tag's value(s)
-
-