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

# Class NotPolicyRule

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
net.shibboleth.idp.attribute.filter.policyrule.logic.impl.NotPolicyRule

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

@ThreadSafe public final class NotPolicyRule extends AbstractIdentifiableInitializableComponent implements PolicyRequirementRule
`PolicyRequirementRule` that implements the negation of a matcher.

if FAIL then FAIL else if TRUE then FALSE else TRUE

## 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 PolicyRequirementRule`
`negatedRule`
The matcher we are negating.

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

`MATCHES_ALL, MATCHES_NONE, REQUIREMENT_RULE_FAILS`

## Constructor Summary

Constructors
Constructor
Description
`NotPolicyRule()`

## Method Summary

Modifier and Type
Method
Description
`protected void`
`doInitialize()`
`PolicyRequirementRule`
`getNegatedRule()`
Get the matcher that is being negated.
`PolicyRequirementRule.Tristate`
`matches(AttributeFilterContext filterContext)`
Evaluate what this rule means.
`void`
`setNegation(PolicyRequirementRule rule)`
Set the attribute value matcher to be negated.
`String`
`toString()`

### 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, wait, wait, wait`

### Methods inherited from interface net.shibboleth.shared.component.IdentifiedComponent

`getId`

## Field Details

### negatedRule

@NonnullAfterInit private PolicyRequirementRule negatedRule
The matcher we are negating.

## Constructor Details

### NotPolicyRule

public NotPolicyRule()

## Method Details

### setNegation

public void setNegation(@Nonnull PolicyRequirementRule rule)
Set the attribute value matcher to be negated.

Parameters:
  `rule` - attribute value matcher to be negated

### getNegatedRule

@Nonnull public PolicyRequirementRule getNegatedRule()
Get the matcher that is being negated.

Returns:
  matcher that is being negated

### doInitialize

protected void doInitialize() throws ComponentInitializationException

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

### matches

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

Specified by:
  `matches` in interface `PolicyRequirementRule`
Parameters:
  `filterContext` - the context.
Returns:
  whether the rule holds

### toString

public String toString()

Overrides:
  `toString` in class `Object`