Class AttributeResolutionContext
- java.lang.Object
-
- org.opensaml.messaging.context.BaseContext
-
- net.shibboleth.idp.attribute.resolver.context.AttributeResolutionContext
-
- All Implemented Interfaces:
Iterable<BaseContext>
@NotThreadSafe public final class AttributeResolutionContext extends BaseContext
A context supplying input to theAttributeResolverinterface.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.opensaml.messaging.context.BaseContext
BaseContext.ContextSetNoRemoveIteratorDecorator
-
-
Field Summary
Fields Modifier and Type Field Description private booleanallowCachedResultsWhether the resolver should allow for results to come from cache.private StringattributeIssuerIDThe attribute source identity.private StringattributeRecipientGroupIDThe attribute recipient's group identity.private StringattributeRecipientIDThe attribute recipient identity.private StringprincipalThe principal associated with this resolution.private ReloadableService<AttributeTranscoderRegistry>registryServiceRegistry service to use to attach display metadata to resolved attributes.private Set<String>requestedAttributeNames(internal) Names of the attributes that have been requested to be resolved.private StringresolutionLabelLabel distinguishing different "types" of attribute resolution for use in resolver.private Map<String,IdPAttribute>resolvedAttributesAttributes which were resolved and released by the attribute resolver.
-
Constructor Summary
Constructors Constructor Description AttributeResolutionContext()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetAllowCachedResults()Get whether to allow for results from cache (defaults to true).StringgetAttributeIssuerID()Get the attribute issuer (me) associated with this resolution.StringgetAttributeRecipientGroupID()Get the attribute recipient grouping associated with this resolution.StringgetAttributeRecipientID()Get the attribute recipient (her) associated with this resolution.StringgetPrincipal()Set the principal associated with this resolution.Collection<String>getRequestedIdPAttributeNames()Get a live collection of the (internal) names of the attributes requested to be resolved.StringgetResolutionLabel()Get the optional "contextual" label associated with this attribute resolution.Map<String,IdPAttribute>getResolvedIdPAttributes()Get the collection of resolved attributes.ReloadableService<AttributeTranscoderRegistry>getTranscoderRegistry()Gets a transcoder registry service instance.voidresolveAttributes(ReloadableService<AttributeResolver> attributeResolverService)Helper method to invoke an AttributeResolver service using this context.AttributeResolutionContextsetAllowCachedResults(boolean flag)Set whether to allow for results from cache.AttributeResolutionContextsetAttributeIssuerID(String value)Set the attribute issuer (me) associated with this resolution.AttributeResolutionContextsetAttributeRecipientGroupID(String value)Set the attribute recipient grouping associated with this resolution.AttributeResolutionContextsetAttributeRecipientID(String value)Set the attribute recipient (her) associated with this resolution.AttributeResolutionContextsetPrincipal(String who)Get the principal associated with this resolution.AttributeResolutionContextsetRequestedIdPAttributeNames(Collection<String> names)Set the (internal) names of the attributes requested to be resolved.AttributeResolutionContextsetResolutionLabel(String label)Set the optional "contextual" label associated with this attribute resolution.AttributeResolutionContextsetResolvedIdPAttributes(Collection<IdPAttribute> attributes)Set the set of resolved attributes.AttributeResolutionContextsetTranscoderRegistry(ReloadableService<AttributeTranscoderRegistry> service)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 Detail
-
registryService
@Nullable private ReloadableService<AttributeTranscoderRegistry> registryService
Registry service to use to attach display metadata to resolved attributes.
-
requestedAttributeNames
@Nonnull @NonnullElements private Set<String> requestedAttributeNames
(internal) Names of the attributes that have been requested to be resolved.
-
principal
@Nullable private String principal
The principal associated with this resolution.
-
attributeIssuerID
@Nullable private String attributeIssuerID
The attribute source identity.
-
attributeRecipientID
@Nullable private String attributeRecipientID
The attribute recipient identity.
-
attributeRecipientGroupID
@Nullable private String attributeRecipientGroupID
The attribute recipient's group identity.
-
allowCachedResults
private boolean allowCachedResults
Whether the resolver should allow for results to come from cache.
-
resolutionLabel
@Nullable private String resolutionLabel
Label distinguishing different "types" of attribute resolution for use in resolver.
-
resolvedAttributes
@Nonnull @NonnullElements private Map<String,IdPAttribute> resolvedAttributes
Attributes which were resolved and released by the attribute resolver.
-
-
Method Detail
-
getTranscoderRegistry
@Nullable public ReloadableService<AttributeTranscoderRegistry> 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
@Nonnull public AttributeResolutionContext setAllowCachedResults(boolean flag)
Set whether to allow for results from cache.- Parameters:
flag- flag to set- Returns:
- this context
- Since:
- 3.3.0
-
getResolutionLabel
@Nullable public String 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
@Nonnull public AttributeResolutionContext setResolutionLabel(@Nullable String label)
Set the optional "contextual" label associated with this attribute resolution.- Parameters:
label- label to set- Returns:
- this context
- Since:
- 3.4.0
-
getAttributeIssuerID
@Nullable public String getAttributeIssuerID()
Get the attribute issuer (me) associated with this resolution.- Returns:
- the attribute issuer associated with this resolution.
-
setAttributeIssuerID
@Nullable public AttributeResolutionContext setAttributeIssuerID(@Nullable String value)
Set the attribute issuer (me) associated with this resolution.- Parameters:
value- the attribute issuer associated with this resolution.- Returns:
- this context
-
getAttributeRecipientID
@Nullable public String getAttributeRecipientID()
Get the attribute recipient (her) associated with this resolution.- Returns:
- the attribute recipient associated with this resolution.
-
setAttributeRecipientID
@Nullable public AttributeResolutionContext setAttributeRecipientID(@Nullable String value)
Set the attribute recipient (her) associated with this resolution.- Parameters:
value- the attribute recipient associated with this resolution.- Returns:
- this context
-
getAttributeRecipientGroupID
@Nullable public String 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
@Nullable public AttributeResolutionContext setAttributeRecipientGroupID(@Nullable String value)
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
@Nullable public String getPrincipal()
Set the principal associated with this resolution.- Returns:
- Returns the principal.
-
setPrincipal
@Nullable public AttributeResolutionContext setPrincipal(@Nullable String who)
Get the principal associated with this resolution.- Parameters:
who- the principal to set.- Returns:
- this context
-
getRequestedIdPAttributeNames
@Nonnull @NonnullElements @Live public Collection<String> 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
-
-