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
FieldsModifier and TypeFieldDescriptionprivate final org.slf4j.LoggerClass logger.private StringThe 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 -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract booleanGiven a value do we match?protected voidprotected StringReturn a string which is to be prepended to all log messages.getMatchingValues(IdPAttribute attribute, AttributeFilterContext filterContext) Return thoseIdPAttributeValues which match this rule, or null if the matcher failed.Methods inherited from class net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
setIdMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentExceptionMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.shared.component.IdentifiedComponent
getId
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
logPrefix
The String used to prefix log message.
-
-
Constructor Details
-
AbstractMatcher
public AbstractMatcher()
-
-
Method Details
-
doInitialize
- Overrides:
doInitializein classAbstractIdentifiedInitializableComponent- Throws:
ComponentInitializationException
-
getMatchingValues
@Nonnull @Unmodifiable @NotLive public Set<IdPAttributeValue> getMatchingValues(@Nonnull IdPAttribute attribute, @Nonnull AttributeFilterContext filterContext) Return thoseIdPAttributeValues which match this rule, or null if the matcher failed.- Specified by:
getMatchingValuesin interfaceMatcher- Parameters:
attribute- the attribute under question.filterContext- the filter context- Returns:
- The result of this rule. Null if we failed.
-
compareAttributeValue
Given a value do we match?- Parameters:
value- the value to look at- Returns:
- yes if we do, otherwise no.
-
getLogPrefix
Return a string which is to be prepended to all log messages.- Returns:
- "Attribute Filter '<filterID>' :"
-