Class MatcherFromPolicy
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
net.shibboleth.idp.attribute.filter.BaseBridgingClass
net.shibboleth.idp.attribute.filter.MatcherFromPolicy
- All Implemented Interfaces:
Matcher,Component,DestructableComponent,IdentifiableComponent,IdentifiedComponent,InitializableComponent
public final class MatcherFromPolicy
extends BaseBridgingClass
implements Matcher, IdentifiedComponent, DestructableComponent
Bridging class to go from a
PolicyRequirementRule to a Matcher.
If the rule is true then we return all values, else we return none. If the rule fails we return null.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.slf4j.LoggerClass logger.private final PolicyRequirementRuleThe rule we are shadowing.Fields inherited from interface net.shibboleth.idp.attribute.filter.Matcher
MATCHER_FAILS, MATCHES_ALL, MATCHES_NONE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetMatchingValues(IdPAttribute attribute, AttributeFilterContext filterContext) Return thoseIdPAttributeValues which match this rule, or null if the matcher failed.Testing support.Methods inherited from class net.shibboleth.idp.attribute.filter.BaseBridgingClass
doDestroy, doInitialize, getLogPrefixMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
setIdMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentExceptionMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.shared.component.DestructableComponent
destroy, isDestroyedMethods inherited from interface net.shibboleth.shared.component.IdentifiableComponent
setIdMethods inherited from interface net.shibboleth.shared.component.IdentifiedComponent
getId
-
Field Details
-
rule
The rule we are shadowing. -
log
@Nonnull private final org.slf4j.Logger logClass logger.
-
-
Constructor Details
-
MatcherFromPolicy
Constructor.- Parameters:
theRule- the class we are bridging to
-
-
Method Details
-
getPolicyRequirementRule
Testing support. Get the embedded PolicyRequirementRule.- Returns:
- the embedded matcher.
-
getMatchingValues
@Nullable public Set<IdPAttributeValue> getMatchingValues(@Nonnull IdPAttribute attribute, @Nonnull AttributeFilterContext filterContext) Return thoseIdPAttributeValues which match this rule, or null if the matcher failed.- Specified by:
getMatchingValuesin interfaceMatcher- Parameters:
attribute- the attribute under question.filterContext- the filter context- Returns:
- The result of this rule. Null if we failed.
-