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 aDataConnectorthat obtains data from aStorageService.- Since:
- 4.1.0
-
-
Field Summary
Fields Modifier and Type Field Description private StringgeneratedAttributeIDID of the attribute generated by this data connector if simple result mapping used.private org.slf4j.LoggerlogClass logger.private booleannoResultAnErrorWhether no record is an error.private StorageServicestorageServiceTheStorageServiceto use.
-
Constructor Summary
Constructors Constructor Description StorageServiceDataConnector()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoInitialize()StringgetGeneratedAttributeID()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.voidsetGeneratedAttributeID(String id)Set the ID of the attribute generated by this connector if simple result mapping used.voidsetNoResultAnError(boolean flag)Sets whether the lack of a returned record constitutes an error.voidsetStorageService(StorageService service)Set theStorageServiceto 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 Detail
-
log
@Nonnull private final org.slf4j.Logger log
Class logger.
-
storageService
@NonnullAfterInit private StorageService storageService
TheStorageServiceto use.
-
generatedAttributeID
@NonnullAfterInit private String generatedAttributeID
ID of the attribute generated by this data connector if simple result mapping used.
-
noResultAnError
private boolean noResultAnError
Whether no record is an error.
-
-
Method Detail
-
setStorageService
public void setStorageService(@Nonnull StorageService service)Set theStorageServiceto use.- Parameters:
service- storage service to use
-
getGeneratedAttributeID
@NonnullAfterInit public String 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
public void setGeneratedAttributeID(@Nullable String id)Set the ID of the attribute generated by this connector if simple result mapping used.- Parameters:
id- what to set.
-
doInitialize
public void doInitialize() throws ComponentInitializationException- Overrides:
doInitializein 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:
retrieveAttributesin 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
-
-