ResolvedType - object type this plug-in resolves to@ThreadSafe public abstract class AbstractResolverPlugin<ResolvedType> extends net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent implements ResolverPlugin<ResolvedType>, DisposableBean
ResolverPlugins.| Modifier and Type | Field and Description |
|---|---|
private com.google.common.base.Predicate<org.opensaml.profile.context.ProfileRequestContext> |
activationCondition
Criterion that must be met for this plugin to be active for the given request.
|
private Set<ResolverPluginDependency> |
dependencies
IDs of the
ResolutionPlugIns this plug-in depends on. |
private Logger |
log
Class logger.
|
private com.google.common.base.Function<AttributeResolutionContext,org.opensaml.profile.context.ProfileRequestContext> |
profileContextStrategy
Strategy to get the
ProfileRequestContext. |
private boolean |
propagateResolutionExceptions
Whether an
AttributeResolutionContext that occurred resolving attributes will be re-thrown. |
| Constructor and Description |
|---|
AbstractResolverPlugin() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doDestroy() |
protected void |
doInitialize() |
protected abstract ResolvedType |
doResolve(AttributeResolutionContext resolutionContext,
AttributeResolverWorkContext workContext)
Perform the actual resolution.
|
boolean |
equals(Object obj) |
com.google.common.base.Predicate<org.opensaml.profile.context.ProfileRequestContext> |
getActivationCondition()
Gets the predicate which defines whether this plugin is active for a given request.
|
Set<ResolverPluginDependency> |
getDependencies()
Gets the unmodifiable list of dependencies for this plugin.
|
com.google.common.base.Function<AttributeResolutionContext,org.opensaml.profile.context.ProfileRequestContext> |
getProfileContextStrategy()
Gets the mechanism to find out the
ProfileRequestContext. |
int |
hashCode() |
boolean |
isPropagateResolutionExceptions()
Get whether an
AttributeResolutionContext that occurred resolving attributes will be re-thrown. |
ResolvedType |
resolve(AttributeResolutionContext resolutionContext)
Performs the attribute resolution for this plugin.
|
void |
setActivationCondition(com.google.common.base.Predicate<org.opensaml.profile.context.ProfileRequestContext> pred)
Sets the predicate which defines whether this plugin is active for a given request.
|
void |
setDependencies(Set<ResolverPluginDependency> pluginDependencies)
Sets the list of dependencies for this plugin.
|
void |
setProfileContextStrategy(com.google.common.base.Function<AttributeResolutionContext,org.opensaml.profile.context.ProfileRequestContext> strategy)
Sets the mechanism to find out the
ProfileRequestContext. |
void |
setPropagateResolutionExceptions(boolean propagate)
Set whether an
AttributeResolutionContext that occurred resolving attributes will be re-thrown. |
setIdgetIddestroy, initialize, isDestroyed, isInitializedclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitinitialize, isInitializeddestroy, isDestroyedgetIddestroyprivate boolean propagateResolutionExceptions
AttributeResolutionContext that occurred resolving attributes will be re-thrown.@Nonnull private com.google.common.base.Function<AttributeResolutionContext,org.opensaml.profile.context.ProfileRequestContext> profileContextStrategy
ProfileRequestContext.@Nullable private com.google.common.base.Predicate<org.opensaml.profile.context.ProfileRequestContext> activationCondition
@Nonnull @NonnullElements private Set<ResolverPluginDependency> dependencies
ResolutionPlugIns this plug-in depends on.public boolean isPropagateResolutionExceptions()
AttributeResolutionContext that occurred resolving attributes will be re-thrown. Doing so
will cause the entire attribute resolution request to fail.isPropagateResolutionExceptions in interface ResolverPlugin<ResolvedType>ResolutionExceptions are propagated, false if notpublic void setProfileContextStrategy(com.google.common.base.Function<AttributeResolutionContext,org.opensaml.profile.context.ProfileRequestContext> strategy)
ProfileRequestContext.strategy - the mechanismpublic com.google.common.base.Function<AttributeResolutionContext,org.opensaml.profile.context.ProfileRequestContext> getProfileContextStrategy()
ProfileRequestContext.public void setPropagateResolutionExceptions(boolean propagate)
AttributeResolutionContext that occurred resolving attributes will be re-thrown. Doing so
will cause the entire attribute resolution request to fail.propagate - true if ResolutionExceptions are propagated, false if not@Nullable public com.google.common.base.Predicate<org.opensaml.profile.context.ProfileRequestContext> getActivationCondition()
getActivationCondition in interface ResolverPlugin<ResolvedType>public void setActivationCondition(@Nonnull com.google.common.base.Predicate<org.opensaml.profile.context.ProfileRequestContext> pred)
pred - what to set@Nonnull @NonnullElements @Unmodifiable public Set<ResolverPluginDependency> getDependencies()
getDependencies in interface ResolverPlugin<ResolvedType>public void setDependencies(@Nullable@NullableElements Set<ResolverPluginDependency> pluginDependencies)
pluginDependencies - unmodifiable list of dependencies for this plugin@Nullable public final ResolvedType resolve(@Nonnull AttributeResolutionContext resolutionContext) throws ResolutionException
This method first checks to see if this plugin has been initialized and has not be destroyed. Then it checks if
the plugins activation criterion has been met. Finally it delegates to
#doResolve(AttributeResolutionContext). If an exception is thrown and
isPropagateResolutionExceptions() is false the exception is logged but not re-thrown, otherwise it is
re-thrown.
resolve in interface ResolverPlugin<ResolvedType>resolutionContext - current attribute resolution contextResolutionException - thrown if there was a problem resolving the attributesprotected void doDestroy()
doDestroy in class net.shibboleth.utilities.java.support.component.AbstractInitializableComponentprotected void doInitialize()
throws net.shibboleth.utilities.java.support.component.ComponentInitializationException
doInitialize in class net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponentnet.shibboleth.utilities.java.support.component.ComponentInitializationException@Nullable protected abstract ResolvedType doResolve(@Nonnull AttributeResolutionContext resolutionContext, @Nonnull AttributeResolverWorkContext workContext) throws ResolutionException
resolutionContext - current resolution contextworkContext - child context where intermediate results are trackedResolutionException - thrown if there is a problem resolving the attributesresolve(AttributeResolutionContext)Copyright © 1999–2014. All rights reserved.