Package net.shibboleth.idp.saml.attribute.resolver.impl

# Class EntityAttributesDataConnector

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.saml.attribute.resolver.impl.EntityAttributesDataConnector

All Implemented Interfaces:
  `DataConnector`, `ResolverPlugin<Map<String,IdPAttribute>>`, `Component`, `DestructableComponent`, `IdentifiableComponent`, `IdentifiedComponent`, `InitializableComponent`, `UnmodifiableComponent`, `DisposableBean`

@ThreadSafe public class EntityAttributesDataConnector extends AbstractDataConnector
A `DataConnector` that returns the decoded `EntityAttributes` from a peer's metadata.

Since:
  5.0.0

## Field Summary

Fields
Modifier and Type
Field
Description
`private final org.slf4j.Logger`
`log`
Class logger.
`private Function<ProfileRequestContext,SAMLMetadataContext>`
`metadataContextLookupStrategy`
Metadata context lookup strategy.

## Constructor Summary

Constructors
Constructor
Description
`EntityAttributesDataConnector()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`protected Map<String,IdPAttribute>`
`doDataConnectorResolve(AttributeResolutionContext resolutionContext, AttributeResolverWorkContext workContext)`
Retrieves a collection of attributes from some data source.
`private void`
`resolveMappedTags(XMLObject parent, Map<String,IdPAttribute> results)`
Pull in mapped tags as resolved attributes.
`void`
`setMetadataContextLookupStrategy(Function<ProfileRequestContext,SAMLMetadataContext> strategy)`
Set the lookup strategy for the `SAMLMetadataContext` to pull tags from.

### Methods inherited from class net.shibboleth.idp.attribute.resolver.AbstractDataConnector

`doInitialize, doResolve, getExportAttributes, getFailoverDataConnectorId, getLastFail, getLastSuccess, getLogPrefix, getNoRetryDelay, setExportAttributes, setFailoverDataConnectorId, setLastFail, setLastSuccess, setNoRetryDelay`

### Methods inherited from class net.shibboleth.idp.attribute.resolver.AbstractResolverPlugin

`doDestroy, equals, getActivationCondition, getAttributeDependencies, getDataConnectorDependencies, hashCode, isPropagateResolutionExceptions, resolve, setActivationCondition, setAttributeDependencies, setDataConnectorDependencies, setPropagateResolutionExceptions`

### Methods inherited from class net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent

`setId`

### Methods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent

`ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException`

### Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent

`checkComponentActive, checkSetterPreconditions, 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.shared.component.DestructableComponent

`destroy, isDestroyed`

### Methods inherited from interface org.springframework.beans.factory.DisposableBean

`destroy`

### Methods inherited from interface net.shibboleth.shared.component.IdentifiedComponent

`getId`

### Methods inherited from interface net.shibboleth.shared.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 log
Class logger.

### metadataContextLookupStrategy

@Nonnull private Function<ProfileRequestContext,SAMLMetadataContext> metadataContextLookupStrategy
Metadata context lookup strategy.

## Constructor Details

### EntityAttributesDataConnector

public EntityAttributesDataConnector()
Constructor.

## Method Details

### setMetadataContextLookupStrategy

public void setMetadataContextLookupStrategy(@Nonnull Function<ProfileRequestContext,SAMLMetadataContext> strategy)
Set the lookup strategy for the `SAMLMetadataContext` to pull tags from.

Parameters:
  `strategy` - lookup strategy

### doDataConnectorResolve

@Nonnull @Unmodifiable @NotLive protected Map<String,IdPAttribute> doDataConnectorResolve(@Nonnull AttributeResolutionContext resolutionContext, @Nonnull AttributeResolverWorkContext workContext) throws ResolutionException
Retrieves a collection of attributes from some data source.

Specified by:
  `doDataConnectorResolve` in class `AbstractDataConnector`
Parameters:
  `resolutionContext` - current resolution context
  `workContext` - current resolver work context
Returns:
  collected attributes indexed by attribute ID
Throws:
  `ResolutionException` - thrown if there is a problem resolving the attributes

### resolveMappedTags

private void resolveMappedTags(@Nonnull XMLObject parent, @Nonnull Map<String,IdPAttribute> results) throws CloneNotSupportedException
Pull in mapped tags as resolved attributes.

Parameters:
  `parent` - parent object containing mapped tags
  `results` - accumulator for results
Throws:
  `CloneNotSupportedException` - if cloning the mapped tag fails