Class StorageServiceDataConnector
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<StorageServiceSearch,StorageMappingStrategy>
net.shibboleth.idp.attribute.resolver.dc.storage.impl.StorageServiceDataConnector
- All Implemented Interfaces:
DataConnector
,ResolverPlugin<Map<String,
,IdPAttribute>> Component
,DestructableComponent
,IdentifiableComponent
,IdentifiedComponent
,InitializableComponent
,UnmodifiableComponent
,DisposableBean
public class StorageServiceDataConnector
extends AbstractSearchDataConnector<StorageServiceSearch,StorageMappingStrategy>
This class implements a
DataConnector
that obtains data from a StorageService
.- Since:
- 4.1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
ID of the attribute generated by this data connector if simple result mapping used.private final org.slf4j.Logger
Class logger.private boolean
Whether no record is an error.private StorageService
TheStorageService
to use. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Get the ID of the attribute generated by this connector if simple result mapping used.protected Map<String,
IdPAttribute> retrieveAttributes
(StorageServiceSearch executable) Attempts to retrieve attributes from the data source.void
Set the ID of the attribute generated by this connector if simple result mapping used.void
setNoResultAnError
(boolean flag) Sets whether the lack of a returned record constitutes an error.void
setStorageService
(StorageService service) Set theStorageService
to use.Methods inherited from class net.shibboleth.idp.attribute.resolver.dc.impl.AbstractSearchDataConnector
doDataConnectorResolve, getExecutableSearchBuilder, getMappingStrategy, getResultsCache, getValidator, isFailFastInitialize, setExecutableSearchBuilder, setFailFastInitialize, setMappingStrategy, setResultsCache, setValidator
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
@Nonnull private final org.slf4j.Logger logClass logger. -
storageService
TheStorageService
to use. -
generatedAttributeID
ID of the attribute generated by this data connector if simple result mapping used. -
noResultAnError
private boolean noResultAnErrorWhether no record is an error.
-
-
Constructor Details
-
StorageServiceDataConnector
public StorageServiceDataConnector()Constructor.
-
-
Method Details
-
setStorageService
Set theStorageService
to use.- Parameters:
service
- storage service to use
-
getGeneratedAttributeID
Get the ID of the attribute generated by this connector if simple result mapping used.- Returns:
- ID of the attribute generated by this connector
-
setNoResultAnError
public void setNoResultAnError(boolean flag) Sets whether the lack of a returned record constitutes an error.- Parameters:
flag
- flag to set
-
setGeneratedAttributeID
Set the ID of the attribute generated by this connector if simple result mapping used.- Parameters:
id
- what to set.
-
doInitialize
- Overrides:
doInitialize
in classAbstractSearchDataConnector<StorageServiceSearch,
StorageMappingStrategy> - Throws:
ComponentInitializationException
-
retrieveAttributes
@Nullable protected Map<String,IdPAttribute> retrieveAttributes(@Nonnull StorageServiceSearch executable) throws ResolutionException Attempts to retrieve attributes from the data source.- Specified by:
retrieveAttributes
in classAbstractSearchDataConnector<StorageServiceSearch,
StorageMappingStrategy> - Parameters:
executable
- used to retrieve data from the data source- Returns:
- attributes
- Throws:
ResolutionException
- thrown if there is a problem retrieving data from the data source
-