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

# Class AbstractMatcher

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
net.shibboleth.idp.attribute.filter.matcher.impl.AbstractMatcher

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

Direct Known Subclasses:
  `AbstractRegexpStringMatcher`, `AbstractStringMatcher`

public abstract class AbstractMatcher extends AbstractIdentifiableInitializableComponent implements Matcher
This is the base of all implementations of `Matcher` which do some sort of comparison.

## Field Summary

Fields
Modifier and Type
Field
Description
`private final org.slf4j.Logger`
`log`
Class logger.
`private String`
`logPrefix`
The String used to prefix log message.

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

`MATCHER_FAILS, MATCHES_ALL, MATCHES_NONE`

## Constructor Summary

Constructors
Constructor
Description
`AbstractMatcher()`

## Method Summary

Modifier and Type
Method
Description
`protected abstract boolean`
`compareAttributeValue(IdPAttributeValue value)`
Given a value do we match?
`protected void`
`doInitialize()`
`protected String`
`getLogPrefix()`
Return a string which is to be prepended to all log messages.
`Set<IdPAttributeValue>`
`getMatchingValues(IdPAttribute attribute, AttributeFilterContext filterContext)`
Return those `IdPAttributeValue`s which match this rule, or null if the matcher failed.

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

### logPrefix

@Nullable private String logPrefix
The String used to prefix log message.

## Constructor Details

### AbstractMatcher

public AbstractMatcher()

## Method Details

### doInitialize

protected void doInitialize() throws ComponentInitializationException

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

### getMatchingValues

@Nonnull @Unmodifiable @NotLive public Set<IdPAttributeValue> getMatchingValues(@Nonnull IdPAttribute attribute, @Nonnull AttributeFilterContext filterContext)
Return those `IdPAttributeValue`s which match this rule, or null if the matcher failed.

Specified by:
  `getMatchingValues` in interface `Matcher`
Parameters:
  `attribute` - the attribute under question.
  `filterContext` - the filter context
Returns:
  The result of this rule. Null if we failed.

### compareAttributeValue

protected abstract boolean compareAttributeValue(@Nonnull IdPAttributeValue value)
Given a value do we match?

Parameters:
  `value` - the value to look at
Returns:
  yes if we do, otherwise no.

### getLogPrefix

@Nonnull @NotEmpty protected String getLogPrefix()
Return a string which is to be prepended to all log messages.

Returns:
  "Attribute Filter '<filterID>' :"