Package net.shibboleth.idp.attribute.filter.policyrule.filtercontext.impl

# Class PredicatePolicyRule

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.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`

public class PredicatePolicyRule extends AbstractPolicyRule
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

Fields
Modifier and Type
Field
Description
`private final org.slf4j.Logger`
`log`
Class logger.
`private Predicate<ProfileRequestContext>`
`rulePredicate`
The predicate to use.

### Fields inherited from interface net.shibboleth.idp.attribute.filter.PolicyRequirementRule

`MATCHES_ALL, MATCHES_NONE, REQUIREMENT_RULE_FAILS`

## Constructor Summary

Constructors
Constructor
Description
`PredicatePolicyRule()`

## Method Summary

Modifier and Type
Method
Description
`protected void`
`doInitialize()`
`Predicate<ProfileRequestContext>`
`getRulePredicate()`
Get the Predicate we'll use.
`PolicyRequirementRule.Tristate`
`matches(AttributeFilterContext filterContext)`
Evaluate what this rule means.
`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.shared.component.AbstractIdentifiableInitializableComponent

`setId`

### Methods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent

`ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException`

### Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent

`checkComponentActive, checkSetterPreconditions, 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.shared.component.IdentifiedComponent

`getId`

## Field Details

### log

@Nonnull private final org.slf4j.Logger log
Class logger.

### rulePredicate

@NonnullAfterInit private Predicate<ProfileRequestContext> rulePredicate
The predicate to use.

## Constructor Details

### PredicatePolicyRule

public PredicatePolicyRule()

## Method Details

### getRulePredicate

@NonnullAfterInit public Predicate<ProfileRequestContext> getRulePredicate()
Get the Predicate we'll use.

Returns:
  Returns the Predicate.

### setRulePredicate

public void setRulePredicate(@Nullable Predicate<ProfileRequestContext> predicate)
set the Predicate we'll use.

Parameters:
  `predicate` - what to set.

### doInitialize

protected void doInitialize() throws ComponentInitializationException

Overrides:
  `doInitialize` in class `AbstractPolicyRule`
Throws:
  `ComponentInitializationException`

### matches

@Nonnull public PolicyRequirementRule.Tristate matches(@Nonnull AttributeFilterContext filterContext)
Evaluate what this rule means.

Parameters:
  `filterContext` - the context.
Returns:
  whether the rule holds