Class AttributeResolverWorkContext
java.lang.Object
org.opensaml.messaging.context.BaseContext
net.shibboleth.idp.attribute.resolver.context.AttributeResolverWorkContext
- All Implemented Interfaces:
Iterable<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
FieldsModifier and TypeFieldDescriptionprivate final Map<String,ResolvedAttributeDefinition> Attribute definitions that have been resolved and the resultant attribute.private final Map<String,ResolvedDataConnector> Data connectors that have been resolved and the resultant attributes. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the resolved data connectors that been recorded.Gets the resolved attribute definitions that been recorded.voidrecordAttributeDefinitionResolution(AttributeDefinition definition, IdPAttribute attribute) Records the results of an attribute definition resolution.voidrecordDataConnectorResolution(DataConnector connector, Map<String, IdPAttribute> attributes) Records the results of an data connector resolution.voidrecordFailoverResolution(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, setParentMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
resolvedAttributeDefinitions
Attribute definitions that have been resolved and the resultant attribute. -
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 nullattribute- 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 ResolutionExceptionRecords the results of an data connector resolution.- Parameters:
connector- the resolved data connector, must not be nullattributes- 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
-