Class PredicatePolicyRule
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.filter.policyrule.impl.AbstractPolicyRule
net.shibboleth.idp.attribute.filter.policyrule.filtercontext.impl.PredicatePolicyRule
- All Implemented Interfaces:
PolicyRequirementRule
,Component
,DestructableComponent
,IdentifiableComponent
,IdentifiedComponent
,InitializableComponent
Call out to an externally define predicate.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.shibboleth.idp.attribute.filter.PolicyRequirementRule
PolicyRequirementRule.Tristate
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.slf4j.Logger
Class logger.How to get to theProfileRequestContext
from theAttributeFilterContext
.private Predicate<ProfileRequestContext>
The predicate to use.Fields inherited from interface net.shibboleth.idp.attribute.filter.PolicyRequirementRule
MATCHES_ALL, MATCHES_NONE, REQUIREMENT_RULE_FAILS
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Set the context location strategy we'll use.Get the Predicate we'll use.matches
(AttributeFilterContext filterContext) Compare the issuer from the context with the provided string.void
Get the context location strategy we'll use.void
setRulePredicate
(Predicate<ProfileRequestContext> predicate) set the Predicate we'll use.Methods inherited from class net.shibboleth.idp.attribute.filter.policyrule.impl.AbstractPolicyRule
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, doDestroy, 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.IdentifiedComponent
getId
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
rulePredicate
The predicate to use. -
profileContextStrategy
How to get to theProfileRequestContext
from theAttributeFilterContext
.
-
-
Constructor Details
-
PredicatePolicyRule
public PredicatePolicyRule()Constructor.
-
-
Method Details
-
getRulePredicate
Get the Predicate we'll use.- Returns:
- Returns the Predicate.
-
setRulePredicate
set the Predicate we'll use.- Parameters:
predicate
- what to set.
-
getProfileContextStrategy
Set the context location strategy we'll use.- Returns:
- Returns the strategy.
-
setProfileContextStrategy
public void setProfileContextStrategy(Function<AttributeFilterContext, ProfileRequestContext> strategy) Get the context location strategy we'll use.- Parameters:
strategy
- what to set.
-
doInitialize
- Overrides:
doInitialize
in classAbstractPolicyRule
- Throws:
ComponentInitializationException
-
matches
Compare the issuer from the context with the provided string.- Parameters:
filterContext
- the context- Returns:
- whether it matches. All failure and navigation issues return
PolicyRequirementRule.Tristate.FAIL
. whether the rule holds
-