Class StorageServiceDataConnector
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<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 StringID of the attribute generated by this data connector if simple result mapping used.private booleanWhether no record is an error.private StorageServiceTheStorageServiceto use. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidGet 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.voidSet 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, setValidatorMethods 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
-
storageService
TheStorageServiceto 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 theStorageServiceto use.- Parameters:
service- storage service to use
-
setNoResultAnError
public void setNoResultAnError(boolean flag) Sets whether the lack of a returned record constitutes an error.- Parameters:
flag- flag to set
-
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
-
setGeneratedAttributeID
Set the ID of the attribute generated by this connector if simple result mapping used.- Parameters:
id- what to set.
-
doInitialize
- 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
-