Class 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.Logger
Class logger.private final PolicyRequirementRule
The 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 thoseIdPAttributeValue
s which match this rule, or null if the matcher failed.Testing support.Methods inherited from class net.shibboleth.idp.attribute.filter.BaseBridgingClass
doDestroy, doInitialize, getLogPrefix
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
setId
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
getId
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, initialize, isDestroyed, isInitialized
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.shibboleth.utilities.java.support.component.DestructableComponent
destroy, isDestroyed
Methods inherited from interface net.shibboleth.utilities.java.support.component.IdentifiableComponent
setId
Methods inherited from interface net.shibboleth.utilities.java.support.component.IdentifiedComponent
getId
-
Field Details
-
rule
The rule we are shadowing. -
log
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 thoseIdPAttributeValue
s which match this rule, or null if the matcher failed.- Specified by:
getMatchingValues
in interfaceMatcher
- Parameters:
attribute
- the attribute under question.filterContext
- the filter context- Returns:
- The result of this rule. Null if we failed.
-