Package net.shibboleth.idp.attribute.resolver.context

# Class AttributeResolverWorkContext

java.lang.Object
org.opensaml.messaging.context.BaseContext
net.shibboleth.idp.attribute.resolver.context.AttributeResolverWorkContext

All Implemented Interfaces:
  `Iterable<BaseContext>`

@NotThreadSafe public final class AttributeResolverWorkContext extends BaseContext
A context which carries and collects information through the attribute resolution process, and coordinates data between the resolver implementation and the various resolver plugin implementations.

This should be considered a private API limited to plugin implementations.

## Nested Class Summary

## Nested classes/interfaces inherited from class org.opensaml.messaging.context.BaseContext

`BaseContext.ContextSetNoRemoveIteratorDecorator, BaseContext.DeprecatedContextClassNameLookAside`

## Field Summary

Fields
Modifier and Type
Field
Description
`private final Map<String,ResolvedAttributeDefinition>`
`resolvedAttributeDefinitions`
Attribute definitions that have been resolved and the resultant attribute.
`private final Map<String,ResolvedDataConnector>`
`resolvedDataConnectors`
Data connectors that have been resolved and the resultant attributes.

## Constructor Summary

Constructors
Constructor
Description
`AttributeResolverWorkContext()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`Map<String,ResolvedDataConnector>`
`getResolvedDataConnectors()`
Gets the resolved data connectors that been recorded.
`Map<String,ResolvedAttributeDefinition>`
`getResolvedIdPAttributeDefinitions()`
Gets the resolved attribute definitions that been recorded.
`void`
`recordAttributeDefinitionResolution(AttributeDefinition definition, IdPAttribute attribute)`
Records the results of an attribute definition resolution.
`void`
`recordDataConnectorResolution(DataConnector connector, Map<String,IdPAttribute> attributes)`
Records the results of an data connector resolution.
`void`
`recordFailoverResolution(DataConnector failedConnector, DataConnector failoverConnector)`
Transfer the attributes from a failover data connector to a failed one.

### Methods inherited from class org.opensaml.messaging.context.BaseContext

`addSubcontext, addSubcontext, clearSubcontexts, containsSubcontext, createSubcontext, ensureSubcontext, ensureSubcontext, getParent, getSubcontext, getSubcontext, getSubcontext, getSubcontext, iterator, removeFromParent, removeSubcontext, removeSubcontext, setParent`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface java.lang.Iterable

`forEach, spliterator`

## Field Details

### resolvedAttributeDefinitions

@Nonnull private final Map<String,ResolvedAttributeDefinition> resolvedAttributeDefinitions
Attribute definitions that have been resolved and the resultant attribute.

### resolvedDataConnectors

@Nonnull private final Map<String,ResolvedDataConnector> resolvedDataConnectors
Data connectors that have been resolved and the resultant attributes.

## Constructor Details

### AttributeResolverWorkContext

public AttributeResolverWorkContext()
Constructor.

## Method Details

### getResolvedIdPAttributeDefinitions

@Nonnull @Unmodifiable @NotLive public Map<String,ResolvedAttributeDefinition> getResolvedIdPAttributeDefinitions()
Gets the resolved attribute definitions that been recorded.

Returns:
  resolved attribute definitions that been recorded

### recordAttributeDefinitionResolution

public void recordAttributeDefinitionResolution(@Nonnull AttributeDefinition definition, @Nullable IdPAttribute attribute) throws ResolutionException
Records the results of an attribute definition resolution.

Parameters:
  `definition` - the resolved attribute definition, must not be null
  `attribute` - the attribute produced by the given attribute definition, may be null
Throws:
  `ResolutionException` - thrown if a result of a resolution for the given attribute definition have already been recorded

### getResolvedDataConnectors

@Nonnull @Unmodifiable @NotLive public Map<String,ResolvedDataConnector> getResolvedDataConnectors()
Gets the resolved data connectors that been recorded.

Returns:
  resolved data connectors that been recorded

### recordDataConnectorResolution

public void recordDataConnectorResolution(@Nonnull DataConnector connector, @Nullable Map<String,IdPAttribute> attributes) throws ResolutionException
Records the results of an data connector resolution.

Parameters:
  `connector` - the resolved data connector, must not be null
  `attributes` - the attribute produced by the given data connector, may be null
Throws:
  `ResolutionException` - thrown if a result of a resolution for the given data connector has already been recorded

### recordFailoverResolution

public void recordFailoverResolution(@Nonnull DataConnector failedConnector, @Nonnull DataConnector failoverConnector) throws ResolutionException
Transfer the attributes from a failover data connector to a failed one. This allows up stream processing to pretend that the failed connector worked OK. The inherent duplication is OK since the code which exploits this does the dedupe.

Parameters:
  `failedConnector` - the connector which failed and provoked the failover.
  `failoverConnector` - the failover connector which did resolve OK.
Throws:
  `ResolutionException` - if badness ocurrs