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

# Class DirectionPolicyRule

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.impl.DirectionPolicyRule

All Implemented Interfaces:
  `PolicyRequirementRule`, `Component`, `DestructableComponent`, `IdentifiableComponent`, `IdentifiedComponent`, `InitializableComponent`

public class DirectionPolicyRule extends AbstractPolicyRule
General `PolicyRequirementRule` for testing the filtering direction.

## 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 AttributeFilterContext.Direction`
`matchDirection`
Direction to match for a positive evaluation.

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

`MATCHES_ALL, MATCHES_NONE, REQUIREMENT_RULE_FAILS`

## Constructor Summary

Constructors
Constructor
Description
`DirectionPolicyRule()`

## Method Summary

Modifier and Type
Method
Description
`protected void`
`doInitialize()`
`AttributeFilterContext.Direction`
`getMatchDirection()`
Gets the `AttributeFilterContext.Direction` to match for a positive evaluation.
`PolicyRequirementRule.Tristate`
`matches(AttributeFilterContext filterContext)`
Evaluate what this rule means.
`void`
`setMatchDirection(AttributeFilterContext.Direction match)`
Sets the `AttributeFilterContext.Direction` to match for a positive evaluation.

### 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

### matchDirection

@NonnullAfterInit private AttributeFilterContext.Direction matchDirection
Direction to match for a positive evaluation.

## Constructor Details

### DirectionPolicyRule

public DirectionPolicyRule()

## Method Details

### getMatchDirection

@NonnullAfterInit public AttributeFilterContext.Direction getMatchDirection()
Gets the `AttributeFilterContext.Direction` to match for a positive evaluation.

Returns:
  direction to match

### setMatchDirection

public void setMatchDirection(@Nonnull AttributeFilterContext.Direction match)
Sets the `AttributeFilterContext.Direction` to match for a positive evaluation.

Parameters:
  `match` - match for a positive evaluation

### 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