Class ResolvedDataConnector
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.ResolvedDataConnector
- All Implemented Interfaces:
DataConnector,ResolverPlugin<Map<String,,IdPAttribute>> Component,DestructableComponent,IdentifiableComponent,IdentifiedComponent,InitializableComponent,UnmodifiableComponent,DisposableBean
A proxy which wraps a resolved data connector and always returns the same attributes. The goal being that once a data
connector is resolved this can be used in its place and calls to
ResolverPlugin.resolve(AttributeResolutionContext) are "free".
This proxy is immutable so all setter methods simply return.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map<String,IdPAttribute> The attributes produced by the resolved data connector.private final DataConnectorThe data connector that was resolved to produce the attributes. -
Constructor Summary
ConstructorsConstructorDescriptionResolvedDataConnector(DataConnector connector, Map<String, IdPAttribute> attributes) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected Map<String,IdPAttribute> doDataConnectorResolve(AttributeResolutionContext resolutionContext, AttributeResolverWorkContext workContext) Retrieves a collection of attributes from some data source.booleanGet the predicate which defines whether this plugin is active for a given request.Gets the unmodifiable list of attributeDependencies for this plugin.Gets the unmodifiable list of dependencies for this plugin.Gets the list of attribute names to export during resolution.Gets the ID of theAbstractDataConnectorwhose values will be used in the event that this data connector experiences an error.getId()Gets the resolved attributes.Gets the wrapped data connector that was resolved.inthashCode()booleanbooleanGet whether aResolutionExceptionthat occurred resolving attributes will be re-thrown.voidsetExportAttributes(Collection<String> what) Sets the list of attribute names to export during resolution.voidSet the ID of theAbstractDataConnectorwhose values will be used in the event that this data connector experiences an error.voidsetPropagateResolutionExceptions(boolean propagate) Set whether anAttributeResolutionContextthat occurred resolving attributes will be re-thrown.toString()Methods inherited from class net.shibboleth.idp.attribute.resolver.AbstractDataConnector
doInitialize, doResolve, getLastFail, getLastSuccess, getLogPrefix, getNoRetryDelay, setLastFail, setLastSuccess, setNoRetryDelayMethods inherited from class net.shibboleth.idp.attribute.resolver.AbstractResolverPlugin
doDestroy, resolve, setActivationCondition, setAttributeDependencies, setDataConnectorDependenciesMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
setIdMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
ensureId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentExceptionMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, initialize, isDestroyedMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, 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.InitializableComponent
initializeMethods inherited from interface net.shibboleth.idp.attribute.resolver.ResolverPlugin
resolve
-
Field Details
-
resolvedConnector
The data connector that was resolved to produce the attributes. -
resolvedAttributes
The attributes produced by the resolved data connector.
-
-
Constructor Details
-
ResolvedDataConnector
public ResolvedDataConnector(@Nonnull DataConnector connector, @Nullable Map<String, IdPAttribute> attributes) Constructor.- Parameters:
connector- data connector that was resolved to produce the attributesattributes- attributes produced by the resolved data connector
-
-
Method Details
-
doDataConnectorResolve
@Nullable protected Map<String,IdPAttribute> doDataConnectorResolve(@Nonnull AttributeResolutionContext resolutionContext, @Nonnull AttributeResolverWorkContext workContext) throws ResolutionException Retrieves a collection of attributes from some data source.- Specified by:
doDataConnectorResolvein classAbstractDataConnector- Parameters:
resolutionContext- current resolution contextworkContext- current resolver work context- Returns:
- collected attributes indexed by attribute ID
- Throws:
ResolutionException- thrown if there is a problem resolving the attributes
-
equals
- Overrides:
equalsin classAbstractResolverPlugin<Map<String,IdPAttribute>>
-
getAttributeDependencies
Gets the unmodifiable list of attributeDependencies for this plugin.- Specified by:
getAttributeDependenciesin interfaceResolverPlugin<Map<String,IdPAttribute>> - Overrides:
getAttributeDependenciesin classAbstractResolverPlugin<Map<String,IdPAttribute>> - Returns:
- unmodifiable list of dependencies for this plugin, never null.
-
getDataConnectorDependencies
Gets the unmodifiable list of dependencies for this plugin.- Specified by:
getDataConnectorDependenciesin interfaceResolverPlugin<Map<String,IdPAttribute>> - Overrides:
getDataConnectorDependenciesin classAbstractResolverPlugin<Map<String,IdPAttribute>> - Returns:
- unmodifiable list of dependencies for this plugin, never null.
-
getActivationCondition
Get the predicate which defines whether this plugin is active for a given request.- Specified by:
getActivationConditionin interfaceResolverPlugin<Map<String,IdPAttribute>> - Overrides:
getActivationConditionin classAbstractResolverPlugin<Map<String,IdPAttribute>> - Returns:
- the predicate.
-
getFailoverDataConnectorId
Gets the ID of theAbstractDataConnectorwhose values will be used in the event that this data connector experiences an error.- Specified by:
getFailoverDataConnectorIdin interfaceDataConnector- Overrides:
getFailoverDataConnectorIdin classAbstractDataConnector- Returns:
- ID of the
AbstractDataConnectorwhose values will be used in the event that this data connector experiences an error
-
getId
- Specified by:
getIdin interfaceIdentifiedComponent- Overrides:
getIdin classAbstractIdentifiedInitializableComponent
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractResolverPlugin<Map<String,IdPAttribute>>
-
isPropagateResolutionExceptions
public boolean isPropagateResolutionExceptions()Get whether aResolutionExceptionthat occurred resolving attributes will be re-thrown. Doing so will cause the entire attribute resolution request to fail.- Specified by:
isPropagateResolutionExceptionsin interfaceResolverPlugin<Map<String,IdPAttribute>> - Overrides:
isPropagateResolutionExceptionsin classAbstractResolverPlugin<Map<String,IdPAttribute>> - Returns:
- true if
ResolutionExceptions are propagated, false if not
-
setFailoverDataConnectorId
Set the ID of theAbstractDataConnectorwhose values will be used in the event that this data connector experiences an error.- Overrides:
setFailoverDataConnectorIdin classAbstractDataConnector- Parameters:
id- ID of theAbstractDataConnectorwhose values will be used in the event that this data connector experiences an error
-
setPropagateResolutionExceptions
public void setPropagateResolutionExceptions(boolean propagate) Set whether anAttributeResolutionContextthat occurred resolving attributes will be re-thrown. Doing so will cause the entire attribute resolution request to fail.- Overrides:
setPropagateResolutionExceptionsin classAbstractResolverPlugin<Map<String,IdPAttribute>> - Parameters:
propagate- true ifResolutionExceptions are propagated, false if not
-
toString
-
setExportAttributes
Sets the list of attribute names to export during resolution.- Overrides:
setExportAttributesin classAbstractDataConnector- Parameters:
what- the list
-
getExportAttributes
Gets the list of attribute names to export during resolution.- Specified by:
getExportAttributesin interfaceDataConnector- Overrides:
getExportAttributesin classAbstractDataConnector- Returns:
- the list of attribute names to export during resolution
-
getResolvedAttributes
Gets the resolved attributes.- Returns:
- the resolved attributes
-
getResolvedConnector
Gets the wrapped data connector that was resolved.- Returns:
- the resolved data connector
-
isInitialized
public boolean isInitialized()- Specified by:
isInitializedin interfaceInitializableComponent- Overrides:
isInitializedin classAbstractInitializableComponent
-