Class MockMatcher
- java.lang.Object
-
- net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
-
- net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
-
- net.shibboleth.idp.plugin.authn.oidc.rp.impl.MockMatcher
-
- All Implemented Interfaces:
net.shibboleth.idp.attribute.filter.Matcher,Component,DestructableComponent,IdentifiedComponent,InitializableComponent
public class MockMatcher extends AbstractIdentifiedInitializableComponent implements net.shibboleth.idp.attribute.filter.Matcher
A simple, mock implementation ofMatcher.
-
-
Field Summary
Fields Modifier and Type Field Description private net.shibboleth.idp.attribute.filter.context.AttributeFilterContextcontextUsedwhat was passed to getMatchingValues().private booleanfailsdo we fail when validate is called? do we fail when we are called?private booleaninitializedstate variableprivate StringmatchingAttributeID of the attribute to which this matcher applies.private Collection<?>matchingValuesValues, of the attribute, considered to match this matcher.
-
Constructor Summary
Constructors Constructor Description MockMatcher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoInitialize()net.shibboleth.idp.attribute.filter.context.AttributeFilterContextgetContextUsedAndReset()Set<net.shibboleth.idp.attribute.IdPAttributeValue>getMatchingValues(net.shibboleth.idp.attribute.IdPAttribute attribute, net.shibboleth.idp.attribute.filter.context.AttributeFilterContext filterContext)booleanisInitialized()voidsetFailValidate(boolean doFail)voidsetMatchingAttribute(String id)Sets the ID of the attribute to which this matcher applies.voidsetMatchingValues(Collection<?> values)Sets the values, of the attribute, considered to match this matcher.-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
getId, setId
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, doDestroy, initialize, isDestroyed
-
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 Detail
-
matchingAttribute
private String matchingAttribute
ID of the attribute to which this matcher applies.
-
matchingValues
private Collection<?> matchingValues
Values, of the attribute, considered to match this matcher.
-
initialized
private boolean initialized
state variable
-
fails
private boolean fails
do we fail when validate is called? do we fail when we are called?
-
contextUsed
private net.shibboleth.idp.attribute.filter.context.AttributeFilterContext contextUsed
what was passed to getMatchingValues().
-
-
Method Detail
-
setMatchingAttribute
public void setMatchingAttribute(String id)
Sets the ID of the attribute to which this matcher applies.- Parameters:
id- ID of the attribute to which this matcher applies
-
setMatchingValues
public void setMatchingValues(Collection<?> values)
Sets the values, of the attribute, considered to match this matcher. If null then all attribute values are considered to be matching.- Parameters:
values- values, of the attribute, considered to match this matcher
-
getMatchingValues
public Set<net.shibboleth.idp.attribute.IdPAttributeValue> getMatchingValues(net.shibboleth.idp.attribute.IdPAttribute attribute, net.shibboleth.idp.attribute.filter.context.AttributeFilterContext filterContext)
- Specified by:
getMatchingValuesin interfacenet.shibboleth.idp.attribute.filter.Matcher
-
isInitialized
public boolean isInitialized()
- Specified by:
isInitializedin interfaceInitializableComponent- Overrides:
isInitializedin classAbstractInitializableComponent
-
doInitialize
public void doInitialize()
- Overrides:
doInitializein classAbstractIdentifiedInitializableComponent
-
getContextUsedAndReset
public net.shibboleth.idp.attribute.filter.context.AttributeFilterContext getContextUsedAndReset()
-
setFailValidate
public void setFailValidate(boolean doFail)
-
-