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 GenericApplicationContext
The context we fired up.private Class<? extends AbstractDataConnector>
The class that we are implementing.private Boolean
Do 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 String
Data Connector property "failoverDataConnectorId".private final org.slf4j.Logger
Log4j logger.private Duration
Data Connector property "noRetryDelay".private ApplicationContext
Our 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
logger
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
destroyInstance
(AbstractDataConnector instance) protected AbstractDataConnector
Get 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.void
setApplicationContext
(ApplicationContext applicationContext) void
setBeanFactoryPostProcessors
(List<BeanFactoryPostProcessor> processors) Set the list of bean factory post processors for this connector.void
setBeanPostProcessors
(List<BeanPostProcessor> processors) Set the list of bean post processors for this connector.void
setExportAllAttributes
(boolean what) Set whether we export all attributes.void
setExportAttributes
(Collection<String> what) Sets the list of attribute names to export during resolution.void
Data Connector property "failoverDataConnectorId".void
setNoRetryDelay
(Duration delay) Data Connector property "noRetryDelay".void
setObjectType
(Class<? extends AbstractDataConnector> claz) Set the class we are going to build.void
setResources
(List<Resource> theResources) The resources to use.void
setSingleton
(boolean singleton) We do not allow non-singleton beans, if we did then we loose constructability.protected void
Set 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, setPropagateResolutionExceptions
Methods inherited from class net.shibboleth.ext.spring.factory.AbstractComponentAwareFactoryBean
createInstance
Methods 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:
setValues
in 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:
setSingleton
in classAbstractFactoryBean<AbstractDataConnector>
-
setObjectType
Set the class we are going to build.- Parameters:
claz
- the class.
-
getObjectType
- Specified by:
getObjectType
in interfaceFactoryBean<AbstractDataConnector>
- Specified by:
getObjectType
in classAbstractFactoryBean<AbstractDataConnector>
-
getParentContext
Returns the parentContext.- Returns:
- Returns the parentContext.
-
setApplicationContext
- Specified by:
setApplicationContext
in interfaceApplicationContextAware
- Throws:
BeansException
-
destroyInstance
- Overrides:
destroyInstance
in 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:
doCreateInstance
in classAbstractComponentAwareFactoryBean<AbstractDataConnector>
- Throws:
Exception
-