Class RDBMSDataConnector
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.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 DataSourceJDBC data source for retrievingConnections.private booleanWhether the default mapping strategy is being used.private booleanWhether the default validator is being used.private final org.slf4j.LoggerClass logger. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidGets the JDBC data source for retrievingConnections.protected Map<String,IdPAttribute> retrieveAttributes(ExecutableStatement statement) Attempts to retrieve the attribute from the database.voidsetDataSource(DataSource source) Sets the JDBC data source for retrievingConnections.voidsetMappingStrategy(ResultMappingStrategy strategy) Sets the strategy for mapping from search results to a collection ofIdPAttributes.voidsetValidator(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, setResultsCacheMethods inherited from class net.shibboleth.idp.attribute.resolver.AbstractDataConnector
doResolve, getExportAttributes, getFailoverDataConnectorId, getLastFail, getLastSuccess, getLogPrefix, getNoRetryDelay, setExportAttributes, setFailoverDataConnectorId, setLastFail, setLastSuccess, setNoRetryDelayMethods inherited from class net.shibboleth.idp.attribute.resolver.AbstractResolverPlugin
doDestroy, equals, getActivationCondition, getAttributeDependencies, getDataConnectorDependencies, hashCode, isPropagateResolutionExceptions, resolve, setActivationCondition, setAttributeDependencies, setDataConnectorDependencies, setPropagateResolutionExceptionsMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
setIdMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentExceptionMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.shared.component.DestructableComponent
destroy, isDestroyedMethods inherited from interface org.springframework.beans.factory.DisposableBean
destroyMethods inherited from interface net.shibboleth.shared.component.IdentifiedComponent
getIdMethods inherited from interface net.shibboleth.shared.component.InitializableComponent
initialize, isInitializedMethods inherited from interface net.shibboleth.idp.attribute.resolver.ResolverPlugin
getActivationCondition, getAttributeDependencies, getDataConnectorDependencies, isPropagateResolutionExceptions, resolve
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
dataSource
JDBC data source for retrievingConnections. -
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()
-
-
Method Details
-
getDataSource
Gets the JDBC data source for retrievingConnections.- Returns:
- JDBC data source for retrieving
Connections
-
setDataSource
Sets the JDBC data source for retrievingConnections.- Parameters:
source- JDBC data source for retrievingConnections
-
setValidator
Sets the validator used to validate this connector.- Overrides:
setValidatorin classAbstractSearchDataConnector<ExecutableStatement,ResultMappingStrategy> - Parameters:
validator- used to validate this connector
-
setMappingStrategy
Sets the strategy for mapping from search results to a collection ofIdPAttributes.- Overrides:
setMappingStrategyin classAbstractSearchDataConnector<ExecutableStatement,ResultMappingStrategy> - Parameters:
strategy- strategy for mapping from search results to a collection ofIdPAttributes
-
doInitialize
- Overrides:
doInitializein classAbstractSearchDataConnector<ExecutableStatement,ResultMappingStrategy> - Throws:
ComponentInitializationException
-
retrieveAttributes
@Nullable @Unmodifiable @NotLive protected Map<String,IdPAttribute> retrieveAttributes(@Nullable ExecutableStatement statement) throws ResolutionException Attempts to retrieve the attribute from the database.- Specified by:
retrieveAttributesin 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 intoIdPAttributes
-