Package net.shibboleth.idp.profile.logic
Class RegexAttributePredicate
java.lang.Object
net.shibboleth.idp.profile.logic.AbstractAttributePredicate
net.shibboleth.idp.profile.logic.RegexAttributePredicate
- All Implemented Interfaces:
Predicate<ProfileRequestContext>
,Predicate<ProfileRequestContext>
Predicate that evaluates an
AttributeContext
and checks
a specific attribute for value(s) that match a regular expression.
This handles only simple string-valued data.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the attribute ID to check.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
(String s) Set the pattern to match the attribute values against.void
Set the pattern to match the attribute values against.Methods inherited from class net.shibboleth.idp.profile.logic.AbstractAttributePredicate
allowNullAttributeContext, getAttributeContextLookupStrategy, isUseUnfilteredAttributes, setAttributeContextLookupStrategy, setUseUnfilteredAttributes, test
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
attributeId
The attribute to evaluate. -
pattern
Regular expression.
-
-
Constructor Details
-
RegexAttributePredicate
public RegexAttributePredicate()
-
-
Method Details
-
getAttributeId
Get the attribute ID to check.- Returns:
- the attribute ID to check
-
setAttributeId
Set the attribute ID to check.- Parameters:
id
- the attribute ID to check
-
getPattern
Get the pattern to match the attribute values against.- Returns:
- the pattern to match the attribute values against
-
setPattern
Set the pattern to match the attribute values against.- Parameters:
p
- the pattern to match the attribute values against
-
setPattern
Set the pattern to match the attribute values against.- Parameters:
s
- the pattern to match the attribute values against
-
hasMatch
Abstract implementation of the condition to evaluate.- Specified by:
hasMatch
in classAbstractAttributePredicate
- Parameters:
attributeMap
- the attributes to evaluate- Returns:
- the condition result
-