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

# Class AbstractRegexpPolicyRule

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.AbstractRegexpPolicyRule

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

Direct Known Subclasses:
  `AttributeIssuerRegexpPolicyRule`, `AttributeRequesterRegexpPolicyRule`, `PrincipalNameRegexpPolicyRule`, `ProxiedRequesterRegexpPolicyRule`

public abstract class AbstractRegexpPolicyRule extends AbstractPolicyRule
General `Matcher` for regexp comparison of strings in Attribute Filters.

## 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 Pattern`
`pattern`
Regular expression to match.

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

`MATCHES_ALL, MATCHES_NONE, REQUIREMENT_RULE_FAILS`

## Constructor Summary

Constructors
Constructor
Description
`AbstractRegexpPolicyRule()`

## Method Summary

Modifier and Type
Method
Description
`protected void`
`doInitialize()`
`String`
`getRegularExpression()`
Gets the regular expression to match.
`protected PolicyRequirementRule.Tristate`
`regexpCompare(String value)`
Matches the given value against the provided regular expression.
`void`
`setPattern(Pattern thePattern)`
Sets the `Pattern` for matching to match.

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

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

`matches`

## Field Details

### pattern

@NonnullAfterInit private Pattern pattern
Regular expression to match.

## Constructor Details

### AbstractRegexpPolicyRule

public AbstractRegexpPolicyRule()

## Method Details

### getRegularExpression

@NonnullAfterInit public String getRegularExpression()
Gets the regular expression to match.

Returns:
  regular expression to match

### setPattern

public void setPattern(@Nonnull Pattern thePattern)
Sets the `Pattern` for matching to match.

Parameters:
  `thePattern` - the pattern to match

### doInitialize

protected void doInitialize() throws ComponentInitializationException

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

### regexpCompare

@Nonnull protected PolicyRequirementRule.Tristate regexpCompare(@Nullable String value)
Matches the given value against the provided regular expression.

Parameters:
  `value` - the value to evaluate
Returns:
  true if the value matches the given match string, false if not