Class ResolvedAttributeDefinition
java.lang.Object
net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
net.shibboleth.idp.attribute.resolver.AbstractResolverPlugin<IdPAttribute>
net.shibboleth.idp.attribute.resolver.AbstractAttributeDefinition
net.shibboleth.idp.attribute.resolver.ResolvedAttributeDefinition
- All Implemented Interfaces:
AttributeDefinition
,ResolverPlugin<IdPAttribute>
,Component
,DestructableComponent
,IdentifiableComponent
,IdentifiedComponent
,InitializableComponent
,UnmodifiableComponent
,DisposableBean
A proxy which wraps a resolved attribute definition and always returns the same attribute. The goal being that once
an attribute definition is resolved once this can be used in its place and calls to
ResolverPlugin.resolve(AttributeResolutionContext)
are "free".
This proxy is immutable so all setter methods simply return.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final IdPAttribute
The attribute produced by the resolved attribute definition.private final AttributeDefinition
The attribute definition that was resolved to produce the attribute. -
Constructor Summary
ConstructorsConstructorDescriptionResolvedAttributeDefinition
(AttributeDefinition definition, IdPAttribute attribute) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected IdPAttribute
doAttributeDefinitionResolve
(AttributeResolutionContext resolutionContext, AttributeResolverWorkContext workContext) Creates and populates the values for the resolved attribute.boolean
Get the predicate which defines whether this plugin is active for a given request.Gets the unmodifiable list of attributeDependencies for this plugin.Gets the unmodifiable list of dependencies for this plugin.getId()
Gets the resolved attribute.Gets the wrapped attribute definition that was resolved.int
hashCode()
boolean
Gets whether this attribute definition is only a dependency and thus its values should never be released outside the resolver.boolean
boolean
Get whether aResolutionException
that occurred resolving attributes will be re-thrown.void
setDependencyOnly
(boolean isDependencyOnly) Sets whether this attribute definition is only a dependency and thus its values should never be released outside the resolver.void
setPropagateResolutionExceptions
(boolean propagate) Set whether anAttributeResolutionContext
that occurred resolving attributes will be re-thrown.toString()
Methods inherited from class net.shibboleth.idp.attribute.resolver.AbstractAttributeDefinition
doInitialize, doResolve, getLogPrefix, isPreRequested, setPreRequested
Methods inherited from class net.shibboleth.idp.attribute.resolver.AbstractResolverPlugin
addDisplayInformation, doDestroy, getProfileContextStrategy, isSuppressDisplayInformation, resolve, setActivationCondition, setAttributeDependencies, setDataConnectorDependencies, setProfileContextStrategy, setSuppressDisplayInformation
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
setId
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, initialize, isDestroyed
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.shibboleth.utilities.java.support.component.DestructableComponent
destroy, isDestroyed
Methods inherited from interface org.springframework.beans.factory.DisposableBean
destroy
Methods inherited from interface net.shibboleth.utilities.java.support.component.InitializableComponent
initialize
Methods inherited from interface net.shibboleth.idp.attribute.resolver.ResolverPlugin
resolve
-
Field Details
-
resolvedDefinition
The attribute definition that was resolved to produce the attribute. -
resolvedAttribute
The attribute produced by the resolved attribute definition.
-
-
Constructor Details
-
ResolvedAttributeDefinition
public ResolvedAttributeDefinition(@Nonnull AttributeDefinition definition, @Nullable IdPAttribute attribute) Constructor.- Parameters:
definition
- attribute definition that was resolved to produce the given attributeattribute
- attribute produced by the given attribute definition
-
-
Method Details
-
doAttributeDefinitionResolve
@Nullable protected IdPAttribute doAttributeDefinitionResolve(@Nonnull AttributeResolutionContext resolutionContext, @Nonnull AttributeResolverWorkContext workContext) throws ResolutionException Creates and populates the values for the resolved attribute. Implementations should not set, or otherwise manage, the resolved attribute's display name, description or encoders. Nor should the resultant attribute be recorded in the given resolution context.- Specified by:
doAttributeDefinitionResolve
in classAbstractAttributeDefinition
- Parameters:
resolutionContext
- current attribute resolution contextworkContext
- current resolver work context- Returns:
- resolved attribute or null if nothing to resolve.
- Throws:
ResolutionException
- thrown if there is a problem resolving and creating the attribute
-
equals
- Overrides:
equals
in classAbstractResolverPlugin<IdPAttribute>
-
getAttributeDependencies
@Nonnull @NonnullElements public Set<ResolverAttributeDefinitionDependency> getAttributeDependencies()Gets the unmodifiable list of attributeDependencies for this plugin.- Specified by:
getAttributeDependencies
in interfaceResolverPlugin<IdPAttribute>
- Overrides:
getAttributeDependencies
in classAbstractResolverPlugin<IdPAttribute>
- Returns:
- unmodifiable list of dependencies for this plugin, never null
-
getDataConnectorDependencies
@Nonnull @NonnullElements public Set<ResolverDataConnectorDependency> getDataConnectorDependencies()Gets the unmodifiable list of dependencies for this plugin.- Specified by:
getDataConnectorDependencies
in interfaceResolverPlugin<IdPAttribute>
- Overrides:
getDataConnectorDependencies
in classAbstractResolverPlugin<IdPAttribute>
- Returns:
- unmodifiable list of dependencies for this plugin, never null
-
getActivationCondition
Get the predicate which defines whether this plugin is active for a given request.- Specified by:
getActivationCondition
in interfaceResolverPlugin<IdPAttribute>
- Overrides:
getActivationCondition
in classAbstractResolverPlugin<IdPAttribute>
- Returns:
- the predicate.
-
getId
- Specified by:
getId
in interfaceIdentifiedComponent
- Overrides:
getId
in classAbstractIdentifiedInitializableComponent
-
getResolvedAttribute
Gets the resolved attribute.- Returns:
- resolved attribute, or null
-
hashCode
public int hashCode()- Overrides:
hashCode
in classAbstractResolverPlugin<IdPAttribute>
-
isDependencyOnly
public boolean isDependencyOnly()Gets whether this attribute definition is only a dependency and thus its values should never be released outside the resolver.- Specified by:
isDependencyOnly
in interfaceAttributeDefinition
- Overrides:
isDependencyOnly
in classAbstractAttributeDefinition
- Returns:
- true if this attribute is only used as a dependency, false otherwise
-
isPropagateResolutionExceptions
public boolean isPropagateResolutionExceptions()Get whether aResolutionException
that occurred resolving attributes will be re-thrown. Doing so will cause the entire attribute resolution request to fail.- Specified by:
isPropagateResolutionExceptions
in interfaceResolverPlugin<IdPAttribute>
- Overrides:
isPropagateResolutionExceptions
in classAbstractResolverPlugin<IdPAttribute>
- Returns:
- true if
ResolutionException
s are propagated, false if not
-
setDependencyOnly
public void setDependencyOnly(boolean isDependencyOnly) Sets whether this attribute definition is only a dependency and thus its values should never be released outside the resolver.- Overrides:
setDependencyOnly
in classAbstractAttributeDefinition
- Parameters:
isDependencyOnly
- whether this attribute definition is only a dependency
-
setPropagateResolutionExceptions
public void setPropagateResolutionExceptions(boolean propagate) Set whether anAttributeResolutionContext
that occurred resolving attributes will be re-thrown. Doing so will cause the entire attribute resolution request to fail.- Overrides:
setPropagateResolutionExceptions
in classAbstractResolverPlugin<IdPAttribute>
- Parameters:
propagate
- true ifResolutionException
s are propagated, false if not
-
toString
-
getResolvedDefinition
Gets the wrapped attribute definition that was resolved.- Returns:
- the resolved attribute definition
-
isInitialized
public boolean isInitialized()- Specified by:
isInitialized
in interfaceInitializableComponent
- Overrides:
isInitialized
in classAbstractInitializableComponent
-