Class ResolvedAttributeDefinition
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.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 IdPAttributeThe attribute produced by the resolved attribute definition.private final AttributeDefinitionThe attribute definition that was resolved to produce the attribute. -
Constructor Summary
ConstructorsConstructorDescriptionResolvedAttributeDefinition(AttributeDefinition definition, IdPAttribute attribute) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected IdPAttributedoAttributeDefinitionResolve(AttributeResolutionContext resolutionContext, AttributeResolverWorkContext workContext) Creates and populates the values for the resolved attribute.booleanGet 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.inthashCode()booleanGets whether this attribute definition is only a dependency and thus its values should never be released outside the resolver.booleanbooleanGet whether aResolutionExceptionthat occurred resolving attributes will be re-thrown.voidsetDependencyOnly(boolean isDependencyOnly) Sets whether this attribute definition is only a dependency and thus its values should never be released outside the resolver.voidsetPropagateResolutionExceptions(boolean propagate) Set whether anAttributeResolutionContextthat occurred resolving attributes will be re-thrown.toString()Methods inherited from class net.shibboleth.idp.attribute.resolver.AbstractAttributeDefinition
doInitialize, doResolve, getLogPrefix, isPreRequested, setPreRequestedMethods inherited from class net.shibboleth.idp.attribute.resolver.AbstractResolverPlugin
doDestroy, resolve, setActivationCondition, setAttributeDependencies, setDataConnectorDependenciesMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
setIdMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
ensureId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentExceptionMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, initialize, isDestroyedMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.shibboleth.shared.component.DestructableComponent
destroy, isDestroyedMethods inherited from interface org.springframework.beans.factory.DisposableBean
destroyMethods inherited from interface net.shibboleth.shared.component.InitializableComponent
initializeMethods 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:
doAttributeDefinitionResolvein 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:
equalsin classAbstractResolverPlugin<IdPAttribute>
-
getAttributeDependencies
Gets the unmodifiable list of attributeDependencies for this plugin.- Specified by:
getAttributeDependenciesin interfaceResolverPlugin<IdPAttribute>- Overrides:
getAttributeDependenciesin classAbstractResolverPlugin<IdPAttribute>- Returns:
- unmodifiable list of dependencies for this plugin, never null.
-
getDataConnectorDependencies
Gets the unmodifiable list of dependencies for this plugin.- Specified by:
getDataConnectorDependenciesin interfaceResolverPlugin<IdPAttribute>- Overrides:
getDataConnectorDependenciesin 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:
getActivationConditionin interfaceResolverPlugin<IdPAttribute>- Overrides:
getActivationConditionin classAbstractResolverPlugin<IdPAttribute>- Returns:
- the predicate.
-
getId
- Specified by:
getIdin interfaceIdentifiedComponent- Overrides:
getIdin classAbstractIdentifiedInitializableComponent
-
getResolvedAttribute
Gets the resolved attribute.- Returns:
- resolved attribute, or null
-
hashCode
public int hashCode()- Overrides:
hashCodein 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:
isDependencyOnlyin interfaceAttributeDefinition- Overrides:
isDependencyOnlyin classAbstractAttributeDefinition- Returns:
- true if this attribute is only used as a dependency, false otherwise
-
isPropagateResolutionExceptions
public boolean isPropagateResolutionExceptions()Get whether aResolutionExceptionthat occurred resolving attributes will be re-thrown. Doing so will cause the entire attribute resolution request to fail.- Specified by:
isPropagateResolutionExceptionsin interfaceResolverPlugin<IdPAttribute>- Overrides:
isPropagateResolutionExceptionsin classAbstractResolverPlugin<IdPAttribute>- Returns:
- true if
ResolutionExceptions 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:
setDependencyOnlyin classAbstractAttributeDefinition- Parameters:
isDependencyOnly- whether this attribute definition is only a dependency
-
setPropagateResolutionExceptions
public void setPropagateResolutionExceptions(boolean propagate) Set whether anAttributeResolutionContextthat occurred resolving attributes will be re-thrown. Doing so will cause the entire attribute resolution request to fail.- Overrides:
setPropagateResolutionExceptionsin classAbstractResolverPlugin<IdPAttribute>- Parameters:
propagate- true ifResolutionExceptions 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:
isInitializedin interfaceInitializableComponent- Overrides:
isInitializedin classAbstractInitializableComponent
-