public class RegexAttributePredicate extends AbstractAttributePredicate
AttributeContext and checks
a specific attribute for value(s) that match a regular expression.
This handles only simple string-valued data.
| Modifier and Type | Field and Description |
|---|---|
private String |
attributeId
The attribute to evaluate.
|
private Logger |
log
Class logger.
|
private Pattern |
pattern
Regular expression.
|
| Constructor and Description |
|---|
RegexAttributePredicate() |
| Modifier and Type | Method and Description |
|---|---|
String |
getAttributeId()
Get the attribute ID to check.
|
Pattern |
getPattern()
Get the pattern to match the attribute values against.
|
protected boolean |
hasMatch(Map<String,IdPAttribute> attributeMap)
Abstract implementation of the condition to evaluate.
|
void |
setAttributeId(String id)
Set the attribute ID to check.
|
void |
setPattern(Pattern p)
Set the pattern to match the attribute values against.
|
void |
setPattern(String s)
Set the pattern to match the attribute values against.
|
allowNullAttributeContext, apply, getAttributeContextLookupStrategy, isUseUnfilteredAttributes, setAttributeContextLookupStrategy, setUseUnfilteredAttributes@Nullable @NotEmpty public String getAttributeId()
public void setAttributeId(@Nonnull@NotEmpty String id)
id - the attribute ID to check@Nullable public Pattern getPattern()
public void setPattern(@Nonnull Pattern p)
p - the pattern to match the attribute values againstpublic void setPattern(@Nonnull@NotEmpty String s)
s - the pattern to match the attribute values againstprotected boolean hasMatch(@Nonnull@NonnullElements Map<String,IdPAttribute> attributeMap)
hasMatch in class AbstractAttributePredicateattributeMap - the attributes to evaluateCopyright © 1999–2020 Shibboleth Consortium. All rights reserved.