Class AbstractMatcher
java.lang.Object
net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
net.shibboleth.utilities.java.support.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 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 thoseIdPAttributeValue
s which match this rule, or null if the matcher failed.Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
setId
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
getId
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
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.utilities.java.support.component.IdentifiedComponent
getId
-
Field Details
-
log
private final org.slf4j.Logger logClass logger. -
logPrefix
The String used to prefix log message.
-
-
Constructor Details
-
AbstractMatcher
public AbstractMatcher()
-
-
Method Details
-
doInitialize
- Overrides:
doInitialize
in classAbstractIdentifiedInitializableComponent
- Throws:
ComponentInitializationException
-
getMatchingValues
@Nonnull @NonnullElements @Unmodifiable public Set<IdPAttributeValue> getMatchingValues(@Nonnull IdPAttribute attribute, @Nonnull AttributeFilterContext filterContext)Return thoseIdPAttributeValue
s which match this rule, or null if the matcher failed.- Specified by:
getMatchingValues
in 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>' :"
-