Class AttributeResolutionContext
java.lang.Object
org.opensaml.messaging.context.BaseContext
net.shibboleth.idp.attribute.resolver.context.AttributeResolutionContext
- All Implemented Interfaces:
Iterable<BaseContext>
A context supplying input to the
AttributeResolver
interface.-
Nested Class Summary
Nested classes/interfaces inherited from class org.opensaml.messaging.context.BaseContext
BaseContext.ContextSetNoRemoveIteratorDecorator
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
Whether the resolver should allow for results to come from cache.private String
The attribute source identity.private String
The attribute recipient's group identity.private String
The attribute recipient identity.private String
The principal associated with this resolution.Registry service to use to attach display metadata to resolved attributes.(internal) Names of the attributes that have been requested to be resolved.private String
Label distinguishing different "types" of attribute resolution for use in resolver.private Map<String,
IdPAttribute> Attributes which were resolved and released by the attribute resolver. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Get whether to allow for results from cache (defaults to true).Get the attribute issuer (me) associated with this resolution.Get the attribute recipient grouping associated with this resolution.Get the attribute recipient (her) associated with this resolution.Set the principal associated with this resolution.Get a live collection of the (internal) names of the attributes requested to be resolved.Get the optional "contextual" label associated with this attribute resolution.Get the collection of resolved attributes.Gets a transcoder registry service instance.void
resolveAttributes
(ReloadableService<AttributeResolver> attributeResolverService) Helper method to invoke an AttributeResolver service using this context.setAllowCachedResults
(boolean flag) Set whether to allow for results from cache.setAttributeIssuerID
(String value) Set the attribute issuer (me) associated with this resolution.Set the attribute recipient grouping associated with this resolution.setAttributeRecipientID
(String value) Set the attribute recipient (her) associated with this resolution.setPrincipal
(String who) Get the principal associated with this resolution.Set the (internal) names of the attributes requested to be resolved.setResolutionLabel
(String label) Set the optional "contextual" label associated with this attribute resolution.setResolvedIdPAttributes
(Collection<IdPAttribute> attributes) Set the set of resolved attributes.Sets a transcoder registry service instance.Methods inherited from class org.opensaml.messaging.context.BaseContext
addSubcontext, addSubcontext, clearSubcontexts, containsSubcontext, createSubcontext, getParent, getSubcontext, getSubcontext, getSubcontext, getSubcontext, iterator, 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
-
registryService
Registry service to use to attach display metadata to resolved attributes. -
requestedAttributeNames
(internal) Names of the attributes that have been requested to be resolved. -
principal
The principal associated with this resolution. -
attributeIssuerID
The attribute source identity. -
attributeRecipientID
The attribute recipient identity. -
attributeRecipientGroupID
The attribute recipient's group identity. -
allowCachedResults
private boolean allowCachedResultsWhether the resolver should allow for results to come from cache. -
resolutionLabel
Label distinguishing different "types" of attribute resolution for use in resolver. -
resolvedAttributes
Attributes which were resolved and released by the attribute resolver.
-
-
Constructor Details
-
AttributeResolutionContext
public AttributeResolutionContext()Constructor.
-
-
Method Details
-
getTranscoderRegistry
Gets a transcoder registry service instance.- Returns:
- registry service
- Since:
- 4.0.0
-
setTranscoderRegistry
@Nonnull public AttributeResolutionContext setTranscoderRegistry(@Nullable ReloadableService<AttributeTranscoderRegistry> service) Sets a transcoder registry service instance.- Parameters:
service
- registry service- Returns:
- this context
- Since:
- 4.0.0
-
getAllowCachedResults
public boolean getAllowCachedResults()Get whether to allow for results from cache (defaults to true).- Returns:
- whether to allow for results from cache
- Since:
- 3.3.0
-
setAllowCachedResults
Set whether to allow for results from cache.- Parameters:
flag
- flag to set- Returns:
- this context
- Since:
- 3.3.0
-
getResolutionLabel
Get the optional "contextual" label associated with this attribute resolution.Plugins/scripts/etc. can use this field to connect their behavior back to custom invocations of the resolver service.
- Returns:
- label
- Since:
- 3.4.0
-
setResolutionLabel
Set the optional "contextual" label associated with this attribute resolution.- Parameters:
label
- label to set- Returns:
- this context
- Since:
- 3.4.0
-
getAttributeIssuerID
Get the attribute issuer (me) associated with this resolution.- Returns:
- the attribute issuer associated with this resolution.
-
setAttributeIssuerID
Set the attribute issuer (me) associated with this resolution.- Parameters:
value
- the attribute issuer associated with this resolution.- Returns:
- this context
-
getAttributeRecipientID
Get the attribute recipient (her) associated with this resolution.- Returns:
- the attribute recipient associated with this resolution.
-
setAttributeRecipientID
Set the attribute recipient (her) associated with this resolution.- Parameters:
value
- the attribute recipient associated with this resolution.- Returns:
- this context
-
getAttributeRecipientGroupID
Get the attribute recipient grouping associated with this resolution.This is a protocol-independent way to represent an association between the attribute recipient and some larger group that may be relevant to attribute resolution.
- Returns:
- the attribute recipient group associated with this resolution
- Since:
- 3.4.0
-
setAttributeRecipientGroupID
Set the attribute recipient grouping associated with this resolution.- Parameters:
value
- the attribute recipient group associated with this resolution- Returns:
- this context
- Since:
- 3.4.0
-
getPrincipal
Set the principal associated with this resolution.- Returns:
- Returns the principal.
-
setPrincipal
Get the principal associated with this resolution.- Parameters:
who
- the principal to set.- Returns:
- this context
-
getRequestedIdPAttributeNames
Get a live collection of the (internal) names of the attributes requested to be resolved.- Returns:
- live collection of attributes requested to be resolved
-
setRequestedIdPAttributeNames
@Nullable public AttributeResolutionContext setRequestedIdPAttributeNames(@Nonnull @NonnullElements Collection<String> names) Set the (internal) names of the attributes requested to be resolved.- Parameters:
names
- the (internal) names of the attributes requested to be resolved- Returns:
- this context
-
getResolvedIdPAttributes
@Nonnull @NonnullElements @Unmodifiable @NotLive public Map<String,IdPAttribute> getResolvedIdPAttributes()Get the collection of resolved attributes.- Returns:
- set of resolved attributes
-
setResolvedIdPAttributes
@Nullable public AttributeResolutionContext setResolvedIdPAttributes(@Nonnull @NonnullElements Collection<IdPAttribute> attributes) Set the set of resolved attributes.- Parameters:
attributes
- set of resolved attributes- Returns:
- this context
-
resolveAttributes
public void resolveAttributes(@Nonnull ReloadableService<AttributeResolver> attributeResolverService) Helper method to invoke an AttributeResolver service using this context.- Parameters:
attributeResolverService
- the service to invoke- Since:
- 3.3.0
-