Class RDBMSDataConnector
java.lang.Object
net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
net.shibboleth.idp.attribute.resolver.AbstractResolverPlugin<Map<String,IdPAttribute>>
net.shibboleth.idp.attribute.resolver.AbstractDataConnector
net.shibboleth.idp.attribute.resolver.dc.impl.AbstractSearchDataConnector<ExecutableStatement,ResultMappingStrategy>
net.shibboleth.idp.attribute.resolver.dc.rdbms.impl.RDBMSDataConnector
- All Implemented Interfaces:
DataConnector
,ResolverPlugin<Map<String,
,IdPAttribute>> Component
,DestructableComponent
,IdentifiableComponent
,IdentifiedComponent
,InitializableComponent
,UnmodifiableComponent
,DisposableBean
public class RDBMSDataConnector
extends AbstractSearchDataConnector<ExecutableStatement,ResultMappingStrategy>
A
DataConnector
that queries a relation database in order to retrieve
attribute data.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate DataSource
JDBC data source for retrievingConnection
s.private boolean
Whether the default mapping strategy is being used.private boolean
Whether the default validator is being used.private final org.slf4j.Logger
Class logger. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Gets the JDBC data source for retrievingConnection
s.protected Map<String,
IdPAttribute> retrieveAttributes
(ExecutableStatement statement) Attempts to retrieve the attribute from the database.void
setDataSource
(DataSource source) Sets the JDBC data source for retrievingConnection
s.void
setMappingStrategy
(ResultMappingStrategy strategy) Sets the strategy for mapping from search results to a collection ofIdPAttribute
s.void
setValidator
(Validator validator) Sets the validator used to validate this connector.Methods inherited from class net.shibboleth.idp.attribute.resolver.dc.impl.AbstractSearchDataConnector
doDataConnectorResolve, getExecutableSearchBuilder, getMappingStrategy, getResultsCache, getValidator, isFailFastInitialize, setExecutableSearchBuilder, setFailFastInitialize, setResultsCache
Methods inherited from class net.shibboleth.idp.attribute.resolver.AbstractDataConnector
doResolve, getExportAttributes, getFailoverDataConnectorId, getLastFail, getLastSuccess, getLogPrefix, getNoRetryDelay, isExportAllAttributes, setExportAllAttributes, setExportAttributes, setFailoverDataConnectorId, setLastFail, setLastSuccess, setNoRetryDelay
Methods inherited from class net.shibboleth.idp.attribute.resolver.AbstractResolverPlugin
addDisplayInformation, doDestroy, equals, getActivationCondition, getAttributeDependencies, getDataConnectorDependencies, getProfileContextStrategy, hashCode, isPropagateResolutionExceptions, isSuppressDisplayInformation, resolve, setActivationCondition, setAttributeDependencies, setDataConnectorDependencies, setProfileContextStrategy, setPropagateResolutionExceptions, setSuppressDisplayInformation
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
setId
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
getId
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, initialize, isDestroyed, isInitialized
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.shibboleth.utilities.java.support.component.DestructableComponent
destroy, isDestroyed
Methods inherited from interface org.springframework.beans.factory.DisposableBean
destroy
Methods inherited from interface net.shibboleth.utilities.java.support.component.IdentifiedComponent
getId
Methods inherited from interface net.shibboleth.utilities.java.support.component.InitializableComponent
initialize, isInitialized
Methods inherited from interface net.shibboleth.idp.attribute.resolver.ResolverPlugin
getActivationCondition, getAttributeDependencies, getDataConnectorDependencies, isPropagateResolutionExceptions, resolve
-
Field Details
-
log
private final org.slf4j.Logger logClass logger. -
dataSource
JDBC data source for retrievingConnection
s. -
defaultValidator
private boolean defaultValidatorWhether the default validator is being used. -
defaultMappingStrategy
private boolean defaultMappingStrategyWhether the default mapping strategy is being used.
-
-
Constructor Details
-
RDBMSDataConnector
public RDBMSDataConnector()Constructor.
-
-
Method Details
-
getDataSource
Gets the JDBC data source for retrievingConnection
s.- Returns:
- JDBC data source for retrieving
Connection
s
-
setDataSource
Sets the JDBC data source for retrievingConnection
s.- Parameters:
source
- JDBC data source for retrievingConnection
s
-
setValidator
Sets the validator used to validate this connector.- Overrides:
setValidator
in classAbstractSearchDataConnector<ExecutableStatement,
ResultMappingStrategy> - Parameters:
validator
- used to validate this connector
-
setMappingStrategy
Sets the strategy for mapping from search results to a collection ofIdPAttribute
s.- Overrides:
setMappingStrategy
in classAbstractSearchDataConnector<ExecutableStatement,
ResultMappingStrategy> - Parameters:
strategy
- strategy for mapping from search results to a collection ofIdPAttribute
s
-
doInitialize
- Overrides:
doInitialize
in classAbstractSearchDataConnector<ExecutableStatement,
ResultMappingStrategy> - Throws:
ComponentInitializationException
-
retrieveAttributes
@Nullable protected Map<String,IdPAttribute> retrieveAttributes(ExecutableStatement statement) throws ResolutionException Attempts to retrieve the attribute from the database.- Specified by:
retrieveAttributes
in classAbstractSearchDataConnector<ExecutableStatement,
ResultMappingStrategy> - Parameters:
statement
- statement used to retrieve data from the database- Returns:
- attributes gotten from the database
- Throws:
ResolutionException
- thrown if there is a problem retrieving data from the database or transforming that data intoIdPAttribute
s
-