Class DataConnectorFactoryBean
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<T>
net.shibboleth.ext.spring.factory.AbstractComponentAwareFactoryBean<T>
net.shibboleth.idp.attribute.resolver.spring.impl.AbstractResolverPluginFactoryBean<AbstractDataConnector>
net.shibboleth.idp.attribute.resolver.spring.dc.impl.DataConnectorFactoryBean
- All Implemented Interfaces:
Aware,BeanClassLoaderAware,BeanFactoryAware,DisposableBean,FactoryBean<AbstractDataConnector>,InitializingBean,ApplicationContextAware
public class DataConnectorFactoryBean
extends AbstractResolverPluginFactoryBean<AbstractDataConnector>
implements ApplicationContextAware
A factory bean to collect the parameterization that goes onto a
AbstractDataConnector.
It is specifically aimed at the implementations where contents are plugged in via external resources.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate GenericApplicationContextThe context we fired up.private Class<? extends AbstractDataConnector>The class that we are implementing.private BooleanDo we release all attributes?.private Collection<String>Which named attributes do we release?.private List<BeanFactoryPostProcessor>List of bean factory post processors for this connector's content.private StringData Connector property "failoverDataConnectorId".private final org.slf4j.LoggerLog4j logger.private DurationData Connector property "noRetryDelay".private ApplicationContextOur parent context.private List<BeanPostProcessor>List of bean post processors for this connector's content.The resources we are importing.Fields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
loggerFields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddestroyInstance(AbstractDataConnector instance) protected AbstractDataConnectorGet the post processors.Get the list of bean post processors for this connector.Data Connector property "failoverDataConnectorId".Data Connector property "noRetryDelay".Class<? extends AbstractDataConnector>Returns the parentContext.The resources to use.voidsetApplicationContext(ApplicationContext applicationContext) voidsetBeanFactoryPostProcessors(List<BeanFactoryPostProcessor> processors) Set the list of bean factory post processors for this connector.voidsetBeanPostProcessors(List<BeanPostProcessor> processors) Set the list of bean post processors for this connector.voidsetExportAllAttributes(boolean what) Set whether we export all attributes.voidsetExportAttributes(Collection<String> what) Sets the list of attribute names to export during resolution.voidData Connector property "failoverDataConnectorId".voidsetNoRetryDelay(Duration delay) Data Connector property "noRetryDelay".voidsetObjectType(Class<? extends AbstractDataConnector> claz) Set the class we are going to build.voidsetResources(List<Resource> theResources) The resources to use.voidsetSingleton(boolean singleton) We do not allow non-singleton beans, if we did then we loose constructability.protected voidSet the locally define values into the object under construction.Methods inherited from class net.shibboleth.idp.attribute.resolver.spring.impl.AbstractResolverPluginFactoryBean
getActivationCondition, getAttributeDependencies, getDataConnectorDependencies, getId, getProfileContextStrategy, getPropagateResolutionExceptions, setActivationCondition, setAttributeDependencies, setDataConnectorDependencies, setId, setProfileContextStrategy, setPropagateResolutionExceptionsMethods inherited from class net.shibboleth.ext.spring.factory.AbstractComponentAwareFactoryBean
createInstanceMethods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logLog4j logger. -
connectorClass
The class that we are implementing. -
resources
The resources we are importing. -
parentContext
Our parent context. -
appContext
The context we fired up. -
factoryPostProcessors
List of bean factory post processors for this connector's content. -
postProcessors
List of bean post processors for this connector's content. -
failoverDataConnectorId
Data Connector property "failoverDataConnectorId". -
noRetryDelay
Data Connector property "noRetryDelay". -
exportAllAttributes
Do we release all attributes?. -
exportAttributes
Which named attributes do we release?.
-
-
Constructor Details
-
DataConnectorFactoryBean
public DataConnectorFactoryBean()
-
-
Method Details
-
getFailoverDataConnectorId
Data Connector property "failoverDataConnectorId".- Returns:
- the value of property to set or null if never set
-
setFailoverDataConnectorId
Data Connector property "failoverDataConnectorId".- Parameters:
id- the value to set
-
getNoRetryDelay
Data Connector property "noRetryDelay".- Returns:
- the value of property to set or null if never set
-
setNoRetryDelay
Data Connector property "noRetryDelay".- Parameters:
delay- the value to set
-
setResources
The resources to use.- Parameters:
theResources- the resources to look at
-
getResources
The resources to use.- Returns:
- the resources to look at
-
setExportAttributes
Sets the list of attribute names to export during resolution.- Parameters:
what- the list
-
setExportAllAttributes
public void setExportAllAttributes(boolean what) Set whether we export all attributes.- Parameters:
what- whether we export all attributes
-
setBeanFactoryPostProcessors
public void setBeanFactoryPostProcessors(@Nonnull @NonnullElements List<BeanFactoryPostProcessor> processors) Set the list of bean factory post processors for this connector.- Parameters:
processors- bean factory post processors to apply
-
getBeanFactoryPostProcessors
Get the post processors.- Returns:
- the bean factory post processors
-
setBeanPostProcessors
Set the list of bean post processors for this connector.- Parameters:
processors- bean post processors to apply
-
getBeanPostProcessors
Get the list of bean post processors for this connector.- Returns:
- processors bean post processors to apply
-
setValues
Set the locally define values into the object under construction.- Overrides:
setValuesin classAbstractResolverPluginFactoryBean<AbstractDataConnector>- Parameters:
what- the object being built.
-
setSingleton
public void setSingleton(boolean singleton) We do not allow non-singleton beans, if we did then we loose constructability.- Overrides:
setSingletonin classAbstractFactoryBean<AbstractDataConnector>
-
setObjectType
Set the class we are going to build.- Parameters:
claz- the class.
-
getObjectType
- Specified by:
getObjectTypein interfaceFactoryBean<AbstractDataConnector>- Specified by:
getObjectTypein classAbstractFactoryBean<AbstractDataConnector>
-
getParentContext
Returns the parentContext.- Returns:
- Returns the parentContext.
-
setApplicationContext
- Specified by:
setApplicationContextin interfaceApplicationContextAware- Throws:
BeansException
-
destroyInstance
- Overrides:
destroyInstancein classAbstractComponentAwareFactoryBean<AbstractDataConnector>- Throws:
Exception
-
doCreateInstance
In order to create the bean we introspect with respect to contents of the Spring resources and inject as required.
- Specified by:
doCreateInstancein classAbstractComponentAwareFactoryBean<AbstractDataConnector>- Throws:
Exception
-